aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/CIndex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libclang/CIndex.cpp')
-rw-r--r--tools/libclang/CIndex.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index 96c7c586fa..51ed343f52 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -5142,24 +5142,7 @@ AnnotateTokensWorker::Visit(CXCursor cursor, CXCursor parent) {
SourceLocation L = SourceLocation::getFromRawEncoding(Loc.int_data);
- // Adjust the annotated range based specific declarations.
const enum CXCursorKind cursorK = clang_getCursorKind(cursor);
- if (clang_isDeclaration(cursorK)) {
- Decl *D = cxcursor::getCursorDecl(cursor);
-
- SourceLocation StartLoc;
- if (const DeclaratorDecl *DD = dyn_cast_or_null<DeclaratorDecl>(D)) {
- if (TypeSourceInfo *TI = DD->getTypeSourceInfo())
- StartLoc = TI->getTypeLoc().getLocStart();
- } else if (TypedefDecl *Typedef = dyn_cast_or_null<TypedefDecl>(D)) {
- if (TypeSourceInfo *TI = Typedef->getTypeSourceInfo())
- StartLoc = TI->getTypeLoc().getLocStart();
- }
-
- if (StartLoc.isValid() && L.isValid() &&
- SrcMgr.isBeforeInTranslationUnit(StartLoc, L))
- cursorRange.setBegin(StartLoc);
- }
// If the location of the cursor occurs within a macro instantiation, record
// the spelling location of the cursor in our annotation map. We can then