[cfe-commits] r145455 - /cfe/trunk/tools/libclang/CIndexHigh.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Tue Nov 29 15:21:50 PST 2011
Author: akirtzidis
Date: Tue Nov 29 17:21:50 2011
New Revision: 145455
URL: http://llvm.org/viewvc/llvm-project?rev=145455&view=rev
Log:
[libclang] Do the ConcurrencyCheck at the beginning of clang_findReferencesInFile.
Modified:
cfe/trunk/tools/libclang/CIndexHigh.cpp
Modified: cfe/trunk/tools/libclang/CIndexHigh.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndexHigh.cpp?rev=145455&r1=145454&r2=145455&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndexHigh.cpp (original)
+++ cfe/trunk/tools/libclang/CIndexHigh.cpp Tue Nov 29 17:21:50 2011
@@ -343,6 +343,12 @@
return;
}
+ ASTUnit *CXXUnit = cxcursor::getCursorASTUnit(cursor);
+ if (!CXXUnit)
+ return;
+
+ ASTUnit::ConcurrencyCheck Check(*CXXUnit);
+
if (cursor.kind == CXCursor_MacroDefinition ||
cursor.kind == CXCursor_MacroExpansion) {
findMacroRefsInFile(cxcursor::getCursorTU(cursor),
@@ -370,9 +376,6 @@
return;
}
- ASTUnit *CXXUnit = cxcursor::getCursorASTUnit(cursor);
- ASTUnit::ConcurrencyCheck Check(*CXXUnit);
-
findIdRefsInFile(cxcursor::getCursorTU(cursor),
refCursor,
static_cast<const FileEntry *>(file),
More information about the cfe-commits
mailing list