Lines Matching refs:Loc
22 SourceLocation Loc; member
38 void If(SourceLocation Loc, SourceRange ConditionRange, in If() argument
43 CheckMacroRedundancy(Loc, Condition, IfStack, DK_If, DK_If, true); in If()
46 void Ifdef(SourceLocation Loc, const Token &MacroNameTok, in Ifdef() argument
49 CheckMacroRedundancy(Loc, MacroName, IfdefStack, DK_Ifdef, DK_Ifdef, true); in Ifdef()
50 CheckMacroRedundancy(Loc, MacroName, IfndefStack, DK_Ifdef, DK_Ifndef, in Ifdef()
54 void Ifndef(SourceLocation Loc, const Token &MacroNameTok, in Ifndef() argument
57 CheckMacroRedundancy(Loc, MacroName, IfndefStack, DK_Ifndef, DK_Ifndef, in Ifndef()
59 CheckMacroRedundancy(Loc, MacroName, IfdefStack, DK_Ifndef, DK_Ifdef, in Ifndef()
63 void Endif(SourceLocation Loc, SourceLocation IfLoc) override { in Endif() argument
64 if (!IfStack.empty() && IfLoc == IfStack.back().Loc) in Endif()
66 if (!IfdefStack.empty() && IfLoc == IfdefStack.back().Loc) in Endif()
68 if (!IfndefStack.empty() && IfLoc == IfndefStack.back().Loc) in Endif()
73 void CheckMacroRedundancy(SourceLocation Loc, StringRef MacroName, in CheckMacroRedundancy() argument
77 if (PP.getSourceManager().isInMainFile(Loc)) { in CheckMacroRedundancy()
80 Check.diag(Loc, WarningDescription) << WarningKind; in CheckMacroRedundancy()
81 Check.diag(Entry.Loc, NoteDescription, DiagnosticIDs::Note) in CheckMacroRedundancy()
89 Stack.push_back({Loc, std::string(MacroName)}); in CheckMacroRedundancy()