summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Diagnostic.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-05-02 19:34:21 +0000
committerChris Lattner <sabre@nondot.org>2009-05-02 19:34:21 +0000
commit195f88386c8aa7afe670c4d3506f045cd8600bfb (patch)
treed6f02c9bb5ec4a8d18c8781187ed39c3f7716933 /clang/lib/Basic/Diagnostic.cpp
parentf1e7667099328ff219b8f6a745acdd28fcaa899f (diff)
downloadbcm5719-llvm-195f88386c8aa7afe670c4d3506f045cd8600bfb.tar.gz
bcm5719-llvm-195f88386c8aa7afe670c4d3506f045cd8600bfb.zip
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 llvm-svn: 70639
Diffstat (limited to 'clang/lib/Basic/Diagnostic.cpp')
-rw-r--r--clang/lib/Basic/Diagnostic.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp
index d5d8da1e22a..3b3d61b08d0 100644
--- a/clang/lib/Basic/Diagnostic.cpp
+++ b/clang/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;
}
};
OpenPOWER on IntegriCloud