diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-08-05 00:07:51 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-08-05 00:07:51 +0000 |
commit | 4489fe10fa073eb326e2c8906db170f009050911 (patch) | |
tree | 5330c84c6ca7dc75f8e98581c3c6ccd95db9a94b /lib/Basic/Diagnostic.cpp | |
parent | a34ea072371154c9042ce86321d17fbb4df1f84d (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54335 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Diagnostic.cpp')
-rw-r--r-- | lib/Basic/Diagnostic.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp index fbf118f275..35d665d1a5 100644 --- a/lib/Basic/Diagnostic.cpp +++ b/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. |