diff options
author | Nico Weber <nicolasweber@gmx.de> | 2008-08-10 19:59:06 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2008-08-10 19:59:06 +0000 |
commit | 4c3116437cc19d05b3031b8e99566ef47bf463e8 (patch) | |
tree | a6f8b9aed87ba5053d4400387feaf2970bbae916 /clang/lib/Basic/SourceLocation.cpp | |
parent | cb1e06e8fda6d896c7b3031c220fb10e45b30049 (diff) | |
download | bcm5719-llvm-4c3116437cc19d05b3031b8e99566ef47bf463e8.tar.gz bcm5719-llvm-4c3116437cc19d05b3031b8e99566ef47bf463e8.zip |
* 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
llvm-svn: 54620
Diffstat (limited to 'clang/lib/Basic/SourceLocation.cpp')
-rw-r--r-- | clang/lib/Basic/SourceLocation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Basic/SourceLocation.cpp b/clang/lib/Basic/SourceLocation.cpp index 83c264ad0b0..12a49623c6c 100644 --- a/clang/lib/Basic/SourceLocation.cpp +++ b/clang/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); |