diff options
author | Chris Lattner <sabre@nondot.org> | 2009-05-02 19:34:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-05-02 19:34:21 +0000 |
commit | a7e1898e6b84ed7911d1f25c975b27b78a4950cb (patch) | |
tree | 949361b32871d19f99b25cb8e4bfa286975e32d6 /lib/Basic/Diagnostic.cpp | |
parent | dd924e256e85a8486d571b8e95a30a9fa38092fa (diff) |
when creating custom warning diagnostics, do not attempt to map
them with -Werror. Custom diags cannot be mapped, and this makes
-Werror cause a determinstic crash for the checker and other
clients of the custom diagnostics machinery. rdar://6816191
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70639 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Diagnostic.cpp')
-rw-r--r-- | lib/Basic/Diagnostic.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp index d5d8da1e22..3b3d61b08d 100644 --- a/lib/Basic/Diagnostic.cpp +++ b/lib/Basic/Diagnostic.cpp @@ -162,11 +162,6 @@ namespace clang { unsigned ID = DiagInfo.size()+DIAG_UPPER_LIMIT; DiagIDs.insert(std::make_pair(D, ID)); DiagInfo.push_back(D); - - // If this is a warning, and all warnings are supposed to map to errors, - // insert the mapping now. - if (L == Diagnostic::Warning && Diags.getWarningsAsErrors()) - Diags.setDiagnosticMapping((diag::kind)ID, diag::MAP_ERROR); return ID; } }; |