[clang] b3d495e - [clang][Interp][NFC] Explain why tests are disabled

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 14 02:48:11 PDT 2022


Author: Timm Bäder
Date: 2022-10-14T11:47:25+02:00
New Revision: b3d495e7e082c3a3c77bfcf2ed928f6f18f69fc4

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

LOG: [clang][Interp][NFC] Explain why tests are disabled

Disabled to make the buildbots happy in
c004d7534dcefcfebc3e07a7fa12f5492be80279. In C++14, the functions here
use a MaterializeTemporaryExpr, which the new constant interpreter
doesn't support yet. Add comments for this and two new RUN lines.

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 8b2c92ca32ac..002ea1985923 100644
--- a/clang/test/AST/Interp/records.cpp
+++ b/clang/test/AST/Interp/records.cpp
@@ -1,6 +1,8 @@
 // RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify %s
+// RUN: %clang_cc1 -fexperimental-new-constant-interpreter -std=c++14 -verify %s
 // RUN: %clang_cc1 -fexperimental-new-constant-interpreter -triple i686 -verify %s
 // RUN: %clang_cc1 -verify=ref %s
+// RUN: %clang_cc1 -verify=ref -std=c++14 %s
 // RUN: %clang_cc1 -verify=ref -triple i686 %s
 
 // expected-no-diagnostics
@@ -50,7 +52,9 @@ static_assert(ints2.a == -20, "");
 static_assert(ints2.b == -30, "");
 static_assert(!ints2.c, "");
 
-#if 0
+#if __cplusplus >= 201703L
+// FIXME: In c++14, this uses a MaterializeTemporaryExpr,
+//   which the new interpreter doesn't support yet.
 constexpr Ints getInts() {
   return {64, 128, true};
 }
@@ -122,7 +126,9 @@ constexpr const C* getPointer() {
 }
 static_assert(getPointer()->a == 100, "");
 
-#if 0
+#if __cplusplus >= 201703L
+// FIXME: In c++14, this uses a MaterializeTemporaryExpr,
+//   which the new interpreter doesn't support yet.
 constexpr C RVOAndParams(const C *c) {
   return C();
 }


        


More information about the cfe-commits mailing list