class NestedNameSpecifierLocFinder : public MatchFinder::MatchCallback {
public:
explicit NestedNameSpecifierLocFinder(ASTContext &Context)
- : Context(Context) {}
+ : Context(Context) {}
std::vector<NestedNameSpecifierLoc> getNestedNameSpecifierLocations() {
addMatchers();
}
virtual void run(const MatchFinder::MatchResult &Result) {
- const auto *NNS =
- Result.Nodes.getNodeAs<NestedNameSpecifierLoc>("nestedNameSpecifierLoc");
+ const auto *NNS = Result.Nodes.getNodeAs<NestedNameSpecifierLoc>(
+ "nestedNameSpecifierLoc");
Locations.push_back(*NNS);
}
std::vector<NestedNameSpecifierLoc> Locations;
MatchFinder Finder;
};
-
}
}
#include <set>
#include <vector>
-
using namespace llvm;
namespace clang {
class AdditionalUSRFinder : public RecursiveASTVisitor<AdditionalUSRFinder> {
public:
explicit AdditionalUSRFinder(const Decl *FoundDecl, ASTContext &Context,
- std::vector<std::string> *USRs)
- : FoundDecl(FoundDecl), Context(Context), USRs(USRs) {}
+ std::vector<std::string> *USRs)
+ : FoundDecl(FoundDecl), Context(Context), USRs(USRs) {}
void Find() {
// Fill OverriddenMethods and PartialSpecs storages.
} else if (const auto *RecordDecl = dyn_cast<CXXRecordDecl>(FoundDecl)) {
handleCXXRecordDecl(RecordDecl);
} else if (const auto *TemplateDecl =
- dyn_cast<ClassTemplateDecl>(FoundDecl)) {
+ dyn_cast<ClassTemplateDecl>(FoundDecl)) {
handleClassTemplateDecl(TemplateDecl);
} else {
USRSet.insert(getUSRForDecl(FoundDecl));
private:
void handleCXXRecordDecl(const CXXRecordDecl *RecordDecl) {
RecordDecl = RecordDecl->getDefinition();
- if (const auto *ClassTemplateSpecDecl
- = dyn_cast<ClassTemplateSpecializationDecl>(RecordDecl)) {
+ if (const auto *ClassTemplateSpecDecl =
+ dyn_cast<ClassTemplateSpecializationDecl>(RecordDecl)) {
handleClassTemplateDecl(ClassTemplateSpecDecl->getSpecializedTemplate());
}
addUSRsOfCtorDtors(RecordDecl);
ASTContext &Context;
std::vector<std::string> *USRs;
std::set<std::string> USRSet;
- std::vector<const CXXMethodDecl*> OverriddenMethods;
- std::vector<const ClassTemplatePartialSpecializationDecl*> PartialSpecs;
+ std::vector<const CXXMethodDecl *> OverriddenMethods;
+ std::vector<const ClassTemplatePartialSpecializationDecl *> PartialSpecs;
};
} // namespace