<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Yeah, sorry about that. I fixed it in 369284.<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></a></p>
<p class="MsoNormal"><a name="_____replyseparator"></a><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Leonard Chan [mailto:leonardchan@google.com]
<br>
<b>Sent:</b> Monday, August 19, 2019 11:33 AM<br>
<b>To:</b> Keane, Erich <erich.keane@intel.com><br>
<b>Cc:</b> cfe-commits cfe <cfe-commits@lists.llvm.org><br>
<b>Subject:</b> Re: r369281 - Implement P1668R1<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></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:<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">```<o:p></o:p></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<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">```<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Could you look into this? Thanks.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></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">cfe-commits@lists.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;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><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>