diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-10 23:55:23 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-10 23:55:23 +0000 |
commit | 0f9fed70cea107b3f79df554e38bd8e98d48fe47 (patch) | |
tree | 123b8cc9e693766dada60d4d7d27ef0e77164295 /lib/Lex/PTHLexer.cpp | |
parent | b6d1cc84d1a7e314f7a7a02fbe092adc4caf67e8 (diff) |
Add Diagnostic::Report method for reporting diagnostics without a location.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PTHLexer.cpp')
-rw-r--r-- | lib/Lex/PTHLexer.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp index f17a5d93a9..60deeb325c 100644 --- a/lib/Lex/PTHLexer.cpp +++ b/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; |