Don't use operator overload '<' for SourceLocation, it has not semantic meaning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73932 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 1796626..71e88a9 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -496,7 +496,7 @@
// 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();
}
}