aboutsummaryrefslogtreecommitdiff
path: root/lib/Index/Analyzer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Index/Analyzer.cpp')
-rw-r--r--lib/Index/Analyzer.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/Index/Analyzer.cpp b/lib/Index/Analyzer.cpp
index 1dd2178ad4..cda2c505fd 100644
--- a/lib/Index/Analyzer.cpp
+++ b/lib/Index/Analyzer.cpp
@@ -36,11 +36,11 @@ namespace {
class VISIBILITY_HIDDEN DeclEntityAnalyzer : public TranslationUnitHandler {
Entity Ent;
TULocationHandler &TULocHandler;
-
+
public:
DeclEntityAnalyzer(Entity ent, TULocationHandler &handler)
: Ent(ent), TULocHandler(handler) { }
-
+
virtual void Handle(TranslationUnit *TU) {
assert(TU && "Passed null translation unit");
@@ -60,11 +60,11 @@ public:
class VISIBILITY_HIDDEN RefEntityAnalyzer : public TranslationUnitHandler {
Entity Ent;
TULocationHandler &TULocHandler;
-
+
public:
RefEntityAnalyzer(Entity ent, TULocationHandler &handler)
: Ent(ent), TULocHandler(handler) { }
-
+
virtual void Handle(TranslationUnit *TU) {
assert(TU && "Passed null translation unit");
@@ -115,12 +115,12 @@ public:
IFaceEnt = Entity::get(IFD, Prog);
GlobSel = GlobalSelector::get(MD->getSelector(), Prog);
IsInstanceMethod = MD->isInstanceMethod();
-
+
for (ObjCInterfaceDecl *Cls = IFD->getSuperClass();
Cls; Cls = Cls->getSuperClass())
HierarchyEntities.insert(Entity::get(Cls, Prog));
}
-
+
virtual void Handle(TranslationUnit *TU) {
assert(TU && "Passed null translation unit");
@@ -150,7 +150,7 @@ public:
// FIXME: Finding @selector references should be through another Analyzer
// method, like FindSelectors.
if (isa<ObjCSelectorExpr>(ASTLoc.getStmt()))
- return false;
+ return false;
ObjCInterfaceDecl *MsgD = 0;
ObjCMessageExpr *Msg = cast<ObjCMessageExpr>(ASTLoc.getStmt());
@@ -181,7 +181,7 @@ public:
MsgD = Msg->getClassInfo().first;
// FIXME: Case when we only have an identifier.
- assert(MsgD && "Identifier only");
+ assert(MsgD && "Identifier only");
}
assert(MsgD);
@@ -233,7 +233,7 @@ class VISIBILITY_HIDDEN MessageAnalyzer : public TranslationUnitHandler {
/// \brief Super classes of the ObjCInterface.
typedef llvm::SmallSet<Entity, 16> EntitiesSetTy;
EntitiesSetTy HierarchyEntities;
-
+
/// \brief The interface in the message interface hierarchy that "intercepts"
/// the selector.
Entity ReceiverIFaceEnt;
@@ -254,7 +254,7 @@ public:
CanBeClassMethod = true;
MsgD = Msg->getClassInfo().first;
// FIXME: Case when we only have an identifier.
- assert(MsgD && "Identifier only");
+ assert(MsgD && "Identifier only");
break;
}
@@ -276,7 +276,7 @@ public:
CanBeInstanceMethod = true;
break;
}
-
+
assert(CanBeInstanceMethod || CanBeClassMethod);
Selector sel = Msg->getSelector();
@@ -304,7 +304,7 @@ public:
break;
}
}
-
+
if (isReceiver) {
ReceiverIFaceEnt = Entity::get(Cls, Prog);
break;
@@ -312,7 +312,7 @@ public:
}
}
}
-
+
virtual void Handle(TranslationUnit *TU) {
assert(TU && "Passed null translation unit");
ASTContext &Ctx = TU->getASTContext();
@@ -406,7 +406,7 @@ void Analyzer::FindDeclarations(Decl *D, TULocationHandler &Handler) {
Entity Ent = Entity::get(D, Prog);
if (Ent.isInvalid())
return;
-
+
DeclEntityAnalyzer DEA(Ent, Handler);
Idxer.GetTranslationUnitsFor(Ent, DEA);
}
@@ -423,7 +423,7 @@ void Analyzer::FindReferences(Decl *D, TULocationHandler &Handler) {
Entity Ent = Entity::get(D, Prog);
if (Ent.isInvalid())
return;
-
+
RefEntityAnalyzer REA(Ent, Handler);
Idxer.GetTranslationUnitsFor(Ent, REA);
}