diff options
author | Mike Stump <mrs@apple.com> | 2009-09-09 15:08:12 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-09-09 15:08:12 +0000 |
commit | 1eb4433ac451dc16f4133a88af2d002ac26c58ef (patch) | |
tree | 07065b80cb7787bb7b9ffcb985196007a57e86f7 /lib/Frontend/Warnings.cpp | |
parent | 79d39f92590cf2e91bf81486b02cd1156d13ca54 (diff) |
Remove tabs, and whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/Warnings.cpp')
-rw-r--r-- | lib/Frontend/Warnings.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Frontend/Warnings.cpp b/lib/Frontend/Warnings.cpp index 87178e93b4..7b01b0fb74 100644 --- a/lib/Frontend/Warnings.cpp +++ b/lib/Frontend/Warnings.cpp @@ -47,7 +47,7 @@ bool clang::ProcessWarningOptions(Diagnostic &Diags, Diags.setExtensionHandlingBehavior(Diagnostic::Ext_Warn); else Diags.setExtensionHandlingBehavior(Diagnostic::Ext_Ignore); - + // FIXME: -Wfatal-errors / -Wfatal-errors=foo for (unsigned i = 0, e = Warnings.size(); i != e; ++i) { @@ -55,7 +55,7 @@ bool clang::ProcessWarningOptions(Diagnostic &Diags, const char *OptStart = &Opt[0]; const char *OptEnd = OptStart+Opt.size(); assert(*OptEnd == 0 && "Expect null termination for lower-bound search"); - + // Check to see if this warning starts with "no-", if so, this is a negative // form of the option. bool isPositive = true; @@ -74,7 +74,7 @@ bool clang::ProcessWarningOptions(Diagnostic &Diags, Diags.setSuppressSystemWarnings(!isPositive); continue; } - + // -Werror/-Wno-error is a special case, not controlled by the option table. // It also has the "specifier" form of -Werror=foo and -Werror-foo. if (OptEnd-OptStart >= 5 && memcmp(OptStart, "error", 5) == 0) { @@ -88,21 +88,21 @@ bool clang::ProcessWarningOptions(Diagnostic &Diags, } Specifier = OptStart+6; } - + if (Specifier == 0) { Diags.setWarningsAsErrors(isPositive); continue; } - + // -Werror=foo maps foo to Error, -Wno-error=foo maps it to Warning. Mapping = isPositive ? diag::MAP_ERROR : diag::MAP_WARNING_NO_WERROR; OptStart = Specifier; } - + if (Diags.setDiagnosticGroupMapping(OptStart, Mapping)) Diags.Report(FullSourceLoc(), diag::warn_unknown_warning_option) << ("-W" + Opt); } - + return false; } |