diff options
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/Basic/SourceManager.h | 12 | ||||
-rw-r--r-- | include/clang/Frontend/DiagnosticRenderer.h | 17 |
2 files changed, 10 insertions, 19 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index a69ffad290..a2d7a59032 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -1473,18 +1473,6 @@ public: return !isLoadedFileID(FID); } - /// Get a presumed location suitable for displaying in a diagnostic message, - /// taking into account macro arguments and expansions. - PresumedLoc getPresumedLocForDisplay(SourceLocation Loc, - bool UseLineDirectives = true) const{ - // This is a condensed form of the algorithm used by emitCaretDiagnostic to - // walk to the top of the macro call stack. - while (Loc.isMacroID()) - Loc = getImmediateMacroCallerLoc(Loc); - - return getPresumedLoc(Loc, UseLineDirectives); - } - /// Gets the location of the immediate macro caller, one level up the stack /// toward the initial macro typed into the source. SourceLocation getImmediateMacroCallerLoc(SourceLocation Loc) const { diff --git a/include/clang/Frontend/DiagnosticRenderer.h b/include/clang/Frontend/DiagnosticRenderer.h index 4c22e2a3c9..b20a7f0801 100644 --- a/include/clang/Frontend/DiagnosticRenderer.h +++ b/include/clang/Frontend/DiagnosticRenderer.h @@ -114,13 +114,16 @@ private: void emitImportStackRecursively(SourceLocation Loc, StringRef ModuleName, const SourceManager &SM); void emitModuleBuildStack(const SourceManager &SM); - void emitMacroExpansionsAndCarets(SourceLocation Loc, - DiagnosticsEngine::Level Level, - SmallVectorImpl<CharSourceRange>& Ranges, - ArrayRef<FixItHint> Hints, - const SourceManager &SM, - unsigned &MacroDepth, - unsigned OnMacroInst = 0); + void emitCaret(SourceLocation Loc, DiagnosticsEngine::Level Level, + ArrayRef<CharSourceRange> Ranges, ArrayRef<FixItHint> Hints, + const SourceManager &SM); + void emitMacroExpansions(SourceLocation Loc, + DiagnosticsEngine::Level Level, + ArrayRef<CharSourceRange> Ranges, + ArrayRef<FixItHint> Hints, + const SourceManager &SM, + unsigned &MacroDepth, + unsigned OnMacroInst = 0); public: /// \brief Emit a diagnostic. /// |