[cfe-commits] r102748 - /cfe/trunk/tools/CIndex/CIndex.cpp
Douglas Gregor
dgregor at apple.com
Fri Apr 30 12:45:53 PDT 2010
Author: dgregor
Date: Fri Apr 30 14:45:53 2010
New Revision: 102748
URL: http://llvm.org/viewvc/llvm-project?rev=102748&view=rev
Log:
Teach clang_getLocation() to cope with a NULL file argument.
Modified:
cfe/trunk/tools/CIndex/CIndex.cpp
Modified: cfe/trunk/tools/CIndex/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndex.cpp?rev=102748&r1=102747&r2=102748&view=diff
==============================================================================
--- cfe/trunk/tools/CIndex/CIndex.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndex.cpp Fri Apr 30 14:45:53 2010
@@ -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(
More information about the cfe-commits
mailing list