[cfe-commits] r73932 - in /cfe/trunk: include/clang/AST/Decl.h lib/AST/Decl.cpp
Argiris Kirtzidis
akyrtzi at gmail.com
Mon Jun 22 17:42:15 PDT 2009
Author: akirtzidis
Date: Mon Jun 22 19:42:15 2009
New Revision: 73932
URL: http://llvm.org/viewvc/llvm-project?rev=73932&view=rev
Log:
Don't use operator overload '<' for SourceLocation, it has not semantic meaning.
Modified:
cfe/trunk/include/clang/AST/Decl.h
cfe/trunk/lib/AST/Decl.cpp
Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=73932&r1=73931&r2=73932&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Mon Jun 22 19:42:15 2009
@@ -694,7 +694,6 @@
return SourceRange(getLocation(), EndRangeLoc);
}
void setLocEnd(SourceLocation E) {
- assert(getLocation() <= E && "Invalid end location");
EndRangeLoc = E;
}
Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=73932&r1=73931&r2=73932&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Mon Jun 22 19:42:15 2009
@@ -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();
}
}
More information about the cfe-commits
mailing list