Home
last modified time | relevance | path

Searched refs:MacroNameTok (Results 1 – 25 of 54) sorted by relevance

123

/external/llvm-project/clang-tools-extra/clang-include-fixer/find-all-symbols/
DFindAllMacros.cpp24 FindAllMacros::CreateMacroSymbol(const Token &MacroNameTok, in CreateMacroSymbol() argument
30 return SymbolInfo(MacroNameTok.getIdentifierInfo()->getName(), in CreateMacroSymbol()
34 void FindAllMacros::MacroDefined(const Token &MacroNameTok, in MacroDefined() argument
36 if (auto Symbol = CreateMacroSymbol(MacroNameTok, MD->getMacroInfo())) in MacroDefined()
47 void FindAllMacros::MacroExpands(const Token &MacroNameTok, in MacroExpands() argument
50 MacroUsed(MacroNameTok, MD); in MacroExpands()
53 void FindAllMacros::Ifdef(SourceLocation Loc, const Token &MacroNameTok, in Ifdef() argument
55 MacroUsed(MacroNameTok, MD); in Ifdef()
58 void FindAllMacros::Ifndef(SourceLocation Loc, const Token &MacroNameTok, in Ifndef() argument
60 MacroUsed(MacroNameTok, MD); in Ifndef()
DFindAllMacros.h32 void MacroDefined(const Token &MacroNameTok,
35 void MacroExpands(const Token &MacroNameTok, const MacroDefinition &MD,
38 void Ifdef(SourceLocation Loc, const Token &MacroNameTok,
41 void Ifndef(SourceLocation Loc, const Token &MacroNameTok,
47 llvm::Optional<SymbolInfo> CreateMacroSymbol(const Token &MacroNameTok,
/external/clang/include/clang/Lex/
DPPCallbacks.h242 virtual void MacroExpands(const Token &MacroNameTok, in MacroExpands() argument
247 virtual void MacroDefined(const Token &MacroNameTok, in MacroDefined() argument
254 virtual void MacroUndefined(const Token &MacroNameTok, in MacroUndefined() argument
260 virtual void Defined(const Token &MacroNameTok, const MacroDefinition &MD, in Defined() argument
298 virtual void Ifdef(SourceLocation Loc, const Token &MacroNameTok, in Ifdef() argument
306 virtual void Ifndef(SourceLocation Loc, const Token &MacroNameTok, in Ifndef() argument
438 void MacroExpands(const Token &MacroNameTok, const MacroDefinition &MD, in MacroExpands() argument
440 First->MacroExpands(MacroNameTok, MD, Range, Args); in MacroExpands()
441 Second->MacroExpands(MacroNameTok, MD, Range, Args); in MacroExpands()
444 void MacroDefined(const Token &MacroNameTok, const MacroDirective *MD) override { in MacroDefined() argument
[all …]
/external/llvm-project/clang/include/clang/Lex/
DPPCallbacks.h281 virtual void MacroExpands(const Token &MacroNameTok, in MacroExpands() argument
286 virtual void MacroDefined(const Token &MacroNameTok, in MacroDefined() argument
296 virtual void MacroUndefined(const Token &MacroNameTok, in MacroUndefined() argument
303 virtual void Defined(const Token &MacroNameTok, const MacroDefinition &MD, in Defined() argument
350 virtual void Ifdef(SourceLocation Loc, const Token &MacroNameTok, in Ifdef() argument
358 virtual void Ifndef(SourceLocation Loc, const Token &MacroNameTok, in Ifndef() argument
538 void MacroExpands(const Token &MacroNameTok, const MacroDefinition &MD, in MacroExpands() argument
540 First->MacroExpands(MacroNameTok, MD, Range, Args); in MacroExpands()
541 Second->MacroExpands(MacroNameTok, MD, Range, Args); in MacroExpands()
544 void MacroDefined(const Token &MacroNameTok, in MacroDefined() argument
[all …]
/external/llvm-project/clang-tools-extra/clang-tidy/google/
DUpgradeGoogletestCaseCheck.cpp51 void MacroExpands(const Token &MacroNameTok, const MacroDefinition &MD, in MacroExpands() argument
53 macroUsed(MacroNameTok, MD, Range.getBegin(), CheckAction::Rename); in MacroExpands()
56 void MacroUndefined(const Token &MacroNameTok, const MacroDefinition &MD, in MacroUndefined() argument
59 macroUsed(MacroNameTok, MD, Undef->getLocation(), CheckAction::Warn); in MacroUndefined()
62 void MacroDefined(const Token &MacroNameTok, in MacroDefined() argument
71 PP->getSpelling(MacroNameTok) == "TYPED_TEST_SUITE"; in MacroDefined()
75 void Defined(const Token &MacroNameTok, const MacroDefinition &MD, in Defined() argument
77 macroUsed(MacroNameTok, MD, Range.getBegin(), CheckAction::Warn); in Defined()
80 void Ifdef(SourceLocation Loc, const Token &MacroNameTok, in Ifdef() argument
82 macroUsed(MacroNameTok, MD, Loc, CheckAction::Warn); in Ifdef()
[all …]
/external/clang/lib/Lex/
DPPDirectives.cpp222 bool Preprocessor::CheckMacroName(Token &MacroNameTok, MacroUse isDefineUndef, in CheckMacroName() argument
225 if (MacroNameTok.is(tok::eod)) in CheckMacroName()
226 return Diag(MacroNameTok, diag::err_pp_missing_macro_name); in CheckMacroName()
228 IdentifierInfo *II = MacroNameTok.getIdentifierInfo(); in CheckMacroName()
231 std::string Spelling = getSpelling(MacroNameTok, &Invalid); in CheckMacroName()
233 return Diag(MacroNameTok, diag::err_pp_macro_not_identifier); in CheckMacroName()
237 return Diag(MacroNameTok, diag::err_pp_macro_not_identifier); in CheckMacroName()
241 Diag(MacroNameTok, getLangOpts().MicrosoftExt in CheckMacroName()
244 << II << MacroNameTok.getKind(); in CheckMacroName()
248 MacroNameTok.setIdentifierInfo(II); in CheckMacroName()
[all …]
DPreprocessingRecord.cpp383 void PreprocessingRecord::Ifdef(SourceLocation Loc, const Token &MacroNameTok, in Ifdef() argument
387 addMacroExpansion(MacroNameTok, MD.getMacroInfo(), in Ifdef()
388 MacroNameTok.getLocation()); in Ifdef()
391 void PreprocessingRecord::Ifndef(SourceLocation Loc, const Token &MacroNameTok, in Ifndef() argument
395 addMacroExpansion(MacroNameTok, MD.getMacroInfo(), in Ifndef()
396 MacroNameTok.getLocation()); in Ifndef()
399 void PreprocessingRecord::Defined(const Token &MacroNameTok, in Defined() argument
404 addMacroExpansion(MacroNameTok, MD.getMacroInfo(), in Defined()
405 MacroNameTok.getLocation()); in Defined()
/external/llvm-project/clang-tools-extra/clangd/
DCollectMacros.cpp16 void CollectMainFileMacros::add(const Token &MacroNameTok, in add() argument
20 auto Loc = MacroNameTok.getLocation(); in add()
24 auto Name = MacroNameTok.getIdentifierInfo()->getName(); in add()
27 SM, CharSourceRange::getCharRange(Loc, MacroNameTok.getEndLoc())); in add()
/external/llvm-project/clang/lib/Lex/
DPPDirectives.cpp240 bool Preprocessor::CheckMacroName(Token &MacroNameTok, MacroUse isDefineUndef, in CheckMacroName() argument
243 if (MacroNameTok.is(tok::eod)) in CheckMacroName()
244 return Diag(MacroNameTok, diag::err_pp_missing_macro_name); in CheckMacroName()
246 IdentifierInfo *II = MacroNameTok.getIdentifierInfo(); in CheckMacroName()
248 return Diag(MacroNameTok, diag::err_pp_macro_not_identifier); in CheckMacroName()
253 Diag(MacroNameTok, getLangOpts().MicrosoftExt in CheckMacroName()
256 << II << MacroNameTok.getKind(); in CheckMacroName()
263 return Diag(MacroNameTok, diag::err_defined_macro_name); in CheckMacroName()
271 Diag(MacroNameTok, diag::ext_pp_undef_builtin_macro); in CheckMacroName()
277 SourceLocation MacroNameLoc = MacroNameTok.getLocation(); in CheckMacroName()
[all …]
DPreprocessingRecord.cpp406 void PreprocessingRecord::Ifdef(SourceLocation Loc, const Token &MacroNameTok, in Ifdef() argument
410 addMacroExpansion(MacroNameTok, MD.getMacroInfo(), in Ifdef()
411 MacroNameTok.getLocation()); in Ifdef()
414 void PreprocessingRecord::Ifndef(SourceLocation Loc, const Token &MacroNameTok, in Ifndef() argument
418 addMacroExpansion(MacroNameTok, MD.getMacroInfo(), in Ifndef()
419 MacroNameTok.getLocation()); in Ifndef()
422 void PreprocessingRecord::Defined(const Token &MacroNameTok, in Defined() argument
427 addMacroExpansion(MacroNameTok, MD.getMacroInfo(), in Defined()
428 MacroNameTok.getLocation()); in Defined()
/external/llvm-project/clang/lib/CodeGen/
DMacroPPCallbacks.cpp178 void MacroPPCallbacks::MacroDefined(const Token &MacroNameTok, in MacroDefined() argument
180 IdentifierInfo *Id = MacroNameTok.getIdentifierInfo(); in MacroDefined()
181 SourceLocation location = getCorrectLocation(MacroNameTok.getLocation()); in MacroDefined()
191 void MacroPPCallbacks::MacroUndefined(const Token &MacroNameTok, in MacroUndefined() argument
194 IdentifierInfo *Id = MacroNameTok.getIdentifierInfo(); in MacroUndefined()
195 SourceLocation location = getCorrectLocation(MacroNameTok.getLocation()); in MacroUndefined()
DMacroPPCallbacks.h110 void MacroDefined(const Token &MacroNameTok,
116 void MacroUndefined(const Token &MacroNameTok, const MacroDefinition &MD,
/external/llvm-project/clang-tools-extra/clang-tidy/utils/
DRenamerClangTidyCheck.cpp74 void MacroDefined(const Token &MacroNameTok, in MacroDefined() argument
79 MacroNameTok.getLocation())) in MacroDefined()
82 MacroNameTok.getLocation())) in MacroDefined()
84 Check->checkMacro(PP->getSourceManager(), MacroNameTok, MD->getMacroInfo()); in MacroDefined()
88 void MacroExpands(const Token &MacroNameTok, const MacroDefinition &MD, in MacroExpands() argument
91 Check->expandMacro(MacroNameTok, MD.getMacroInfo()); in MacroExpands()
477 const Token &MacroNameTok, in checkMacro() argument
480 GetMacroFailureInfo(MacroNameTok, SourceMgr); in checkMacro()
484 StringRef Name = MacroNameTok.getIdentifierInfo()->getName(); in checkMacro()
487 SourceRange Range(MacroNameTok.getLocation(), MacroNameTok.getEndLoc()); in checkMacro()
[all …]
DRenamerClangTidyCheck.h112 void checkMacro(SourceManager &sourceMgr, const Token &MacroNameTok,
116 void expandMacro(const Token &MacroNameTok, const MacroInfo *MI);
135 GetMacroFailureInfo(const Token &MacroNameTok,
DHeaderGuard.cpp47 void Ifndef(SourceLocation Loc, const Token &MacroNameTok, in Ifndef() argument
53 Ifndefs[MacroNameTok.getIdentifierInfo()] = in Ifndef()
54 std::make_pair(Loc, MacroNameTok.getLocation()); in Ifndef()
57 void MacroDefined(const Token &MacroNameTok, in MacroDefined() argument
61 Macros.emplace_back(MacroNameTok, MD->getMacroInfo()); in MacroDefined()
/external/llvm-project/clang/lib/Index/
DIndexingAction.cpp33 void MacroExpands(const Token &MacroNameTok, const MacroDefinition &MD, in MacroExpands() argument
35 IndexCtx->handleMacroReference(*MacroNameTok.getIdentifierInfo(), in MacroExpands()
39 void MacroDefined(const Token &MacroNameTok, in MacroDefined() argument
41 IndexCtx->handleMacroDefined(*MacroNameTok.getIdentifierInfo(), in MacroDefined()
42 MacroNameTok.getLocation(), in MacroDefined()
46 void MacroUndefined(const Token &MacroNameTok, const MacroDefinition &MD, in MacroUndefined() argument
50 IndexCtx->handleMacroUndefined(*MacroNameTok.getIdentifierInfo(), in MacroUndefined()
51 MacroNameTok.getLocation(), in MacroUndefined()
/external/llvm-project/clang-tools-extra/clang-tidy/bugprone/
DMacroParenthesesCheck.cpp24 void MacroDefined(const Token &MacroNameTok, in MacroDefined() argument
26 replacementList(MacroNameTok, MD->getMacroInfo()); in MacroDefined()
27 argument(MacroNameTok, MD->getMacroInfo()); in MacroDefined()
32 void replacementList(const Token &MacroNameTok, const MacroInfo *MI);
35 void argument(const Token &MacroNameTok, const MacroInfo *MI);
103 void MacroParenthesesPPCallbacks::replacementList(const Token &MacroNameTok, in replacementList() argument
155 void MacroParenthesesPPCallbacks::argument(const Token &MacroNameTok, in argument() argument
DMacroRepeatedSideEffectsCheck.cpp26 void MacroExpands(const Token &MacroNameTok, const MacroDefinition &MD,
40 void MacroRepeatedPPCallbacks::MacroExpands(const Token &MacroNameTok, in MacroExpands() argument
73 << MacroNameTok.getIdentifierInfo(); in MacroExpands()
/external/llvm-project/clang-tools-extra/pp-trace/
DPPCallbacksTracker.cpp319 void PPCallbacksTracker::MacroExpands(const Token &MacroNameTok, in MacroExpands() argument
324 appendArgument("MacroNameTok", MacroNameTok); in MacroExpands()
331 void PPCallbacksTracker::MacroDefined(const Token &MacroNameTok, in MacroDefined() argument
334 appendArgument("MacroNameTok", MacroNameTok); in MacroDefined()
339 void PPCallbacksTracker::MacroUndefined(const Token &MacroNameTok, in MacroUndefined() argument
343 appendArgument("MacroNameTok", MacroNameTok); in MacroUndefined()
348 void PPCallbacksTracker::Defined(const Token &MacroNameTok, in Defined() argument
352 appendArgument("MacroNameTok", MacroNameTok); in Defined()
385 void PPCallbacksTracker::Ifdef(SourceLocation Loc, const Token &MacroNameTok, in Ifdef() argument
389 appendArgument("MacroNameTok", MacroNameTok); in Ifdef()
[all …]
DPPCallbacksTracker.h130 void MacroExpands(const Token &MacroNameTok, const MacroDefinition &MD,
132 void MacroDefined(const Token &MacroNameTok,
134 void MacroUndefined(const Token &MacroNameTok, const MacroDefinition &MD,
136 void Defined(const Token &MacroNameTok, const MacroDefinition &MD,
143 void Ifdef(SourceLocation Loc, const Token &MacroNameTok,
145 void Ifndef(SourceLocation Loc, const Token &MacroNameTok,
/external/llvm-project/clang-tools-extra/clang-tidy/readability/
DRedundantPreprocessorCheck.cpp46 void Ifdef(SourceLocation Loc, const Token &MacroNameTok, in Ifdef() argument
48 std::string MacroName = PP.getSpelling(MacroNameTok); in Ifdef()
54 void Ifndef(SourceLocation Loc, const Token &MacroNameTok, in Ifndef() argument
56 std::string MacroName = PP.getSpelling(MacroNameTok); in Ifndef()
/external/llvm-project/clang-tools-extra/clang-tidy/modernize/
DReplaceDisallowCopyAndAssignMacroCheck.cpp28 void MacroExpands(const Token &MacroNameTok, const MacroDefinition &MD, in MacroExpands() argument
30 IdentifierInfo *Info = MacroNameTok.getIdentifierInfo(); in MacroExpands()
51 Check.diag(MacroNameTok.getLocation(), in MacroExpands()
/external/llvm-project/clang-tools-extra/clang-tidy/cert/
DSetLongJmpCheck.cpp32 void MacroExpands(const Token &MacroNameTok, const MacroDefinition &MD, in MacroExpands() argument
34 const auto *II = MacroNameTok.getIdentifierInfo(); in MacroExpands()
/external/llvm-project/clang-tools-extra/clang-tidy/
DExpandModularHeadersPPCallbacks.h102 void MacroExpands(const Token &MacroNameTok, const MacroDefinition &,
104 void MacroDefined(const Token &MacroNameTok,
108 void Defined(const Token &MacroNameTok, const MacroDefinition &,
/external/clang/unittests/Basic/
DSourceManagerTest.cpp263 void MacroDefined(const Token &MacroNameTok, in MacroDefined() argument
266 MacroNameTok.getIdentifierInfo()->getName(), in MacroDefined()
269 void MacroExpands(const Token &MacroNameTok, const MacroDefinition &MD, in MacroExpands() argument
271 Macros.push_back(MacroAction(MacroNameTok.getLocation(), in MacroExpands()
272 MacroNameTok.getIdentifierInfo()->getName(), in MacroExpands()

123