-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[C++20][Modules][Serialization] Add an additional test case for #120277. #126349
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
@llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-modules Author: Michael Park (mpark) Changes4b35dd5 was shipped to address #120277 . It was thought to be a regression in 19.x according to this comment: #120277 (comment) This is a test case that fails even in 17.x but nevertheless is also fixed by: 4b35dd5 . Full diff: https://github.com/llvm/llvm-project/pull/126349.diff 1 Files Affected:
diff --git a/clang/test/Modules/pr120277-2.cpp b/clang/test/Modules/pr120277-2.cpp
new file mode 100644
index 000000000000000..1ed8fc52cb1ef7a
--- /dev/null
+++ b/clang/test/Modules/pr120277-2.cpp
@@ -0,0 +1,69 @@
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+// RUN: split-file %s %t
+// RUN: cd %t
+
+// RUN: %clang_cc1 -std=c++20 -emit-header-unit -xc++-user-header %t/hu-01.h \
+// RUN: -fcxx-exceptions -o %t/hu-01.pcm
+
+// RUN: %clang_cc1 -std=c++20 -emit-header-unit -xc++-user-header %t/hu-02.h \
+// RUN: -Wno-experimental-header-units -fcxx-exceptions \
+// RUN: -fmodule-file=%t/hu-01.pcm -o %t/hu-02.pcm
+
+// RUN: %clang_cc1 -std=c++20 -emit-header-unit -xc++-user-header %t/hu-03.h \
+// RUN: -Wno-experimental-header-units -fcxx-exceptions \
+// RUN: -fmodule-file=%t/hu-01.pcm -o %t/hu-03.pcm
+
+// RUN: %clang_cc1 -std=c++20 -emit-header-unit -xc++-user-header %t/hu-04.h \
+// RUN: -Wno-experimental-header-units -fcxx-exceptions \
+// RUN: -fmodule-file=%t/hu-02.pcm -fmodule-file=%t/hu-03.pcm -o %t/hu-04.pcm
+
+// RUN: %clang_cc1 -std=c++20 -emit-obj %t/main.cpp \
+// RUN: -Wno-experimental-header-units -fcxx-exceptions \
+// RUN: -fmodule-file=%t/hu-04.pcm
+//--- hu-01.h
+template <typename T>
+struct A {
+ ~A() { f(); }
+ auto f() const { return 0; }
+};
+
+template <typename T>
+struct B {
+ int g() const { return a.f(); }
+ A<T> a;
+};
+
+//--- hu-02.h
+import "hu-01.h";
+
+template <typename = void>
+struct C {
+ void h() {
+ B<int>().g();
+ }
+};
+
+template struct A<double>;
+
+//--- hu-03.h
+import "hu-01.h";
+
+inline B<int> b() {
+ return {};
+}
+
+//--- hu-04.h
+import "hu-02.h";
+import "hu-03.h";
+
+inline void f4() {
+ C{}.h();
+}
+
+//--- main.cpp
+import "hu-04.h";
+
+int main() {
+ f4();
+}
|
…120277. llvm@4b35dd5 was shipped to address llvm#120277 . It was thought to be a regression in 19.x according to this comment: llvm#120277 (comment) This is a test case that fails even in 17.x but nevertheless is also fixed by: llvm@4b35dd5 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is easier to debug without cd %t
generally.
Co-authored-by: Chuanqi Xu <yedeng.yd@linux.alibaba.com>
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/14342 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/6367 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/195/builds/4650 Here is the relevant piece of the build log for the reference
|
…120277. (llvm#126349) llvm@4b35dd5 was shipped to address llvm#120277 . It was thought to be a regression in 19.x according to this comment: llvm#120277 (comment) This is a test case that fails even in 17.x but nevertheless is also fixed by: llvm@4b35dd5
4b35dd5 was shipped to address #120277 .
It was thought to be a regression in 19.x according to this comment: #120277 (comment)
This is a test case that fails even in 17.x but nevertheless is also fixed by: 4b35dd5 .