diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-07-19 07:02:30 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-07-19 07:02:30 +0000 | 
| commit | de51d671486b6ac9a2ad9ee5fcfdb1a23cc59238 (patch) | |
| tree | 17ff629bd1f00b82d8dbb66a022e2f59e218c3c2 /lib/Basic/DiagnosticIDs.cpp | |
| parent | 8746d127c04f5bbaf6c6e88cef8606ca5a6a54e9 (diff) | |
Diffstat (limited to 'lib/Basic/DiagnosticIDs.cpp')
| -rw-r--r-- | lib/Basic/DiagnosticIDs.cpp | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/lib/Basic/DiagnosticIDs.cpp b/lib/Basic/DiagnosticIDs.cpp index ce493c1e5caba..932b3f1934cc4 100644 --- a/lib/Basic/DiagnosticIDs.cpp +++ b/lib/Basic/DiagnosticIDs.cpp @@ -510,6 +510,18 @@ StringRef DiagnosticIDs::getWarningOptionForDiag(unsigned DiagID) {    return StringRef();  } +std::vector<std::string> DiagnosticIDs::getDiagnosticFlags() { +  std::vector<std::string> Res; +  for (size_t I = 1; DiagGroupNames[I] != '\0';) { +    std::string Diag(DiagGroupNames + I + 1, DiagGroupNames[I]); +    I += DiagGroupNames[I] + 1; +    Res.push_back("-W" + Diag); +    Res.push_back("-Wno" + Diag); +  } + +  return Res; +} +  /// Return \c true if any diagnostics were found in this group, even if they  /// were filtered out due to having the wrong flavor.  static bool getDiagnosticsInGroup(diag::Flavor Flavor, | 
