[clang] cf70e89 - [clang][Interp] Provide required c++14 warnings

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 20 07:40:09 PDT 2023


Author: Timm Bäder
Date: 2023-07-20T16:39:54+02:00
New Revision: cf70e89a8dd34514f1db9165f0e48be1d328b704

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

LOG: [clang][Interp] Provide required c++14 warnings

This doesn't show up in standards after c++14.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/test/AST/Interp/floats.cpp b/clang/test/AST/Interp/floats.cpp
index 05081c7516877a..fb9f1ac24bc75f 100644
--- a/clang/test/AST/Interp/floats.cpp
+++ b/clang/test/AST/Interp/floats.cpp
@@ -94,6 +94,10 @@ namespace compound {
     // RHS should be evaluated before LHS, so this should
     // write to a[1];
     a[i++] += ++i;
+#if __cplusplus <= 201402L
+                  // expected-warning at -2 {{multiple unsequenced modifications}} \
+                  // ref-warning at -2 {{multiple unsequenced modifications}}
+#endif
 
     return a[1];
   }


        


More information about the cfe-commits mailing list