summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYuka Takahashi <yukatkh@gmail.com>2017-07-16 15:07:20 +0000
committerYuka Takahashi <yukatkh@gmail.com>2017-07-16 15:07:20 +0000
commitbb80e4561494419619dcc16e9c5f5135550c609a (patch)
tree9dd70c79ad988c8d7c6d7c67fd91e7851862f1ba /include
parent2004a0d58e49a79917f4fe861462f3dd59d42009 (diff)
[Bash-autocompletion] Add support for -W<warning> and -Wno<warning>
Summary: `-W[tab]` will autocomplete warnings defined in this link: https://clang.llvm.org/docs/DiagnosticsReference.html#wweak-vtables Differential Revision: https://reviews.llvm.org/D35447 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308139 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/Basic/DiagnosticIDs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticIDs.h b/include/clang/Basic/DiagnosticIDs.h
index 479d1978c6..cdd358542a 100644
--- a/include/clang/Basic/DiagnosticIDs.h
+++ b/include/clang/Basic/DiagnosticIDs.h
@@ -18,6 +18,7 @@
#include "clang/Basic/LLVM.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/ADT/StringRef.h"
+#include <vector>
namespace clang {
class DiagnosticsEngine;
@@ -263,6 +264,13 @@ public:
/// are not SFINAE errors.
static SFINAEResponse getDiagnosticSFINAEResponse(unsigned DiagID);
+ /// \brief Get the string of all diagnostic flags.
+ ///
+ /// \returns A list of all diagnostics flags as they would be written in a
+ /// command line invocation including their `no-` variants. For example:
+ /// `{"-Wempty-body", "-Wno-empty-body", ...}`
+ static std::vector<std::string> getDiagnosticFlags();
+
/// \brief Get the set of all diagnostic IDs in the group with the given name.
///
/// \param[out] Diags - On return, the diagnostics in the group.