<div dir="ltr">Not sure if this was caught by upstream bots already, but we're <span style="background-color:rgba(241,243,244,0.71)">seeing a failing test ob our x64 bots:</span><div><span style="background-color:rgba(241,243,244,0.71)"><br></span></div><div><span style="background-color:rgba(241,243,244,0.71)">```</span></div><div>FAIL: Clang :: SemaCXX/cxx1z-constexpr-lambdas.cpp (9574 of 15387)<br>******************** TEST 'Clang :: SemaCXX/cxx1z-constexpr-lambdas.cpp' FAILED ********************<br>Script:<br>--<br>: 'RUN: at line 1'; /b/s/w/ir/k/recipe_cleanup/clangAGxiPQ/llvm_build_dir/bin/clang -cc1 -internal-isystem /b/s/w/ir/k/recipe_cleanup/clangAGxiPQ/llvm_build_dir/lib/clang/10.0.0/include -nostdsysteminc -std=c++1z -verify -fsyntax-only -fblocks /b/s/w/ir/k/llvm-project/clang/test/SemaCXX/cxx1z-constexpr-lambdas.cpp -fcxx-exceptions<br>: 'RUN: at line 2'; /b/s/w/ir/k/recipe_cleanup/clangAGxiPQ/llvm_build_dir/bin/clang -cc1 -internal-isystem /b/s/w/ir/k/recipe_cleanup/clangAGxiPQ/llvm_build_dir/lib/clang/10.0.0/include -nostdsysteminc -std=c++2a -verify -fsyntax-only -fblocks /b/s/w/ir/k/llvm-project/clang/test/SemaCXX/cxx1z-constexpr-lambdas.cpp -fcxx-exceptions<br>: 'RUN: at line 3'; /b/s/w/ir/k/recipe_cleanup/clangAGxiPQ/llvm_build_dir/bin/clang -cc1 -internal-isystem /b/s/w/ir/k/recipe_cleanup/clangAGxiPQ/llvm_build_dir/lib/clang/10.0.0/include -nostdsysteminc -std=c++1z -verify -fsyntax-only -fblocks -fdelayed-template-parsing /b/s/w/ir/k/llvm-project/clang/test/SemaCXX/cxx1z-constexpr-lambdas.cpp -fcxx-exceptions<br>: 'RUN: at line 4'; /b/s/w/ir/k/recipe_cleanup/clangAGxiPQ/llvm_build_dir/bin/clang -cc1 -internal-isystem /b/s/w/ir/k/recipe_cleanup/clangAGxiPQ/llvm_build_dir/lib/clang/10.0.0/include -nostdsysteminc -std=c++14 -verify -fsyntax-only -fblocks /b/s/w/ir/k/llvm-project/clang/test/SemaCXX/cxx1z-constexpr-lambdas.cpp -DCPP14_AND_EARLIER -fcxx-exceptions<br>--<br>Exit Code: 1<br><br>Command Output (stderr):<br>--<br>error: 'error' diagnostics expected but not seen: <br> File /b/s/w/ir/k/llvm-project/clang/test/SemaCXX/cxx1z-constexpr-lambdas.cpp Line 26 (directive at /b/s/w/ir/k/llvm-project/clang/test/SemaCXX/cxx1z-constexpr-lambdas.cpp:28): use of this statement in a constexpr function is a C++2a extension<br>error: 'warning' diagnostics seen but not expected: <br> File /b/s/w/ir/k/llvm-project/clang/test/SemaCXX/cxx1z-constexpr-lambdas.cpp Line 26: use of this statement in a constexpr function is a C++2a extension<br>2 errors generated.<br><br>--<br><br>********************<br>Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. <br>Testing Time: 79.76s<br>********************<br>Failing Tests (1):<br> Clang :: SemaCXX/cxx1z-constexpr-lambdas.cpp<br></div><div><span style="background-color:rgba(241,243,244,0.71)">```</span></div><div><span style="background-color:rgba(241,243,244,0.71)"><br></span></div><div><span style="background-color:rgba(241,243,244,0.71)">Could you look into this? Thanks.</span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 19, 2019 at 10:39 AM Erich Keane via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Author: erichkeane<br>
Date: Mon Aug 19 10:39:59 2019<br>
New Revision: 369281<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=369281&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=369281&view=rev</a><br>
Log:<br>
Implement P1668R1<br>
<br>
Allow inline assembly statements in unexecuted branches of constexpr<br>
functions.<br>
<br>
Modified:<br>
cfe/trunk/lib/Frontend/InitPreprocessor.cpp<br>
cfe/trunk/lib/Sema/SemaDeclCXX.cpp<br>
cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp<br>
cfe/trunk/test/Lexer/cxx-features.cpp<br>
cfe/trunk/test/SemaCXX/cxx1z-constexpr-lambdas.cpp<br>
<br>
Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=369281&r1=369280&r2=369281&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=369281&r1=369280&r2=369281&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)<br>
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Mon Aug 19 10:39:59 2019<br>
@@ -480,6 +480,7 @@ static void InitializeCPlusPlusFeatureTe<br>
Builder.defineMacro("__cpp_user_defined_literals", "200809L");<br>
Builder.defineMacro("__cpp_lambdas", "200907L");<br>
Builder.defineMacro("__cpp_constexpr",<br>
+ LangOpts.CPlusPlus2a ? "201907L" :<br>
LangOpts.CPlusPlus17 ? "201603L" :<br>
LangOpts.CPlusPlus14 ? "201304L" : "200704");<br>
Builder.defineMacro("__cpp_range_based_for",<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=369281&r1=369280&r2=369281&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=369281&r1=369280&r2=369281&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Mon Aug 19 10:39:59 2019<br>
@@ -1995,6 +1995,9 @@ CheckConstexprFunctionStmt(Sema &SemaRef<br>
return false;<br>
return true;<br>
<br>
+ case Stmt::GCCAsmStmtClass:<br>
+ case Stmt::MSAsmStmtClass:<br>
+ // C++2a allows inline assembly statements.<br>
case Stmt::CXXTryStmtClass:<br>
if (Cxx2aLoc.isInvalid())<br>
Cxx2aLoc = S->getBeginLoc();<br>
<br>
Modified: cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp?rev=369281&r1=369280&r2=369281&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp?rev=369281&r1=369280&r2=369281&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp (original)<br>
+++ cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp Mon Aug 19 10:39:59 2019<br>
@@ -136,9 +136,13 @@ constexpr int AllowedStmtsCXX11() {<br>
}<br>
<br>
// or a compound-statement that does not contain [CXX1Y]<br>
-constexpr int DisallowedStmtsCXX1Y_1() {<br>
+constexpr int DisallowedStmtsCXX1Y_1(bool b) {<br>
// - an asm-definition<br>
- asm("int3"); // expected-error {{statement not allowed in constexpr function}}<br>
+ if (b)<br>
+ asm("int3");<br>
+#if !defined(CXX2A)<br>
+ // expected-error@-2 {{use of this statement in a constexpr function is a C++2a extension}}<br>
+#endif<br>
return 0;<br>
}<br>
constexpr int DisallowedStmtsCXX1Y_2() {<br>
<br>
Modified: cfe/trunk/test/Lexer/cxx-features.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/cxx-features.cpp?rev=369281&r1=369280&r2=369281&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/cxx-features.cpp?rev=369281&r1=369280&r2=369281&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Lexer/cxx-features.cpp (original)<br>
+++ cfe/trunk/test/Lexer/cxx-features.cpp Mon Aug 19 10:39:59 2019<br>
@@ -203,7 +203,7 @@<br>
#error "wrong value for __cpp_lambdas"<br>
#endif<br>
<br>
-#if check(constexpr, 0, 200704, 201304, 201603, 201603)<br>
+#if check(constexpr, 0, 200704, 201304, 201603, 201907)<br>
#error "wrong value for __cpp_constexpr"<br>
#endif<br>
<br>
<br>
Modified: cfe/trunk/test/SemaCXX/cxx1z-constexpr-lambdas.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/cxx1z-constexpr-lambdas.cpp?rev=369281&r1=369280&r2=369281&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/cxx1z-constexpr-lambdas.cpp?rev=369281&r1=369280&r2=369281&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/SemaCXX/cxx1z-constexpr-lambdas.cpp (original)<br>
+++ cfe/trunk/test/SemaCXX/cxx1z-constexpr-lambdas.cpp Mon Aug 19 10:39:59 2019<br>
@@ -23,7 +23,10 @@ namespace ns1 {<br>
} // end ns1<br>
<br>
namespace ns2 {<br>
- auto L = [](int I) constexpr { asm("non-constexpr"); }; //expected-error{{not allowed in constexpr function}}<br>
+ auto L = [](int I) constexpr { if (I == 5) asm("non-constexpr"); };<br>
+#if __cpp_constexpr < 201907L<br>
+ //expected-error@-2{{use of this statement in a constexpr function is a C++2a extension}}<br>
+#endif<br>
} // end ns1<br>
<br>
// This is not constexpr until C++20, as the requirements on constexpr<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>