Lines Matching refs:Loc

41 static StringRef getImmediateMacroName(SourceLocation Loc,
44 assert(Loc.isMacroID() && "Only reasonble to call this on macros");
46 while (SM.isMacroArgExpansion(Loc))
47 Loc = SM.getImmediateExpansionRange(Loc).first;
52 Loc = SM.getSpellingLoc(SM.getImmediateExpansionRange(Loc).first);
56 std::pair<FileID, unsigned> ExpansionInfo = SM.getDecomposedLoc(Loc);
57 unsigned MacroTokenLength = Lexer::MeasureTokenLength(Loc, SM, LangOpts);
117 void DiagnosticRenderer::emitDiagnostic(SourceLocation Loc,
124 assert(SM || Loc.isInvalid());
129 if (Loc.isValid()) {
130 PLoc = SM->getPresumedLocForDisplay(Loc);
138 emitDiagnosticMessage(Loc, PLoc, Level, Message, Ranges, SM, D);
141 if (Loc.isValid()) {
159 emitMacroExpansionsAndCarets(Loc, Level, MutableRanges, FixItHints, *SM,
163 LastLoc = Loc;
187 /// \param Loc The include location of the current file (not the diagnostic
189 void DiagnosticRenderer::emitIncludeStack(SourceLocation Loc,
193 if (LastIncludeLoc == Loc)
195 LastIncludeLoc = Loc;
200 emitIncludeStackRecursively(Loc, SM);
205 void DiagnosticRenderer::emitIncludeStackRecursively(SourceLocation Loc,
207 if (Loc.isInvalid())
210 PresumedLoc PLoc = SM.getPresumedLoc(Loc);
218 emitIncludeLocation(Loc, PLoc, SM);
228 /// \param Loc The location for this caret.
235 SourceLocation Loc,
243 assert(!Loc.isInvalid() && "must have a valid source location here");
247 if (Loc.isFileID()) {
250 emitCodeContext(Loc, Level, Ranges, Hints, SM);
257 Loc = SM.skipToMacroArgExpansion(Loc);
259 SourceLocation OneLevelUp = SM.getImmediateMacroCallerLoc(Loc);
266 SourceLocation MacroLoc = Loc;
269 Loc = SM.getImmediateMacroCalleeLoc(Loc);
311 emitDiagnostic(SM.getSpellingLoc(Loc), DiagnosticsEngine::Note,
318 void DiagnosticNoteRenderer::emitIncludeLocation(SourceLocation Loc,
326 emitNote(Loc, Message.str(), &SM);