[clang] 0a9d2fa - [clang][Interp][NFC] Fix a test to actually test something

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 1 21:52:42 PDT 2023


Author: Timm Bäder
Date: 2023-07-02T06:49:55+02:00
New Revision: 0a9d2fa9ac9ec12eb4d50674d40fc73510fef405

URL: https://github.com/llvm/llvm-project/commit/0a9d2fa9ac9ec12eb4d50674d40fc73510fef405
DIFF: https://github.com/llvm/llvm-project/commit/0a9d2fa9ac9ec12eb4d50674d40fc73510fef405.diff

LOG: [clang][Interp][NFC] Fix a test to actually test something

This was always meant to test the values of c2, not c.

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 68d902a66e3ca2..8d976551cdf59b 100644
--- a/clang/test/AST/Interp/records.cpp
+++ b/clang/test/AST/Interp/records.cpp
@@ -111,8 +111,8 @@ static_assert(c.a == 100, "");
 static_assert(c.b == 200, "");
 
 constexpr C c2 = C().get();
-static_assert(c.a == 100, "");
-static_assert(c.b == 200, "");
+static_assert(c2.a == 100, "");
+static_assert(c2.b == 200, "");
 
 constexpr int getB() {
   C c;


        


More information about the cfe-commits mailing list