Lines Matching refs:SM
59 const SourceManager &SM, const LangOptions &LangOpts, in mergeFixits() argument
61 edit::Commit commit(SM, LangOpts); in mergeFixits()
79 edit::EditedSource Editor(SM, LangOpts); in mergeFixits()
248 void DiagnosticRenderer::emitModuleBuildStack(const SourceManager &SM) { in emitModuleBuildStack() argument
249 ModuleBuildStack Stack = SM.getModuleBuildStack(); in emitModuleBuildStack()
263 bool IsBegin, const SourceManager *SM, in retrieveMacroLocation() argument
265 assert(SM->getFileID(Loc) == MacroFileID); in retrieveMacroLocation()
273 if (SM->isMacroArgExpansion(Loc)) { in retrieveMacroLocation()
279 CharSourceRange(SM->getImmediateSpellingLoc(Loc), IsTokenRange); in retrieveMacroLocation()
280 MacroArgRange = SM->getImmediateExpansionRange(Loc); in retrieveMacroLocation()
282 MacroRange = SM->getImmediateExpansionRange(Loc); in retrieveMacroLocation()
284 CharSourceRange(SM->getImmediateSpellingLoc(Loc), IsTokenRange); in retrieveMacroLocation()
290 MacroFileID = SM->getFileID(MacroLocation); in retrieveMacroLocation()
294 CommonArgExpansions, IsBegin, SM, TokenRange); in retrieveMacroLocation()
308 MacroFileID = SM->getFileID(MacroArgLocation); in retrieveMacroLocation()
310 CommonArgExpansions, IsBegin, SM, IsTokenRange); in retrieveMacroLocation()
317 bool IsBegin, const SourceManager *SM) { in getMacroArgExpansionFileIDs() argument
319 if (SM->isMacroArgExpansion(Loc)) { in getMacroArgExpansionFileIDs()
320 IDs.push_back(SM->getFileID(Loc)); in getMacroArgExpansionFileIDs()
321 Loc = SM->getImmediateSpellingLoc(Loc); in getMacroArgExpansionFileIDs()
323 auto ExpRange = SM->getImmediateExpansionRange(Loc); in getMacroArgExpansionFileIDs()
332 SourceLocation Begin, SourceLocation End, const SourceManager *SM, in computeCommonMacroArgExpansionFileIDs() argument
336 getMacroArgExpansionFileIDs(Begin, BeginArgExpansions, /*IsBegin=*/true, SM); in computeCommonMacroArgExpansionFileIDs()
337 getMacroArgExpansionFileIDs(End, EndArgExpansions, /*IsBegin=*/false, SM); in computeCommonMacroArgExpansionFileIDs()
360 const SourceManager *SM = &CaretLoc.getManager(); in mapDiagnosticRanges() local
369 FileID BeginFileID = SM->getFileID(Begin); in mapDiagnosticRanges()
370 FileID EndFileID = SM->getFileID(End); in mapDiagnosticRanges()
378 Begin = SM->getImmediateExpansionRange(Begin).getBegin(); in mapDiagnosticRanges()
379 BeginFileID = SM->getFileID(Begin); in mapDiagnosticRanges()
385 auto Exp = SM->getImmediateExpansionRange(End); in mapDiagnosticRanges()
388 EndFileID = SM->getFileID(End); in mapDiagnosticRanges()
405 computeCommonMacroArgExpansionFileIDs(Begin, End, SM, CommonArgExpansions); in mapDiagnosticRanges()
407 CommonArgExpansions, /*IsBegin=*/true, SM, in mapDiagnosticRanges()
410 CommonArgExpansions, /*IsBegin=*/false, SM, in mapDiagnosticRanges()
415 Begin = SM->getSpellingLoc(Begin); in mapDiagnosticRanges()
416 End = SM->getSpellingLoc(End); in mapDiagnosticRanges()
462 const SourceManager &SM, in checkLocForMacroArgExpansion() argument
465 if (SM.isMacroArgExpansion(Loc, &MacroLoc)) { in checkLocForMacroArgExpansion()
475 const SourceManager &SM, in checkRangeForMacroArgExpansion() argument
479 if (!checkLocForMacroArgExpansion(BegLoc, SM, ArgumentLoc)) in checkRangeForMacroArgExpansion()
484 return checkLocForMacroArgExpansion(BegLoc, SM, ArgumentLoc); in checkRangeForMacroArgExpansion()
536 const SourceManager &SM = Loc.getManager(); in emitMacroExpansions() local
545 if (SM.isMacroArgExpansion(L)) in emitMacroExpansions()
546 LocationStack.push_back(SM.getImmediateExpansionRange(L).getBegin()); in emitMacroExpansions()
550 if (checkRangesForMacroArgExpansion(FullSourceLoc(L, SM), Ranges)) in emitMacroExpansions()
553 L = SM.getImmediateMacroCallerLoc(L); in emitMacroExpansions()
559 L = SM.getImmediateMacroCallerLoc(LocationStack.back()); in emitMacroExpansions()
571 emitSingleMacroExpansion(FullSourceLoc(*I, SM), Level, Ranges); in emitMacroExpansions()
581 emitSingleMacroExpansion(FullSourceLoc(*I, SM), Level, Ranges); in emitMacroExpansions()
593 emitSingleMacroExpansion(FullSourceLoc(*I, SM), Level, Ranges); in emitMacroExpansions()