diff options
author | David Blaikie <dblaikie@gmail.com> | 2011-09-25 23:23:43 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2011-09-25 23:23:43 +0000 |
commit | d6471f7c1921c7802804ce3ff6fe9768310f72b9 (patch) | |
tree | f8559e8ca7afb0328fab36e22a34e55ce566008d /include/clang/Frontend | |
parent | 026cb7604c8ef0bc7032e4c067500907d03b67a3 (diff) |
Rename Diagnostic to DiagnosticsEngine as per issue 5397
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend')
-rw-r--r-- | include/clang/Frontend/ASTConsumers.h | 2 | ||||
-rw-r--r-- | include/clang/Frontend/ASTUnit.h | 38 | ||||
-rw-r--r-- | include/clang/Frontend/AnalyzerOptions.h | 2 | ||||
-rw-r--r-- | include/clang/Frontend/ChainedDiagnosticClient.h | 2 | ||||
-rw-r--r-- | include/clang/Frontend/CompilerInstance.h | 20 | ||||
-rw-r--r-- | include/clang/Frontend/CompilerInvocation.h | 4 | ||||
-rw-r--r-- | include/clang/Frontend/DiagnosticOptions.h | 4 | ||||
-rw-r--r-- | include/clang/Frontend/LogDiagnosticPrinter.h | 4 | ||||
-rw-r--r-- | include/clang/Frontend/TextDiagnosticBuffer.h | 4 | ||||
-rw-r--r-- | include/clang/Frontend/TextDiagnosticPrinter.h | 6 | ||||
-rw-r--r-- | include/clang/Frontend/Utils.h | 8 | ||||
-rw-r--r-- | include/clang/Frontend/VerifyDiagnosticsClient.h | 8 |
12 files changed, 51 insertions, 51 deletions
diff --git a/include/clang/Frontend/ASTConsumers.h b/include/clang/Frontend/ASTConsumers.h index dd6dd9ddb6..cef9509a97 100644 --- a/include/clang/Frontend/ASTConsumers.h +++ b/include/clang/Frontend/ASTConsumers.h @@ -23,7 +23,7 @@ namespace clang { class ASTConsumer; class CodeGenOptions; -class Diagnostic; +class DiagnosticsEngine; class FileManager; class LangOptions; class Preprocessor; diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h index 37ae4e2932..86f9b0670e 100644 --- a/include/clang/Frontend/ASTUnit.h +++ b/include/clang/Frontend/ASTUnit.h @@ -46,7 +46,7 @@ class ASTReader; class CodeCompleteConsumer; class CompilerInvocation; class Decl; -class Diagnostic; +class DiagnosticsEngine; class FileEntry; class FileManager; class HeaderSearch; @@ -69,13 +69,13 @@ class GlobalCodeCompletionAllocator /// class ASTUnit : public ModuleLoader { private: - llvm::IntrusiveRefCntPtr<Diagnostic> Diagnostics; - llvm::IntrusiveRefCntPtr<FileManager> FileMgr; - llvm::IntrusiveRefCntPtr<SourceManager> SourceMgr; - llvm::OwningPtr<HeaderSearch> HeaderInfo; - llvm::IntrusiveRefCntPtr<TargetInfo> Target; - llvm::IntrusiveRefCntPtr<Preprocessor> PP; - llvm::IntrusiveRefCntPtr<ASTContext> Ctx; + llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diagnostics; + llvm::IntrusiveRefCntPtr<FileManager> FileMgr; + llvm::IntrusiveRefCntPtr<SourceManager> SourceMgr; + llvm::OwningPtr<HeaderSearch> HeaderInfo; + llvm::IntrusiveRefCntPtr<TargetInfo> Target; + llvm::IntrusiveRefCntPtr<Preprocessor> PP; + llvm::IntrusiveRefCntPtr<ASTContext> Ctx; FileSystemOptions FileSystemOpts; @@ -240,8 +240,8 @@ private: /// \brief The number of warnings that occurred while parsing the preamble. /// - /// This value will be used to restore the state of the \c Diagnostic object - /// when re-using the precompiled preamble. Note that only the + /// This value will be used to restore the state of the \c DiagnosticsEngine + /// object when re-using the precompiled preamble. Note that only the /// number of warnings matters, since we will not save the preamble /// when any errors are present. unsigned NumWarningsInPreamble; @@ -260,7 +260,7 @@ private: /// \brief The language options used when we load an AST file. LangOptions ASTFileLangOpts; - static void ConfigureDiags(llvm::IntrusiveRefCntPtr<Diagnostic> &Diags, + static void ConfigureDiags(llvm::IntrusiveRefCntPtr<DiagnosticsEngine> &Diags, const char **ArgBegin, const char **ArgEnd, ASTUnit &AST, bool CaptureDiagnostics); @@ -420,8 +420,8 @@ public: bool isUnsafeToFree() const { return UnsafeToFree; } void setUnsafeToFree(bool Value) { UnsafeToFree = Value; } - const Diagnostic &getDiagnostics() const { return *Diagnostics; } - Diagnostic &getDiagnostics() { return *Diagnostics; } + const DiagnosticsEngine &getDiagnostics() const { return *Diagnostics; } + DiagnosticsEngine &getDiagnostics() { return *Diagnostics; } const SourceManager &getSourceManager() const { return *SourceMgr; } SourceManager &getSourceManager() { return *SourceMgr; } @@ -563,7 +563,7 @@ public: /// \brief Create a ASTUnit. Gets ownership of the passed CompilerInvocation. static ASTUnit *create(CompilerInvocation *CI, - llvm::IntrusiveRefCntPtr<Diagnostic> Diags); + llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags); /// \brief Create a ASTUnit from an AST file. /// @@ -574,7 +574,7 @@ public: /// /// \returns - The initialized ASTUnit or null if the AST failed to load. static ASTUnit *LoadFromASTFile(const std::string &Filename, - llvm::IntrusiveRefCntPtr<Diagnostic> Diags, + llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags, const FileSystemOptions &FileSystemOpts, bool OnlyLocalDecls = false, RemappedFile *RemappedFiles = 0, @@ -606,7 +606,7 @@ public: /// \param Action - The ASTFrontendAction to invoke. Its ownership is not /// transfered. static ASTUnit *LoadFromCompilerInvocationAction(CompilerInvocation *CI, - llvm::IntrusiveRefCntPtr<Diagnostic> Diags, + llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags, ASTFrontendAction *Action = 0); /// LoadFromCompilerInvocation - Create an ASTUnit from a source file, via a @@ -621,7 +621,7 @@ public: // FIXME: Move OnlyLocalDecls, UseBumpAllocator to setters on the ASTUnit, we // shouldn't need to specify them at construction time. static ASTUnit *LoadFromCompilerInvocation(CompilerInvocation *CI, - llvm::IntrusiveRefCntPtr<Diagnostic> Diags, + llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags, bool OnlyLocalDecls = false, bool CaptureDiagnostics = false, bool PrecompilePreamble = false, @@ -645,7 +645,7 @@ public: // shouldn't need to specify them at construction time. static ASTUnit *LoadFromCommandLine(const char **ArgBegin, const char **ArgEnd, - llvm::IntrusiveRefCntPtr<Diagnostic> Diags, + llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags, StringRef ResourceFilesPath, bool OnlyLocalDecls = false, bool CaptureDiagnostics = false, @@ -686,7 +686,7 @@ public: RemappedFile *RemappedFiles, unsigned NumRemappedFiles, bool IncludeMacros, bool IncludeCodePatterns, CodeCompleteConsumer &Consumer, - Diagnostic &Diag, LangOptions &LangOpts, + DiagnosticsEngine &Diag, LangOptions &LangOpts, SourceManager &SourceMgr, FileManager &FileMgr, SmallVectorImpl<StoredDiagnostic> &StoredDiagnostics, SmallVectorImpl<const llvm::MemoryBuffer *> &OwnedBuffers); diff --git a/include/clang/Frontend/AnalyzerOptions.h b/include/clang/Frontend/AnalyzerOptions.h index b2da2c4891..20e4156ad6 100644 --- a/include/clang/Frontend/AnalyzerOptions.h +++ b/include/clang/Frontend/AnalyzerOptions.h @@ -20,7 +20,7 @@ namespace clang { class ASTConsumer; -class Diagnostic; +class DiagnosticsEngine; class Preprocessor; class LangOptions; diff --git a/include/clang/Frontend/ChainedDiagnosticClient.h b/include/clang/Frontend/ChainedDiagnosticClient.h index 70f21901db..cd513dc8a1 100644 --- a/include/clang/Frontend/ChainedDiagnosticClient.h +++ b/include/clang/Frontend/ChainedDiagnosticClient.h @@ -46,7 +46,7 @@ public: return Primary->IncludeInDiagnosticCounts(); } - virtual void HandleDiagnostic(Diagnostic::Level DiagLevel, + virtual void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const DiagnosticInfo &Info) { // Default implementation (Warnings/errors count). DiagnosticClient::HandleDiagnostic(DiagLevel, Info); diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index c61d6df196..1d204335f1 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -29,7 +29,7 @@ class ASTContext; class ASTConsumer; class ASTReader; class CodeCompleteConsumer; -class Diagnostic; +class DiagnosticsEngine; class DiagnosticClient; class ExternalASTSource; class FileManager; @@ -62,7 +62,7 @@ class CompilerInstance : public ModuleLoader { llvm::IntrusiveRefCntPtr<CompilerInvocation> Invocation; /// The diagnostics engine instance. - llvm::IntrusiveRefCntPtr<Diagnostic> Diagnostics; + llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diagnostics; /// The target being compiled for. llvm::IntrusiveRefCntPtr<TargetInfo> Target; @@ -252,13 +252,13 @@ public: bool hasDiagnostics() const { return Diagnostics != 0; } /// Get the current diagnostics engine. - Diagnostic &getDiagnostics() const { + DiagnosticsEngine &getDiagnostics() const { assert(Diagnostics && "Compiler instance has no diagnostics!"); return *Diagnostics; } /// setDiagnostics - Replace the current diagnostics engine. - void setDiagnostics(Diagnostic *Value); + void setDiagnostics(DiagnosticsEngine *Value); DiagnosticClient &getDiagnosticClient() const { assert(Diagnostics && Diagnostics->getClient() && @@ -455,7 +455,7 @@ public: /// allocating one if one is not provided. /// /// \param Client If non-NULL, a diagnostic client that will be - /// attached to (and, then, owned by) the Diagnostic inside this AST + /// attached to (and, then, owned by) the DiagnosticsEngine inside this AST /// unit. /// /// \param ShouldOwnClient If Client is non-NULL, specifies whether @@ -464,7 +464,7 @@ public: DiagnosticClient *Client = 0, bool ShouldOwnClient = true); - /// Create a Diagnostic object with a the TextDiagnosticPrinter. + /// Create a DiagnosticsEngine object with a the TextDiagnosticPrinter. /// /// The \arg Argc and \arg Argv arguments are used only for logging purposes, /// when the diagnostic options indicate that the compiler should output @@ -473,21 +473,21 @@ public: /// If no diagnostic client is provided, this creates a /// DiagnosticClient that is owned by the returned diagnostic /// object, if using directly the caller is responsible for - /// releasing the returned Diagnostic's client eventually. + /// releasing the returned DiagnosticsEngine's client eventually. /// /// \param Opts - The diagnostic options; note that the created text /// diagnostic object contains a reference to these options and its lifetime /// must extend past that of the diagnostic engine. /// /// \param Client If non-NULL, a diagnostic client that will be - /// attached to (and, then, owned by) the returned Diagnostic + /// attached to (and, then, owned by) the returned DiagnosticsEngine /// object. /// /// \param CodeGenOpts If non-NULL, the code gen options in use, which may be /// used by some diagnostics printers (for logging purposes only). /// /// \return The new object on success, or null on failure. - static llvm::IntrusiveRefCntPtr<Diagnostic> + static llvm::IntrusiveRefCntPtr<DiagnosticsEngine> createDiagnostics(const DiagnosticOptions &Opts, int Argc, const char* const *Argv, DiagnosticClient *Client = 0, @@ -612,7 +612,7 @@ public: /// /// \return True on success. static bool InitializeSourceManager(StringRef InputFile, - Diagnostic &Diags, + DiagnosticsEngine &Diags, FileManager &FileMgr, SourceManager &SourceMgr, const FrontendOptions &Opts); diff --git a/include/clang/Frontend/CompilerInvocation.h b/include/clang/Frontend/CompilerInvocation.h index f09c97ec3f..47c70311dd 100644 --- a/include/clang/Frontend/CompilerInvocation.h +++ b/include/clang/Frontend/CompilerInvocation.h @@ -30,7 +30,7 @@ namespace clang { -class Diagnostic; +class DiagnosticsEngine; /// CompilerInvocation - Helper class for holding the data necessary to invoke /// the compiler. @@ -88,7 +88,7 @@ public: static void CreateFromArgs(CompilerInvocation &Res, const char* const *ArgBegin, const char* const *ArgEnd, - Diagnostic &Diags); + DiagnosticsEngine &Diags); /// GetBuiltinIncludePath - Get the directory where the compiler headers /// reside, relative to the compiler binary (found by the passed in diff --git a/include/clang/Frontend/DiagnosticOptions.h b/include/clang/Frontend/DiagnosticOptions.h index 5ae8eb3677..319abeb4fb 100644 --- a/include/clang/Frontend/DiagnosticOptions.h +++ b/include/clang/Frontend/DiagnosticOptions.h @@ -43,7 +43,7 @@ public: unsigned ShowColors : 1; /// Show diagnostics with ANSI color sequences. unsigned ShowOverloads : 1; /// Overload candidates to show. Values from - /// Diagnostic::OverloadsShown + /// DiagnosticsEngine::OverloadsShown unsigned VerifyDiagnostics: 1; /// Check that diagnostics match the expected /// diagnostics, indicated by markers in the /// input source file. @@ -82,7 +82,7 @@ public: PedanticErrors = 0; ShowCarets = 1; ShowColors = 0; - ShowOverloads = Diagnostic::Ovl_All; + ShowOverloads = DiagnosticsEngine::Ovl_All; ShowColumn = 1; ShowFixits = 1; ShowLocation = 1; diff --git a/include/clang/Frontend/LogDiagnosticPrinter.h b/include/clang/Frontend/LogDiagnosticPrinter.h index ee53a71d2f..7631bedf8c 100644 --- a/include/clang/Frontend/LogDiagnosticPrinter.h +++ b/include/clang/Frontend/LogDiagnosticPrinter.h @@ -37,7 +37,7 @@ class LogDiagnosticPrinter : public DiagnosticClient { unsigned DiagnosticID; /// The level of the diagnostic. - Diagnostic::Level DiagnosticLevel; + DiagnosticsEngine::Level DiagnosticLevel; }; raw_ostream &OS; @@ -68,7 +68,7 @@ public: void EndSourceFile(); - virtual void HandleDiagnostic(Diagnostic::Level DiagLevel, + virtual void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const DiagnosticInfo &Info); }; diff --git a/include/clang/Frontend/TextDiagnosticBuffer.h b/include/clang/Frontend/TextDiagnosticBuffer.h index 380a1dd224..11564f6688 100644 --- a/include/clang/Frontend/TextDiagnosticBuffer.h +++ b/include/clang/Frontend/TextDiagnosticBuffer.h @@ -39,12 +39,12 @@ public: const_iterator note_begin() const { return Notes.begin(); } const_iterator note_end() const { return Notes.end(); } - virtual void HandleDiagnostic(Diagnostic::Level DiagLevel, + virtual void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const DiagnosticInfo &Info); /// FlushDiagnostics - Flush the buffered diagnostics to an given /// diagnostic engine. - void FlushDiagnostics(Diagnostic &Diags) const; + void FlushDiagnostics(DiagnosticsEngine &Diags) const; }; } // end namspace clang diff --git a/include/clang/Frontend/TextDiagnosticPrinter.h b/include/clang/Frontend/TextDiagnosticPrinter.h index 52c95c9c2d..8369c7df58 100644 --- a/include/clang/Frontend/TextDiagnosticPrinter.h +++ b/include/clang/Frontend/TextDiagnosticPrinter.h @@ -53,14 +53,14 @@ public: LangOpts = 0; } - void PrintIncludeStack(Diagnostic::Level Level, SourceLocation Loc, + void PrintIncludeStack(DiagnosticsEngine::Level Level, SourceLocation Loc, const SourceManager &SM); - virtual void HandleDiagnostic(Diagnostic::Level Level, + virtual void HandleDiagnostic(DiagnosticsEngine::Level Level, const DiagnosticInfo &Info); private: - void EmitDiagnosticLoc(Diagnostic::Level Level, + void EmitDiagnosticLoc(DiagnosticsEngine::Level Level, const DiagnosticInfo &Info, const SourceManager &SM, PresumedLoc PLoc); diff --git a/include/clang/Frontend/Utils.h b/include/clang/Frontend/Utils.h index b3ecb363ba..929beb079e 100644 --- a/include/clang/Frontend/Utils.h +++ b/include/clang/Frontend/Utils.h @@ -31,7 +31,7 @@ class CompilerInstance; class CompilerInvocation; class Decl; class DependencyOutputOptions; -class Diagnostic; +class DiagnosticsEngine; class DiagnosticOptions; class FileManager; class HeaderSearch; @@ -66,7 +66,7 @@ void InitializePreprocessor(Preprocessor &PP, /// ProcessWarningOptions - Initialize the diagnostic client and process the /// warning options specified on the command line. -void ProcessWarningOptions(Diagnostic &Diags, const DiagnosticOptions &Opts); +void ProcessWarningOptions(DiagnosticsEngine &Diags, const DiagnosticOptions &Opts); /// DoPrintPreprocessedInput - Implement -E mode. void DoPrintPreprocessedInput(Preprocessor &PP, raw_ostream* OS, @@ -101,8 +101,8 @@ void CacheTokens(Preprocessor &PP, llvm::raw_fd_ostream* OS); /// argument vector. CompilerInvocation * createInvocationFromCommandLine(ArrayRef<const char *> Args, - llvm::IntrusiveRefCntPtr<Diagnostic> Diags = - llvm::IntrusiveRefCntPtr<Diagnostic>()); + llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags = + llvm::IntrusiveRefCntPtr<DiagnosticsEngine>()); } // end namespace clang diff --git a/include/clang/Frontend/VerifyDiagnosticsClient.h b/include/clang/Frontend/VerifyDiagnosticsClient.h index 0c789ff86d..df84ab46cb 100644 --- a/include/clang/Frontend/VerifyDiagnosticsClient.h +++ b/include/clang/Frontend/VerifyDiagnosticsClient.h @@ -15,7 +15,7 @@ namespace clang { -class Diagnostic; +class DiagnosticsEngine; class TextDiagnosticBuffer; /// VerifyDiagnosticsClient - Create a diagnostic client which will use markers @@ -64,7 +64,7 @@ class TextDiagnosticBuffer; /// class VerifyDiagnosticsClient : public DiagnosticClient { public: - Diagnostic &Diags; + DiagnosticsEngine &Diags; DiagnosticClient *PrimaryClient; bool OwnsPrimaryClient; llvm::OwningPtr<TextDiagnosticBuffer> Buffer; @@ -78,7 +78,7 @@ public: /// Create a new verifying diagnostic client, which will issue errors to \arg /// the currently-attached diagnostic client when a diagnostic does not match /// what is expected (as indicated in the source file). - VerifyDiagnosticsClient(Diagnostic &Diags); + VerifyDiagnosticsClient(DiagnosticsEngine &Diags); ~VerifyDiagnosticsClient(); virtual void BeginSourceFile(const LangOptions &LangOpts, @@ -86,7 +86,7 @@ public: virtual void EndSourceFile(); - virtual void HandleDiagnostic(Diagnostic::Level DiagLevel, + virtual void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const DiagnosticInfo &Info); }; |