Mercurial > hg > CbC > CbC_llvm
comparison clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp @ 173:0572611fdcc8 llvm10 llvm12
reorgnization done
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 11:55:54 +0900 |
parents | 1d019706d866 |
children | 2e18cbf3894f |
comparison
equal
deleted
inserted
replaced
172:9fbae9c8bf63 | 173:0572611fdcc8 |
---|---|
69 } | 69 } |
70 | 70 |
71 void MacroUsageCheck::registerPPCallbacks(const SourceManager &SM, | 71 void MacroUsageCheck::registerPPCallbacks(const SourceManager &SM, |
72 Preprocessor *PP, | 72 Preprocessor *PP, |
73 Preprocessor *ModuleExpanderPP) { | 73 Preprocessor *ModuleExpanderPP) { |
74 if (!getLangOpts().CPlusPlus11) | |
75 return; | |
76 | |
77 PP->addPPCallbacks(std::make_unique<MacroUsageCallbacks>( | 74 PP->addPPCallbacks(std::make_unique<MacroUsageCallbacks>( |
78 this, SM, AllowedRegexp, CheckCapsOnly, IgnoreCommandLineMacros)); | 75 this, SM, AllowedRegexp, CheckCapsOnly, IgnoreCommandLineMacros)); |
79 } | 76 } |
80 | 77 |
81 void MacroUsageCheck::warnMacro(const MacroDirective *MD, StringRef MacroName) { | 78 void MacroUsageCheck::warnMacro(const MacroDirective *MD, StringRef MacroName) { |