summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Diagnostic.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-08-05 00:07:51 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-08-05 00:07:51 +0000
commit81f7f2904cf15fa74f9ab051eb3ca288442a92c7 (patch)
tree4d6d683654be68153dfa641c9215b1e7a39380f3 /clang/lib/Basic/Diagnostic.cpp
parent5018bd032ac2fdadc11b5b4513755e62b4435ce2 (diff)
downloadbcm5719-llvm-81f7f2904cf15fa74f9ab051eb3ca288442a92c7.tar.gz
bcm5719-llvm-81f7f2904cf15fa74f9ab051eb3ca288442a92c7.zip
Add EXTWARN Diagnostic class.
- Like EXTENSION but always generates a warning (even without -pedantic). - Updated ptr -> int, int -> ptr, and incompatible cast warnings to be EXTWARN. - Other EXTENSION level diagnostics should be audited for upgrade. - Updated several test cases to fix code which produced unanticipated warnings. llvm-svn: 54335
Diffstat (limited to 'clang/lib/Basic/Diagnostic.cpp')
-rw-r--r--clang/lib/Basic/Diagnostic.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp
index fbf118f2757..35d665d1a5c 100644
--- a/clang/lib/Basic/Diagnostic.cpp
+++ b/clang/lib/Basic/Diagnostic.cpp
@@ -29,7 +29,8 @@ enum {
NOTE = 0x01,
WARNING = 0x02,
EXTENSION = 0x03,
- ERROR = 0x04,
+ EXTWARN = 0x04,
+ ERROR = 0x05,
class_mask = 0x07
};
@@ -182,6 +183,8 @@ Diagnostic::Level Diagnostic::getDiagnosticLevel(unsigned DiagID) const {
DiagClass = WARNING;
else
return Ignored;
+ } else if (DiagClass == EXTWARN) {
+ DiagClass = ErrorOnExtensions ? ERROR : WARNING;
}
// If warnings are globally mapped to ignore or error, do it.
OpenPOWER on IntegriCloud