aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/Decl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 17966269b9..71e88a9efc 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -496,7 +496,7 @@ void FunctionDecl::setParams(ASTContext& C, ParmVarDecl **NewParamInfo,
// Update source range. The check below allows us to set EndRangeLoc before
// setting the parameters.
- if (EndRangeLoc < NewParamInfo[NumParams-1]->getLocEnd())
+ if (EndRangeLoc.isInvalid() || EndRangeLoc == getLocation())
EndRangeLoc = NewParamInfo[NumParams-1]->getLocEnd();
}
}