From 7bfaaaecb3113f955db31e8d8a51acffd1bc0c27 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sun, 10 Aug 2008 19:59:06 +0000 Subject: * Remove isInSystemHeader() from DiagClient, move it to SourceManager * Move FormatError() from TextDiagnostic up to DiagClient, remove now empty class TextDiagnostic * Make DiagClient optional for Diagnostic This fixes the following problems: * -html-diags (and probably others) does now output the same set of warnings as console clang does * nothing crashes if one forgets to call setHeaderSearch() on TextDiagnostic * some code duplication is removed git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54620 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Basic/SourceLocation.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/Basic/SourceLocation.cpp') diff --git a/lib/Basic/SourceLocation.cpp b/lib/Basic/SourceLocation.cpp index 83c264ad0b..12a49623c6 100644 --- a/lib/Basic/SourceLocation.cpp +++ b/lib/Basic/SourceLocation.cpp @@ -79,6 +79,12 @@ const FileEntry* FullSourceLoc::getFileEntryForLoc() const { return SrcMgr->getFileEntryForLoc(Loc); } +bool FullSourceLoc::isInSystemHeader() const { + assert (isValid()); + return SrcMgr->isInSystemHeader(Loc); +} + + const char * FullSourceLoc::getCharacterData() const { assert (isValid()); return SrcMgr->getCharacterData(Loc); -- cgit v1.2.3