diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-06-28 23:54:17 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-06-28 23:54:17 +0000 |
commit | 54140270202faef7b4576ac0c73f8b60e798b5a8 (patch) | |
tree | 2264fa15b2258d5f7650849419032f98f729246f /clang/tools/libclang/CIndex.cpp | |
parent | 8d38ac453673a0cbad6d2a6b5332cbf2c2847d1a (diff) | |
download | bcm5719-llvm-54140270202faef7b4576ac0c73f8b60e798b5a8.tar.gz bcm5719-llvm-54140270202faef7b4576ac0c73f8b60e798b5a8.zip |
Per Doug's suggestion, move check for invalid SourceLocation into
cxloc::translateSourceLocation() (thus causing all clients of this
function to have the same behavior).
llvm-svn: 107101
Diffstat (limited to 'clang/tools/libclang/CIndex.cpp')
-rw-r--r-- | clang/tools/libclang/CIndex.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index e19cd4214f4..ce9357de330 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -1417,9 +1417,7 @@ CXSourceLocation clang_getLocation(CXTranslationUnit tu, static_cast<const FileEntry *>(file), line, column); - return SLoc.isInvalid() ? - clang_getNullLocation() : - cxloc::translateSourceLocation(CXXUnit->getASTContext(), SLoc); + return cxloc::translateSourceLocation(CXXUnit->getASTContext(), SLoc); } CXSourceRange clang_getNullRange() { |