[clang][Interp][NFC] Explain why tests are disabled
authorTimm Bäder <tbaeder@redhat.com>
Fri, 14 Oct 2022 09:44:23 +0000 (11:44 +0200)
committerTimm Bäder <tbaeder@redhat.com>
Fri, 14 Oct 2022 09:47:25 +0000 (11:47 +0200)
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.

clang/test/AST/Interp/records.cpp

index 8b2c92c..002ea19 100644 (file)
@@ -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();
 }