Lines Matching refs:SM

60                         const SourceManager &SM, const LangOptions &LangOpts,  in mergeFixits()  argument
62 edit::Commit commit(SM, LangOpts); in mergeFixits()
80 edit::EditedSource Editor(SM, LangOpts); in mergeFixits()
249 void DiagnosticRenderer::emitModuleBuildStack(const SourceManager &SM) { in emitModuleBuildStack() argument
250 ModuleBuildStack Stack = SM.getModuleBuildStack(); in emitModuleBuildStack()
264 bool IsBegin, const SourceManager *SM, in retrieveMacroLocation() argument
266 assert(SM->getFileID(Loc) == MacroFileID); in retrieveMacroLocation()
274 if (SM->isMacroArgExpansion(Loc)) { in retrieveMacroLocation()
280 CharSourceRange(SM->getImmediateSpellingLoc(Loc), IsTokenRange); in retrieveMacroLocation()
281 MacroArgRange = SM->getImmediateExpansionRange(Loc); in retrieveMacroLocation()
283 MacroRange = SM->getImmediateExpansionRange(Loc); in retrieveMacroLocation()
285 CharSourceRange(SM->getImmediateSpellingLoc(Loc), IsTokenRange); in retrieveMacroLocation()
291 MacroFileID = SM->getFileID(MacroLocation); in retrieveMacroLocation()
295 CommonArgExpansions, IsBegin, SM, TokenRange); in retrieveMacroLocation()
309 MacroFileID = SM->getFileID(MacroArgLocation); in retrieveMacroLocation()
311 CommonArgExpansions, IsBegin, SM, IsTokenRange); in retrieveMacroLocation()
318 bool IsBegin, const SourceManager *SM) { in getMacroArgExpansionFileIDs() argument
320 if (SM->isMacroArgExpansion(Loc)) { in getMacroArgExpansionFileIDs()
321 IDs.push_back(SM->getFileID(Loc)); in getMacroArgExpansionFileIDs()
322 Loc = SM->getImmediateSpellingLoc(Loc); in getMacroArgExpansionFileIDs()
324 auto ExpRange = SM->getImmediateExpansionRange(Loc); in getMacroArgExpansionFileIDs()
333 SourceLocation Begin, SourceLocation End, const SourceManager *SM, in computeCommonMacroArgExpansionFileIDs() argument
337 getMacroArgExpansionFileIDs(Begin, BeginArgExpansions, /*IsBegin=*/true, SM); in computeCommonMacroArgExpansionFileIDs()
338 getMacroArgExpansionFileIDs(End, EndArgExpansions, /*IsBegin=*/false, SM); in computeCommonMacroArgExpansionFileIDs()
361 const SourceManager *SM = &CaretLoc.getManager(); in mapDiagnosticRanges() local
370 FileID BeginFileID = SM->getFileID(Begin); in mapDiagnosticRanges()
371 FileID EndFileID = SM->getFileID(End); in mapDiagnosticRanges()
379 Begin = SM->getImmediateExpansionRange(Begin).getBegin(); in mapDiagnosticRanges()
380 BeginFileID = SM->getFileID(Begin); in mapDiagnosticRanges()
386 auto Exp = SM->getImmediateExpansionRange(End); in mapDiagnosticRanges()
389 EndFileID = SM->getFileID(End); in mapDiagnosticRanges()
406 computeCommonMacroArgExpansionFileIDs(Begin, End, SM, CommonArgExpansions); in mapDiagnosticRanges()
408 CommonArgExpansions, /*IsBegin=*/true, SM, in mapDiagnosticRanges()
411 CommonArgExpansions, /*IsBegin=*/false, SM, in mapDiagnosticRanges()
416 Begin = SM->getSpellingLoc(Begin); in mapDiagnosticRanges()
417 End = SM->getSpellingLoc(End); in mapDiagnosticRanges()
463 const SourceManager &SM, in checkLocForMacroArgExpansion() argument
466 if (SM.isMacroArgExpansion(Loc, &MacroLoc)) { in checkLocForMacroArgExpansion()
476 const SourceManager &SM, in checkRangeForMacroArgExpansion() argument
480 if (!checkLocForMacroArgExpansion(BegLoc, SM, ArgumentLoc)) in checkRangeForMacroArgExpansion()
485 return checkLocForMacroArgExpansion(BegLoc, SM, ArgumentLoc); in checkRangeForMacroArgExpansion()
537 const SourceManager &SM = Loc.getManager(); in emitMacroExpansions() local
546 if (SM.isMacroArgExpansion(L)) in emitMacroExpansions()
547 LocationStack.push_back(SM.getImmediateExpansionRange(L).getBegin()); in emitMacroExpansions()
551 if (checkRangesForMacroArgExpansion(FullSourceLoc(L, SM), Ranges)) in emitMacroExpansions()
554 L = SM.getImmediateMacroCallerLoc(L); in emitMacroExpansions()
560 L = SM.getImmediateMacroCallerLoc(LocationStack.back()); in emitMacroExpansions()
572 emitSingleMacroExpansion(FullSourceLoc(*I, SM), Level, Ranges); in emitMacroExpansions()
582 emitSingleMacroExpansion(FullSourceLoc(*I, SM), Level, Ranges); in emitMacroExpansions()
594 emitSingleMacroExpansion(FullSourceLoc(*I, SM), Level, Ranges); in emitMacroExpansions()