diff options
Diffstat (limited to 'lib/Lex')
-rw-r--r-- | lib/Lex/LiteralSupport.cpp | 7 | ||||
-rw-r--r-- | lib/Lex/PPDirectives.cpp | 2 | ||||
-rw-r--r-- | lib/Lex/PPMacroExpansion.cpp | 3 | ||||
-rw-r--r-- | lib/Lex/PTHLexer.cpp | 7 | ||||
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 2 |
5 files changed, 12 insertions, 9 deletions
diff --git a/lib/Lex/LiteralSupport.cpp b/lib/Lex/LiteralSupport.cpp index e780d694ed..ef385a8aed 100644 --- a/lib/Lex/LiteralSupport.cpp +++ b/lib/Lex/LiteralSupport.cpp @@ -53,7 +53,7 @@ static unsigned getCharWidth(tok::TokenKind kind, const TargetInfo &Target) { static unsigned ProcessCharEscape(const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, - Diagnostic *Diags) { + DiagnosticsEngine *Diags) { // Skip the '\' char. ++ThisTokBuf; @@ -180,7 +180,7 @@ static unsigned ProcessCharEscape(const char *&ThisTokBuf, /// return the UTF32. static bool ProcessUCNEscape(const char *&ThisTokBuf, const char *ThisTokEnd, uint32_t &UcnVal, unsigned short &UcnLen, - FullSourceLoc Loc, Diagnostic *Diags, + FullSourceLoc Loc, DiagnosticsEngine *Diags, const LangOptions &Features) { if (!Features.CPlusPlus && !Features.C99 && Diags) Diags->Report(Loc, diag::warn_ucn_not_valid_in_c89); @@ -234,7 +234,8 @@ static bool ProcessUCNEscape(const char *&ThisTokBuf, const char *ThisTokEnd, static void EncodeUCNEscape(const char *&ThisTokBuf, const char *ThisTokEnd, char *&ResultBuf, bool &HadError, FullSourceLoc Loc, unsigned CharByteWidth, - Diagnostic *Diags, const LangOptions &Features) { + DiagnosticsEngine *Diags, + const LangOptions &Features) { typedef uint32_t UTF32; UTF32 UcnVal = 0; unsigned short UcnLen = 0; diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp index 1f54ef52c3..b242c8ba7e 100644 --- a/lib/Lex/PPDirectives.cpp +++ b/lib/Lex/PPDirectives.cpp @@ -1616,7 +1616,7 @@ void Preprocessor::HandleDefineDirective(Token &DefineTok) { // warn-because-unused-macro set. If it gets used it will be removed from set. if (isInPrimaryFile() && // don't warn for include'd macros. Diags->getDiagnosticLevel(diag::pp_macro_not_used, - MI->getDefinitionLoc()) != Diagnostic::Ignored) { + MI->getDefinitionLoc()) != DiagnosticsEngine::Ignored) { MI->setIsWarnIfUnused(true); WarnUnusedMacroLocs.insert(MI->getDefinitionLoc()); } diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp index cfe9374251..5a603b6392 100644 --- a/lib/Lex/PPMacroExpansion.cpp +++ b/lib/Lex/PPMacroExpansion.cpp @@ -690,7 +690,8 @@ static bool HasExtension(const Preprocessor &PP, const IdentifierInfo *II) { // If the use of an extension results in an error diagnostic, extensions are // effectively unavailable, so just return false here. - if (PP.getDiagnostics().getExtensionHandlingBehavior()==Diagnostic::Ext_Error) + if (PP.getDiagnostics().getExtensionHandlingBehavior() == + DiagnosticsEngine::Ext_Error) return false; const LangOptions &LangOpts = PP.getLangOptions(); diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp index 0d48ade39e..e0c4cf0c16 100644 --- a/lib/Lex/PTHLexer.cpp +++ b/lib/Lex/PTHLexer.cpp @@ -431,11 +431,12 @@ PTHManager::~PTHManager() { free(PerIDCache); } -static void InvalidPTH(Diagnostic &Diags, const char *Msg) { - Diags.Report(Diags.getCustomDiagID(Diagnostic::Error, Msg)); +static void InvalidPTH(DiagnosticsEngine &Diags, const char *Msg) { + Diags.Report(Diags.getCustomDiagID(DiagnosticsEngine::Error, Msg)); } -PTHManager *PTHManager::Create(const std::string &file, Diagnostic &Diags) { +PTHManager *PTHManager::Create(const std::string &file, + DiagnosticsEngine &Diags) { // Memory map the PTH file. llvm::OwningPtr<llvm::MemoryBuffer> File; diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 8c1004b5f5..2937b6066e 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -49,7 +49,7 @@ using namespace clang; //===----------------------------------------------------------------------===// ExternalPreprocessorSource::~ExternalPreprocessorSource() { } -Preprocessor::Preprocessor(Diagnostic &diags, LangOptions &opts, +Preprocessor::Preprocessor(DiagnosticsEngine &diags, LangOptions &opts, const TargetInfo *target, SourceManager &SM, HeaderSearch &Headers, ModuleLoader &TheModuleLoader, IdentifierInfoLookup* IILookup, |