Fold assertion into condition, as it does not hold all the time.

llvm-svn: 103716
This commit is contained in:
Ted Kremenek 2010-05-13 15:38:38 +00:00
parent 484c6fc825
commit d321413e3d
1 changed files with 2 additions and 3 deletions

View File

@ -2489,10 +2489,9 @@ AnnotateTokensWorker::Visit(CXCursor cursor, CXCursor parent) {
if (TypeSourceInfo *TI = DD->getTypeSourceInfo()) {
TypeLoc TL = TI->getTypeLoc();
SourceLocation TLoc = TL.getFullSourceRange().getBegin();
if (TLoc.isValid()) {
assert(SrcMgr.isBeforeInTranslationUnit(TLoc, L));
if (TLoc.isValid() &&
SrcMgr.isBeforeInTranslationUnit(TLoc, L))
cursorRange.setBegin(TLoc);
}
}
}
}