[cfe-commits] r137999 - /cfe/trunk/tools/libclang/CIndex.cpp
Ted Kremenek
kremenek at apple.com
Thu Aug 18 15:25:21 PDT 2011
Author: kremenek
Date: Thu Aug 18 17:25:21 2011
New Revision: 137999
URL: http://llvm.org/viewvc/llvm-project?rev=137999&view=rev
Log:
[libclang] Remove NestedNameSpecifierVisit, as Clang says that this code is dead.
Modified:
cfe/trunk/tools/libclang/CIndex.cpp
Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=137999&r1=137998&r2=137999&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Thu Aug 18 17:25:21 2011
@@ -141,7 +141,6 @@
TypeLocVisitKind, OverloadExprPartsKind,
DeclRefExprPartsKind, LabelRefVisitKind,
ExplicitTemplateArgsVisitKind,
- NestedNameSpecifierVisitKind,
NestedNameSpecifierLocVisitKind,
DeclarationNameInfoVisitKind,
MemberRefVisitKind, SizeOfPackExprPartsKind };
@@ -1714,27 +1713,6 @@
SourceLocation getLoc() const {
return SourceLocation::getFromPtrEncoding(data[1]); }
};
-class NestedNameSpecifierVisit : public VisitorJob {
-public:
- NestedNameSpecifierVisit(NestedNameSpecifier *NS, SourceRange R,
- CXCursor parent)
- : VisitorJob(parent, VisitorJob::NestedNameSpecifierVisitKind,
- NS, R.getBegin().getPtrEncoding(),
- R.getEnd().getPtrEncoding()) {}
- static bool classof(const VisitorJob *VJ) {
- return VJ->getKind() == VisitorJob::NestedNameSpecifierVisitKind;
- }
- NestedNameSpecifier *get() const {
- return static_cast<NestedNameSpecifier*>(data[0]);
- }
- SourceRange getSourceRange() const {
- SourceLocation A =
- SourceLocation::getFromRawEncoding((unsigned)(uintptr_t) data[1]);
- SourceLocation B =
- SourceLocation::getFromRawEncoding((unsigned)(uintptr_t) data[2]);
- return SourceRange(A, B);
- }
-};
class NestedNameSpecifierLocVisit : public VisitorJob {
public:
@@ -1836,7 +1814,6 @@
private:
void AddDeclarationNameInfo(Stmt *S);
- void AddNestedNameSpecifier(NestedNameSpecifier *NS, SourceRange R);
void AddNestedNameSpecifierLoc(NestedNameSpecifierLoc Qualifier);
void AddExplicitTemplateArgs(const ExplicitTemplateArgumentList *A);
void AddMemberRef(FieldDecl *D, SourceLocation L);
@@ -1852,11 +1829,6 @@
// statement we are visiting.
WL.push_back(DeclarationNameInfoVisit(S, Parent));
}
-void EnqueueVisitor::AddNestedNameSpecifier(NestedNameSpecifier *N,
- SourceRange R) {
- if (N)
- WL.push_back(NestedNameSpecifierVisit(N, R, Parent));
-}
void
EnqueueVisitor::AddNestedNameSpecifierLoc(NestedNameSpecifierLoc Qualifier) {
@@ -2201,14 +2173,7 @@
}
continue;
}
-
- case VisitorJob::NestedNameSpecifierVisitKind: {
- NestedNameSpecifierVisit *V = cast<NestedNameSpecifierVisit>(&LI);
- if (VisitNestedNameSpecifier(V->get(), V->getSourceRange()))
- return true;
- continue;
- }
-
+
case VisitorJob::NestedNameSpecifierLocVisitKind: {
NestedNameSpecifierLocVisit *V = cast<NestedNameSpecifierLocVisit>(&LI);
if (VisitNestedNameSpecifierLoc(V->get()))
More information about the cfe-commits
mailing list