commit | 0925fbc3fd30f2654533bc54af7a6cc5d6b1c873 | [log] [tgz] |
---|---|---|
author | Douglas Gregor <dgregor@apple.com> | Fri Apr 30 19:45:53 2010 +0000 |
committer | Douglas Gregor <dgregor@apple.com> | Fri Apr 30 19:45:53 2010 +0000 |
tree | 0ffde17c70ac246bc0f83461211467f9655c8d05 | |
parent | d6c5391cd98a967a9a4038541d2842aea39b6d8f [diff] [blame] |
Teach clang_getLocation() to cope with a NULL file argument. llvm-svn: 102748
diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp index 6221a61..f9f7351 100644 --- a/clang/tools/CIndex/CIndex.cpp +++ b/clang/tools/CIndex/CIndex.cpp
@@ -1296,9 +1296,9 @@ CXFile file, unsigned line, unsigned column) { - if (!tu) + if (!tu || !file) return clang_getNullLocation(); - + ASTUnit *CXXUnit = static_cast<ASTUnit *>(tu); SourceLocation SLoc = CXXUnit->getSourceManager().getLocation(