summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/modularize/PreprocessorTracker.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2015-04-11 07:59:33 +0000
committerAlexander Kornienko <alexfh@google.com>2015-04-11 07:59:33 +0000
commit87638f6345a931dd0a9d8c5fb35089593b1cc4f9 (patch)
tree7dce971f20d9170d23b97b6259e2ce9d58f492bb /clang-tools-extra/modularize/PreprocessorTracker.cpp
parentd829812f6591bbb07c9ce0803b2e91e4cc54b4c7 (diff)
downloadbcm5719-llvm-87638f6345a931dd0a9d8c5fb35089593b1cc4f9.tar.gz
bcm5719-llvm-87638f6345a931dd0a9d8c5fb35089593b1cc4f9.zip
Use 'override/final' instead of 'virtual' for overridden methods
Summary: The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix svn diff | clang-format-diff -i Reviewers: dblaikie Reviewed By: dblaikie Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8927 llvm-svn: 234681
Diffstat (limited to 'clang-tools-extra/modularize/PreprocessorTracker.cpp')
-rw-r--r--clang-tools-extra/modularize/PreprocessorTracker.cpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/clang-tools-extra/modularize/PreprocessorTracker.cpp b/clang-tools-extra/modularize/PreprocessorTracker.cpp
index c48f27e0e01..bc348c9c29e 100644
--- a/clang-tools-extra/modularize/PreprocessorTracker.cpp
+++ b/clang-tools-extra/modularize/PreprocessorTracker.cpp
@@ -747,7 +747,7 @@ public:
PreprocessorCallbacks(PreprocessorTrackerImpl &ppTracker,
clang::Preprocessor &PP, llvm::StringRef rootHeaderFile)
: PPTracker(ppTracker), PP(PP), RootHeaderFile(rootHeaderFile) {}
- ~PreprocessorCallbacks() {}
+ ~PreprocessorCallbacks() override {}
// Overridden handlers.
void InclusionDirective(clang::SourceLocation HashLoc,
@@ -757,24 +757,26 @@ public:
const clang::FileEntry *File,
llvm::StringRef SearchPath,
llvm::StringRef RelativePath,
- const clang::Module *Imported);
+ const clang::Module *Imported) override;
void FileChanged(clang::SourceLocation Loc,
clang::PPCallbacks::FileChangeReason Reason,
clang::SrcMgr::CharacteristicKind FileType,
- clang::FileID PrevFID = clang::FileID());
+ clang::FileID PrevFID = clang::FileID()) override;
void MacroExpands(const clang::Token &MacroNameTok,
const clang::MacroDirective *MD, clang::SourceRange Range,
- const clang::MacroArgs *Args);
+ const clang::MacroArgs *Args) override;
void Defined(const clang::Token &MacroNameTok,
- const clang::MacroDirective *MD, clang::SourceRange Range);
+ const clang::MacroDirective *MD,
+ clang::SourceRange Range) override;
void If(clang::SourceLocation Loc, clang::SourceRange ConditionRange,
- clang::PPCallbacks::ConditionValueKind ConditionResult);
+ clang::PPCallbacks::ConditionValueKind ConditionResult) override;
void Elif(clang::SourceLocation Loc, clang::SourceRange ConditionRange,
- clang::PPCallbacks::ConditionValueKind ConditionResult, clang::SourceLocation IfLoc);
+ clang::PPCallbacks::ConditionValueKind ConditionResult,
+ clang::SourceLocation IfLoc) override;
void Ifdef(clang::SourceLocation Loc, const clang::Token &MacroNameTok,
- const clang::MacroDirective *MD);
+ const clang::MacroDirective *MD) override;
void Ifndef(clang::SourceLocation Loc, const clang::Token &MacroNameTok,
- const clang::MacroDirective *MD);
+ const clang::MacroDirective *MD) override;
private:
PreprocessorTrackerImpl &PPTracker;
@@ -811,11 +813,11 @@ public:
}
}
- ~PreprocessorTrackerImpl() {}
+ ~PreprocessorTrackerImpl() override {}
// Handle entering a preprocessing session.
void handlePreprocessorEntry(clang::Preprocessor &PP,
- llvm::StringRef rootHeaderFile) {
+ llvm::StringRef rootHeaderFile) override {
HeadersInThisCompile.clear();
assert((HeaderStack.size() == 0) && "Header stack should be empty.");
pushHeaderHandle(addHeader(rootHeaderFile));
@@ -823,14 +825,15 @@ public:
rootHeaderFile));
}
// Handle exiting a preprocessing session.
- void handlePreprocessorExit() { HeaderStack.clear(); }
+ void handlePreprocessorExit() override { HeaderStack.clear(); }
// Handle include directive.
// This function is called every time an include directive is seen by the
// preprocessor, for the purpose of later checking for 'extern "" {}' or
// "namespace {}" blocks containing #include directives.
void handleIncludeDirective(llvm::StringRef DirectivePath, int DirectiveLine,
- int DirectiveColumn, llvm::StringRef TargetPath) {
+ int DirectiveColumn,
+ llvm::StringRef TargetPath) override {
// If it's not a header in the header list, ignore it with respect to
// the check.
if (BlockCheckHeaderListOnly && !isHeaderListHeader(TargetPath))
@@ -855,7 +858,7 @@ public:
bool checkForIncludesInBlock(clang::Preprocessor &PP,
clang::SourceRange BlockSourceRange,
const char *BlockIdentifierMessage,
- llvm::raw_ostream &OS) {
+ llvm::raw_ostream &OS) override {
clang::SourceLocation BlockStartLoc = BlockSourceRange.getBegin();
clang::SourceLocation BlockEndLoc = BlockSourceRange.getEnd();
// Use block location to get FileID of both the include directive
@@ -1139,7 +1142,7 @@ public:
// Report on inconsistent macro instances.
// Returns true if any mismatches.
- bool reportInconsistentMacros(llvm::raw_ostream &OS) {
+ bool reportInconsistentMacros(llvm::raw_ostream &OS) override {
bool ReturnValue = false;
// Walk all the macro expansion trackers in the map.
for (MacroExpansionMapIter I = MacroExpansions.begin(),
@@ -1200,7 +1203,7 @@ public:
// Report on inconsistent conditional instances.
// Returns true if any mismatches.
- bool reportInconsistentConditionals(llvm::raw_ostream &OS) {
+ bool reportInconsistentConditionals(llvm::raw_ostream &OS) override {
bool ReturnValue = false;
// Walk all the conditional trackers in the map.
for (ConditionalExpansionMapIter I = ConditionalExpansions.begin(),
OpenPOWER on IntegriCloud