[clang] f43adc4 - [clang][Interp] Add missing static_assert message

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 8 06:44:40 PDT 2023


Author: Timm Bäder
Date: 2023-04-08T15:44:11+02:00
New Revision: f43adc498065fdfa120bd1aeea02c64f7ecea8f9

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

LOG: [clang][Interp] Add missing static_assert message

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/test/AST/Interp/functions.cpp b/clang/test/AST/Interp/functions.cpp
index 933cc860577e..a8681aae0d58 100644
--- a/clang/test/AST/Interp/functions.cpp
+++ b/clang/test/AST/Interp/functions.cpp
@@ -214,10 +214,10 @@ namespace InvalidCall {
     }
   };
   constexpr S s;
-  static_assert(s.a() == 1); // expected-error {{not an integral constant expression}} \
-                             // expected-note {{in call to}} \
-                             // ref-error {{not an integral constant expression}} \
-                             // ref-note {{in call to}}
+  static_assert(s.a() == 1, ""); // expected-error {{not an integral constant expression}} \
+                                 // expected-note {{in call to}} \
+                                 // ref-error {{not an integral constant expression}} \
+                                 // ref-note {{in call to}}
 
   /// This used to cause an assertion failure in the new constant interpreter.
   constexpr void func(); // expected-note {{declared here}} \


        


More information about the cfe-commits mailing list