[cfe-commits] r136573 - /cfe/trunk/lib/AST/Decl.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Sat Jul 30 10:23:28 PDT 2011


Author: akirtzidis
Date: Sat Jul 30 12:23:28 2011
New Revision: 136573

URL: http://llvm.org/viewvc/llvm-project?rev=136573&view=rev
Log:
Not sure why we bother updating FunctionDecl's EndRangeLoc in FunctionDecl::setParams.
EndRangeLoc should always be set to at least the ending paren or brace.

Modified:
    cfe/trunk/lib/AST/Decl.cpp

Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=136573&r1=136572&r2=136573&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Sat Jul 30 12:23:28 2011
@@ -1697,11 +1697,6 @@
     void *Mem = C.Allocate(sizeof(ParmVarDecl*)*NumParams);
     ParamInfo = new (Mem) ParmVarDecl*[NumParams];
     memcpy(ParamInfo, NewParamInfo, sizeof(ParmVarDecl*)*NumParams);
-
-    // Update source range. The check below allows us to set EndRangeLoc before
-    // setting the parameters.
-    if (EndRangeLoc.isInvalid() || EndRangeLoc == getLocation())
-      EndRangeLoc = NewParamInfo[NumParams-1]->getLocEnd();
   }
 }
 





More information about the cfe-commits mailing list