]> granicus.if.org Git - clang/commitdiff
Add a comment.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 23 Jun 2009 00:42:00 +0000 (00:42 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 23 Jun 2009 00:42:00 +0000 (00:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73930 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Decl.cpp

index 1b1b4fe30be4e74f5442daf1c46fe8f258f51e03..17966269b99367690e1430e231f7423aa715e773 100644 (file)
@@ -494,7 +494,8 @@ void FunctionDecl::setParams(ASTContext& C, ParmVarDecl **NewParamInfo,
     ParamInfo = new (Mem) ParmVarDecl*[NumParams];
     memcpy(ParamInfo, NewParamInfo, sizeof(ParmVarDecl*)*NumParams);
 
-    // Update source range.
+    // Update source range. The check below allows us to set EndRangeLoc before
+    // setting the parameters.
     if (EndRangeLoc < NewParamInfo[NumParams-1]->getLocEnd())
       EndRangeLoc = NewParamInfo[NumParams-1]->getLocEnd();
   }