Lines Matching refs:Loc
22 SourceLocation Loc; member
39 void If(SourceLocation Loc, SourceRange ConditionRange, in If() argument
44 checkMacroRedundancy(Loc, Condition, IfStack, DK_If, DK_If, true); in If()
47 void Ifdef(SourceLocation Loc, const Token &MacroNameTok, in Ifdef() argument
50 checkMacroRedundancy(Loc, MacroName, IfdefStack, DK_Ifdef, DK_Ifdef, true); in Ifdef()
51 checkMacroRedundancy(Loc, MacroName, IfndefStack, DK_Ifdef, DK_Ifndef, in Ifdef()
55 void Ifndef(SourceLocation Loc, const Token &MacroNameTok, in Ifndef() argument
58 checkMacroRedundancy(Loc, MacroName, IfndefStack, DK_Ifndef, DK_Ifndef, in Ifndef()
60 checkMacroRedundancy(Loc, MacroName, IfdefStack, DK_Ifndef, DK_Ifdef, in Ifndef()
64 void Endif(SourceLocation Loc, SourceLocation IfLoc) override { in Endif() argument
65 if (!IfStack.empty() && IfLoc == IfStack.back().Loc) in Endif()
67 if (!IfdefStack.empty() && IfLoc == IfdefStack.back().Loc) in Endif()
69 if (!IfndefStack.empty() && IfLoc == IfndefStack.back().Loc) in Endif()
74 void checkMacroRedundancy(SourceLocation Loc, StringRef MacroName, in checkMacroRedundancy() argument
78 if (PP.getSourceManager().isInMainFile(Loc)) { in checkMacroRedundancy()
81 Check.diag(Loc, WarningDescription) << WarningKind; in checkMacroRedundancy()
82 Check.diag(Entry.Loc, NoteDescription, DiagnosticIDs::Note) in checkMacroRedundancy()
90 Stack.push_back({Loc, std::string(MacroName)}); in checkMacroRedundancy()