diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-09-29 01:47:16 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-09-29 01:47:16 +0000 |
commit | 3f8394669673451061f57ced81f0a2cae087f119 (patch) | |
tree | 91539e38a71150b0aeb89cd7c63b8ead3c04ecf0 /include/clang/Basic/DiagnosticIDs.h | |
parent | ba494c64365d78b1cdb6baea4d1e79263389fda9 (diff) | |
download | clang-3f8394669673451061f57ced81f0a2cae087f119.tar.gz clang-3f8394669673451061f57ced81f0a2cae087f119.tar.bz2 clang-3f8394669673451061f57ced81f0a2cae087f119.tar.xz |
Basic/Diagnostics: Add a DiagnosticIDs::getDiagnosticsInGroup method, and use
that in DiagnosticEngine instead of the convoluted calling into DiagnosticIDs
which then calls back into the DiagnosticsEngine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140766 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticIDs.h')
-rw-r--r-- | include/clang/Basic/DiagnosticIDs.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/include/clang/Basic/DiagnosticIDs.h b/include/clang/Basic/DiagnosticIDs.h index f11293c6c8..6a6a87e0fd 100644 --- a/include/clang/Basic/DiagnosticIDs.h +++ b/include/clang/Basic/DiagnosticIDs.h @@ -18,9 +18,14 @@ #include "llvm/ADT/StringRef.h" #include "clang/Basic/LLVM.h" +namespace llvm { + template<typename T, unsigned> class SmallVector; +} + namespace clang { class DiagnosticsEngine; class SourceLocation; + struct WarningOption; // Import the diagnostic enums themselves. namespace diag { @@ -248,13 +253,19 @@ public: static diag_iterator diags_end(); private: - /// setDiagnosticGroupMapping - Change an entire diagnostic group (e.g. - /// "unknown-pragmas" to have the specified mapping. This returns true and - /// ignores the request if "Group" was unknown, false otherwise. - bool setDiagnosticGroupMapping(StringRef Group, diag::Mapping Map, - SourceLocation Loc, - DiagnosticsEngine &Diag) const; + /// \brief Get the set of all diagnostic IDs in the group with the given name. + /// + /// \param Diags [out] - On return, the diagnostics in the group. + /// \returns True if the given group is unknown, false otherwise. + bool getDiagnosticsInGroup(StringRef Group, + llvm::SmallVectorImpl<diag::kind> &Diags) const; + /// \brief Get the set of all diagnostic IDs in the given group. + /// + /// \param Diags [out] - On return, the diagnostics in the group. + void getDiagnosticsInGroup(const WarningOption *Group, + llvm::SmallVectorImpl<diag::kind> &Diags) const; + /// \brief Based on the way the client configured the DiagnosticsEngine /// object, classify the specified diagnostic ID into a Level, consumable by /// the DiagnosticClient. |