[clang] 2d511cd - [clang][Interp][NFC] Add missing test diagnostic output

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Mon May 13 08:44:58 PDT 2024


Author: Timm Bäder
Date: 2024-05-13T17:44:50+02:00
New Revision: 2d511cdc10be611999d2a3c8983a992dd90f892c

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

LOG: [clang][Interp][NFC] Add missing test diagnostic output

This was left out from https://github.com/llvm/llvm-project/commit/257013e4f5cbdf644646da9ec3d60d6209c9bf25

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/test/AST/Interp/arrays.cpp b/clang/test/AST/Interp/arrays.cpp
index 70e87c4cd854b..f6d265d4b3d10 100644
--- a/clang/test/AST/Interp/arrays.cpp
+++ b/clang/test/AST/Interp/arrays.cpp
@@ -563,6 +563,11 @@ namespace LocalVLA {
 
   void f (unsigned int m) {
     int e[2][m];
+#if __cplusplus >= 202002L
+     // both-note at -3 {{declared here}}
+     // both-warning at -3 2{{variable length array}}
+     // both-note at -4 {{function parameter 'm' with unknown value}}
+#endif
     e[0][0] = 0;
   }
 }


        


More information about the cfe-commits mailing list