r179121 - [libclang] In cxtu::getASTUnit(), check for a null CXTranslationUnit.
Argyrios Kyrtzidis
akyrtzi at gmail.com
Tue Apr 9 13:03:03 PDT 2013
Author: akirtzidis
Date: Tue Apr 9 15:03:03 2013
New Revision: 179121
URL: http://llvm.org/viewvc/llvm-project?rev=179121&view=rev
Log:
[libclang] In cxtu::getASTUnit(), check for a null CXTranslationUnit.
Modified:
cfe/trunk/tools/libclang/CXTranslationUnit.h
Modified: cfe/trunk/tools/libclang/CXTranslationUnit.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CXTranslationUnit.h?rev=179121&r1=179120&r2=179121&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CXTranslationUnit.h (original)
+++ cfe/trunk/tools/libclang/CXTranslationUnit.h Tue Apr 9 15:03:03 2013
@@ -39,6 +39,8 @@ namespace cxtu {
CXTranslationUnitImpl *MakeCXTranslationUnit(CIndexer *CIdx, ASTUnit *AU);
static inline ASTUnit *getASTUnit(CXTranslationUnit TU) {
+ if (!TU)
+ return 0;
return TU->TheASTUnit;
}
More information about the cfe-commits
mailing list