<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 7, 2014 at 8:47 AM, Fariborz Jahanian <span dir="ltr"><<a href="mailto:fjahanian@apple.com" target="_blank">fjahanian@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: fjahanian<br>
Date: Fri Nov  7 10:47:05 2014<br>
New Revision: 221533<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=221533&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=221533&view=rev</a><br>
Log:<br>
Revert r221404 which caused lldb to not display<br>
vararg expressions.<br></blockquote><div><br></div><div>Somewhat opaque - do you have a test case you could add (& test the output for whatever feature is of interest) so that someone doesn't make the same mistake/misfix in the future?<br><br>Is there a test case you could include for the previous (granted, crashing) behavior that is XFAIL'd temporarily so the problem isn't forgotten?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Modified:<br>
    cfe/trunk/lib/Sema/SemaExpr.cpp<br>
    cfe/trunk/test/CodeGenCXX/unknown-anytype.cpp<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=221533&r1=221532&r2=221533&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=221533&r1=221532&r2=221533&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Fri Nov  7 10:47:05 2014<br>
@@ -13343,39 +13343,6 @@ ExprResult RebuildUnknownAnyExpr::resolv<br>
         << VD << E->getSourceRange();<br>
       return ExprError();<br>
     }<br>
-    if (const FunctionProtoType *FT = Type->getAs<FunctionProtoType>()) {<br>
-      // We must match the FunctionDecl's type to the hack introduced in<br>
-      // RebuildUnknownAnyExpr::VisitCallExpr to vararg functions of unknown<br>
-      // type. See the lengthy commentary in that routine.<br>
-      QualType FDT = FD->getType();<br>
-      const FunctionType *FnType = FDT->castAs<FunctionType>();<br>
-      const FunctionProtoType *Proto = dyn_cast_or_null<FunctionProtoType>(FnType);<br>
-      DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E);<br>
-      if (DRE && Proto && Proto->getParamTypes().empty() && Proto->isVariadic()) {<br>
-        SourceLocation Loc = FD->getLocation();<br>
-        FunctionDecl *NewFD = FunctionDecl::Create(FD->getASTContext(),<br>
-                                      FD->getDeclContext(),<br>
-                                      Loc, Loc, FD->getNameInfo().getName(),<br>
-                                      DestType, FD->getTypeSourceInfo(),<br>
-                                      SC_None, false/*isInlineSpecified*/,<br>
-                                      FD->hasPrototype(),<br>
-                                      false/*isConstexprSpecified*/);<br>
-<br>
-        if (FD->getQualifier())<br>
-          NewFD->setQualifierInfo(FD->getQualifierLoc());<br>
-<br>
-        SmallVector<ParmVarDecl*, 16> Params;<br>
-        for (const auto &AI : FT->param_types()) {<br>
-          ParmVarDecl *Param =<br>
-            S.BuildParmVarDeclForTypedef(FD, Loc, AI);<br>
-          Param->setScopeInfo(0, Params.size());<br>
-          Params.push_back(Param);<br>
-        }<br>
-        NewFD->setParams(Params);<br>
-        DRE->setDecl(NewFD);<br>
-        VD = DRE->getDecl();<br>
-      }<br>
-    }<br>
<br>
     if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD))<br>
       if (MD->isInstance()) {<br>
<br>
Modified: cfe/trunk/test/CodeGenCXX/unknown-anytype.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/unknown-anytype.cpp?rev=221533&r1=221532&r2=221533&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/unknown-anytype.cpp?rev=221533&r1=221532&r2=221533&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGenCXX/unknown-anytype.cpp (original)<br>
+++ cfe/trunk/test/CodeGenCXX/unknown-anytype.cpp Fri Nov  7 10:47:05 2014<br>
@@ -115,9 +115,3 @@ extern "C" __unknown_anytype test10_any(<br>
 void test10() {<br>
   (void) test10_any(), (void) test10_any();<br>
 }<br>
-<br>
-extern "C" __unknown_anytype malloc(...);<br>
-void test11() {<br>
-  void *s = (void*)malloc(12);<br>
-  void *d = (void*)malloc(435);<br>
-}<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>