diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-04-30 19:45:53 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-04-30 19:45:53 +0000 |
| commit | 0925fbc3fd30f2654533bc54af7a6cc5d6b1c873 (patch) | |
| tree | 0ffde17c70ac246bc0f83461211467f9655c8d05 | |
| parent | d6c5391cd98a967a9a4038541d2842aea39b6d8f (diff) | |
| download | bcm5719-llvm-0925fbc3fd30f2654533bc54af7a6cc5d6b1c873.tar.gz bcm5719-llvm-0925fbc3fd30f2654533bc54af7a6cc5d6b1c873.zip | |
Teach clang_getLocation() to cope with a NULL file argument.
llvm-svn: 102748
| -rw-r--r-- | clang/tools/CIndex/CIndex.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp index 6221a615aa7..f9f735113f7 100644 --- a/clang/tools/CIndex/CIndex.cpp +++ b/clang/tools/CIndex/CIndex.cpp @@ -1296,9 +1296,9 @@ CXSourceLocation clang_getLocation(CXTranslationUnit tu, 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( |

