summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-10 23:55:23 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-10 23:55:23 +0000
commit93097b390651e7715414989219038124de683b51 (patch)
tree3f6c5e667447f3f70e5b3bc8dcd9f594fc7e136e /clang/lib/Lex
parent3835610902490b5d405827caca9ccd32a669d824 (diff)
downloadbcm5719-llvm-93097b390651e7715414989219038124de683b51.tar.gz
bcm5719-llvm-93097b390651e7715414989219038124de683b51.zip
Add Diagnostic::Report method for reporting diagnostics without a location.
llvm-svn: 86760
Diffstat (limited to 'clang/lib/Lex')
-rw-r--r--clang/lib/Lex/PTHLexer.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Lex/PTHLexer.cpp b/clang/lib/Lex/PTHLexer.cpp
index f17a5d93a91..60deeb325c0 100644
--- a/clang/lib/Lex/PTHLexer.cpp
+++ b/clang/lib/Lex/PTHLexer.cpp
@@ -411,8 +411,7 @@ static void InvalidPTH(Diagnostic *Diags, Diagnostic::Level level,
const char* Msg = 0) {
if (!Diags) return;
if (!Msg) Msg = "Invalid or corrupted PTH file";
- unsigned DiagID = Diags->getCustomDiagID(level, Msg);
- Diags->Report(FullSourceLoc(), DiagID);
+ Diags->Report(Diags->getCustomDiagID(level, Msg));
}
PTHManager* PTHManager::Create(const std::string& file, Diagnostic* Diags,
@@ -423,9 +422,9 @@ PTHManager* PTHManager::Create(const std::string& file, Diagnostic* Diags,
if (!File) {
if (Diags) {
- unsigned DiagID = Diags->getCustomDiagID(level,
- "PTH file %0 could not be read");
- Diags->Report(FullSourceLoc(), DiagID) << file;
+ unsigned DiagID =Diags->getCustomDiagID(level,
+ "PTH file %0 could not be read");
+ Diags->Report(DiagID) << file;
}
return 0;
OpenPOWER on IntegriCloud