Author: Timm Bäder
Date: 2024-07-05T12:44:32+02:00
New Revision: 00c622e596f918d9d83674b58097c8982ae1af95

URL: 
https://github.com/llvm/llvm-project/commit/00c622e596f918d9d83674b58097c8982ae1af95
DIFF: 
https://github.com/llvm/llvm-project/commit/00c622e596f918d9d83674b58097c8982ae1af95.diff

LOG: [clang][Interp][Test] Add test for #97302

Fixes #97302

Added: 
    

Modified: 
    clang/test/AST/Interp/records.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/AST/Interp/records.cpp 
b/clang/test/AST/Interp/records.cpp
index 1554e54275598a..f27c895e899486 100644
--- a/clang/test/AST/Interp/records.cpp
+++ b/clang/test/AST/Interp/records.cpp
@@ -494,6 +494,12 @@ namespace DeclRefs {
   constexpr B b;
   static_assert(b.a.m == 100, "");
   static_assert(b.a.f == 100, "");
+
+  constexpr B b2;
+  static_assert(b2.a.m == 100, "");
+  static_assert(b2.a.f == 100, "");
+  static_assert(b2.a.f == 101, ""); // both-error {{failed}} \
+                                    // both-note {{evaluates to '100 == 101'}}
 }
 
 namespace PointerArith {


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to