[clang] [Clang][Test] Update test after #115159 (PR #115172)

via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 6 07:22:28 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Krystian Stasiowski (sdkrystian)

<details>
<summary>Changes</summary>

After #<!-- -->111852 was reverted in #<!-- -->115159, two tests now fail because they partially depend on its changes. This patch temporarily fixes the failing cases by updating the expected output to match the actual output. Once #<!-- -->111852 is relanded, this can be reverted.

---
Full diff: https://github.com/llvm/llvm-project/pull/115172.diff


1 Files Affected:

- (modified) clang/test/CXX/temp/temp.decls/temp.spec.partial/temp.spec.partial.member/p2.cpp (+8-3) 


``````````diff
diff --git a/clang/test/CXX/temp/temp.decls/temp.spec.partial/temp.spec.partial.member/p2.cpp b/clang/test/CXX/temp/temp.decls/temp.spec.partial/temp.spec.partial.member/p2.cpp
index 7969b7efe597f9..61f8b1c32e2646 100644
--- a/clang/test/CXX/temp/temp.decls/temp.spec.partial/temp.spec.partial.member/p2.cpp
+++ b/clang/test/CXX/temp/temp.decls/temp.spec.partial/temp.spec.partial.member/p2.cpp
@@ -1,5 +1,4 @@
 // RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s
-// expected-no-diagnostics
 
 template<typename T>
 struct A {
@@ -70,11 +69,17 @@ constexpr int A<long>::x<U&> = 5;
 static_assert(A<int>::B<int>::y == 3);
 static_assert(A<int>::B<int*>::y == 3);
 static_assert(A<int>::B<int[]>::y == 3);
-static_assert(A<int>::B<int&>::y == 4);
+
+// FIXME: This should pass!
+static_assert(A<int>::B<int&>::y == 4); // expected-error {{static assertion failed due to requirement 'A<int>::B<int &>::y == 4'}}
+                                        // expected-note at -1 {{expression evaluates to '3 == 4'}}
 static_assert(A<int>::x<int> == 3);
 static_assert(A<int>::x<int*> == 3);
 static_assert(A<int>::x<int[]> == 3);
-static_assert(A<int>::x<int&> == 4);
+
+// FIXME: This should pass!
+static_assert(A<int>::x<int&> == 4); // expected-error {{static assertion failed due to requirement 'A<int>::x<int &> == 4'}}
+                                     // expected-note at -1 {{expression evaluates to '3 == 4'}}
 static_assert(A<long>::B<int>::y == 0);
 static_assert(A<long>::B<int*>::y == 1);
 static_assert(A<long>::B<int[]>::y == 2);

``````````

</details>


https://github.com/llvm/llvm-project/pull/115172


More information about the cfe-commits mailing list