Lines Matching refs:SM
53 const SourceManager &SM) { in isReplaceableRange() argument
54 return SM.isWrittenInSameFile(StartLoc, EndLoc); in isReplaceableRange()
60 void replaceWithNullptr(ClangTidyCheck &Check, SourceManager &SM, in replaceWithNullptr() argument
67 bool NeedsSpace = isAlphanumeric(*SM.getCharacterData(PreviousLocation)); in replaceWithNullptr()
79 StringRef getOutermostMacroName(SourceLocation Loc, const SourceManager &SM, in getOutermostMacroName() argument
86 Loc = SM.getImmediateMacroCallerLoc(Loc); in getOutermostMacroName()
89 return Lexer::getImmediateMacroName(OutermostMacroLoc, SM, LO); in getOutermostMacroName()
97 MacroArgUsageVisitor(SourceLocation CastLoc, const SourceManager &SM) in MacroArgUsageVisitor() argument
98 : CastLoc(CastLoc), SM(SM), Visited(false), CastFound(false), in MacroArgUsageVisitor()
129 if (SM.getFileLoc(S->getBeginLoc()) != CastLoc) in VisitStmt()
155 const SourceManager &SM; member in clang::tidy::modernize::__anonf9331d6d0111::MacroArgUsageVisitor
177 : SM(Context.getSourceManager()), Context(Context), in CastSequenceVisitor()
226 if (SM.isMacroArgExpansion(StartLoc) && SM.isMacroArgExpansion(EndLoc)) { in VisitStmt()
227 SourceLocation FileLocStart = SM.getFileLoc(StartLoc), in VisitStmt()
228 FileLocEnd = SM.getFileLoc(EndLoc); in VisitStmt()
235 if (isReplaceableRange(FileLocStart, FileLocEnd, SM) && in VisitStmt()
237 replaceWithNullptr(Check, SM, FileLocStart, FileLocEnd); in VisitStmt()
242 if (SM.isMacroBodyExpansion(StartLoc) && SM.isMacroBodyExpansion(EndLoc)) { in VisitStmt()
244 getOutermostMacroName(StartLoc, SM, Context.getLangOpts()); in VisitStmt()
250 StartLoc = SM.getFileLoc(StartLoc); in VisitStmt()
251 EndLoc = SM.getFileLoc(EndLoc); in VisitStmt()
254 if (!isReplaceableRange(StartLoc, EndLoc, SM)) { in VisitStmt()
257 replaceWithNullptr(Check, SM, StartLoc, EndLoc); in VisitStmt()
291 MacroArgUsageVisitor ArgUsageVisitor(SM.getFileLoc(CastLoc), SM); in allArgUsesValid()
318 std::pair<FileID, unsigned> LocInfo = SM.getDecomposedLoc(ArgLoc); in getMacroAndArgLocations()
319 const SrcMgr::SLocEntry *E = &SM.getSLocEntry(LocInfo.first); in getMacroAndArgLocations()
329 Lexer::getImmediateMacroName(OldArgLoc, SM, Context.getLangOpts()); in getMacroAndArgLocations()
333 MacroLoc = SM.getExpansionRange(ArgLoc).getBegin(); in getMacroAndArgLocations()
341 FileID MacroFID = SM.getFileID(MacroLoc); in getMacroAndArgLocations()
342 if (SM.isInFileID(ArgLoc, MacroFID)) { in getMacroAndArgLocations()
371 std::pair<FileID, unsigned> LocInfo = SM.getDecomposedLoc(Loc); in expandsFrom()
372 const SrcMgr::SLocEntry *E = &SM.getSLocEntry(LocInfo.first); in expandsFrom()
388 MacroLoc = SM.getImmediateExpansionRange(Loc).getBegin(); in expandsFrom()
457 SourceManager &SM; member in clang::tidy::modernize::__anonf9331d6d0111::CastSequenceVisitor