diff options
| author | Ted Kremenek <kremenek@apple.com> | 2010-05-13 15:38:38 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2010-05-13 15:38:38 +0000 |
| commit | d321413e3de506a0e24ef36d4685e520457511a8 (patch) | |
| tree | 8346d42cb6d74412de2bcc32d8f0520082bb1861 /clang | |
| parent | 484c6fc8257b399d49bf233ae4354667c9754756 (diff) | |
| download | bcm5719-llvm-d321413e3de506a0e24ef36d4685e520457511a8.tar.gz bcm5719-llvm-d321413e3de506a0e24ef36d4685e520457511a8.zip | |
Fold assertion into condition, as it does not hold all the time.
llvm-svn: 103716
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/tools/libclang/CIndex.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 1ca60e245c7..4570c6a1bd8 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -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); - } } } } |

