diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-30 17:23:28 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-30 17:23:28 +0000 |
commit | 1b39dc8b1c7509aba7deaca3b7c4f8be931f53e2 (patch) | |
tree | 53449fb8d9c2f494a68fe852f0e2b7203d1d611d /lib/AST/Decl.cpp | |
parent | 0bfe83b5a98ce37bf3a10274bca6f93ca4cb9696 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136573 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 64fd355446..32b9a624e0 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -1697,11 +1697,6 @@ void FunctionDecl::setParams(ASTContext &C, 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(); } } |