forked from OSchip/llvm-project
Teach clang_getLocation() to cope with a NULL file argument.
llvm-svn: 102748
This commit is contained in:
parent
d6c5391cd9
commit
0925fbc3fd
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue