<div dir="ltr">This can be reverted now that PR31197 is fixed. I kind of like the new code better, so up to you, Benjamin.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 28, 2016 at 3:58 PM, Reid Kleckner via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rnk<br>
Date: Mon Nov 28 17:58:04 2016<br>
New Revision: 288089<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=288089&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=288089&view=rev</a><br>
Log:<br>
Avoid lambdas in default member initializers to work around clang bug<br>
<br>
On Windows, Clang is mangling lambdas in default member initializers<br>
incorrectly. See PR31197.<br>
<br>
This is causing redness on the self-host bots. Work around the problem<br>
locally so we aren't blind to further issues.<br>
<br>
Modified:<br>
cfe/trunk/unittests/Tooling/<wbr>LookupTest.cpp<br>
<br>
Modified: cfe/trunk/unittests/Tooling/<wbr>LookupTest.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/LookupTest.cpp?rev=288089&r1=288088&r2=288089&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/unittests/<wbr>Tooling/LookupTest.cpp?rev=<wbr>288089&r1=288088&r2=288089&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/unittests/Tooling/<wbr>LookupTest.cpp (original)<br>
+++ cfe/trunk/unittests/Tooling/<wbr>LookupTest.cpp Mon Nov 28 17:58:04 2016<br>
@@ -13,18 +13,19 @@ using namespace clang;<br>
<br>
namespace {<br>
struct GetDeclsVisitor : TestVisitor<GetDeclsVisitor> {<br>
- std::function<void(CallExpr *)> OnCall = [&](CallExpr *Expr) {};<br>
- std::function<void(<wbr>RecordTypeLoc)> OnRecordTypeLoc = [&](RecordTypeLoc Type) {<br>
- };<br>
+ std::function<void(CallExpr *)> OnCall;<br>
+ std::function<void(<wbr>RecordTypeLoc)> OnRecordTypeLoc;<br>
SmallVector<Decl *, 4> DeclStack;<br>
<br>
bool VisitCallExpr(CallExpr *Expr) {<br>
- OnCall(Expr);<br>
+ if (OnCall)<br>
+ OnCall(Expr);<br>
return true;<br>
}<br>
<br>
bool VisitRecordTypeLoc(<wbr>RecordTypeLoc Loc) {<br>
- OnRecordTypeLoc(Loc);<br>
+ if (OnRecordTypeLoc)<br>
+ OnRecordTypeLoc(Loc);<br>
return true;<br>
}<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>