aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-06-23 00:42:00 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-06-23 00:42:00 +0000
commit96888cc2515e55c9b5dd6798063bf4be2c22983a (patch)
tree120b0fc2dab369d3387db2ba152e599764158711 /lib/AST/Decl.cpp
parent7ae7ad9951f032d0a33b64c964f7cdcb9cc6f59b (diff)
Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73930 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 1b1b4fe30b..17966269b9 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -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();
}