summaryrefslogtreecommitdiffstats
path: root/clang/tools
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-08-25 22:16:02 +0000
committerTed Kremenek <kremenek@apple.com>2010-08-25 22:16:02 +0000
commit65b2cc061dc31d3be6c48072fbad7ad5fc1493b9 (patch)
tree817ff615c25700692d7086f3dcba6e3224f6c987 /clang/tools
parentebb7c8489192626159d59f64307d515de65c4765 (diff)
downloadbcm5719-llvm-65b2cc061dc31d3be6c48072fbad7ad5fc1493b9.tar.gz
bcm5719-llvm-65b2cc061dc31d3be6c48072fbad7ad5fc1493b9.zip
When annotating tokens, don't fallback to annotating with a null cursor for cursors that come before a macro instantiation. Fixes <rdar://problem/7974151>.
llvm-svn: 112096
Diffstat (limited to 'clang/tools')
-rw-r--r--clang/tools/libclang/CIndex.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index e59bdde43d5..c696a27c599 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -2771,9 +2771,8 @@ AnnotateTokensWorker::Visit(CXCursor cursor, CXCursor parent) {
const enum CXCursorKind K = clang_getCursorKind(parent);
const CXCursor updateC =
- (clang_isInvalid(K) || K == CXCursor_TranslationUnit ||
- L.isMacroID())
- ? clang_getNullCursor() : parent;
+ (clang_isInvalid(K) || K == CXCursor_TranslationUnit)
+ ? clang_getNullCursor() : parent;
while (MoreTokens()) {
const unsigned I = NextToken();
OpenPOWER on IntegriCloud