<div dir="ltr">👍 Thanks<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 19, 2019 at 11:34 AM Keane, Erich <<a href="mailto:erich.keane@intel.com">erich.keane@intel.com</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">
<div lang="EN-US">
<div class="gmail-m_-3936467078563209429WordSection1">
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Yeah, sorry about that. I fixed it in 369284.<u></u><u></u></span></p>
<p class="MsoNormal"><a name="m_-3936467078563209429__MailEndCompose"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></a></p>
<p class="MsoNormal"><a name="m_-3936467078563209429______replyseparator"></a><b><span style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span style="font-size:11pt;font-family:Calibri,sans-serif"> Leonard Chan [mailto:<a href="mailto:leonardchan@google.com" target="_blank">leonardchan@google.com</a>]
<br>
<b>Sent:</b> Monday, August 19, 2019 11:33 AM<br>
<b>To:</b> Keane, Erich <<a href="mailto:erich.keane@intel.com" target="_blank">erich.keane@intel.com</a>><br>
<b>Cc:</b> cfe-commits cfe <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>><br>
<b>Subject:</b> Re: r369281 - Implement P1668R1<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Not sure if this was caught by upstream bots already, but we're seeing a failing test ob our x64 bots:<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">```<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">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<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">```<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Could you look into this? Thanks.<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Mon, Aug 19, 2019 at 10:39 AM Erich Keane via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">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" 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" 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" 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" 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" 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" 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" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><u></u><u></u></p>
</blockquote>
</div>
</div>
</div>
</blockquote></div>