diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-04-28 00:51:18 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-04-28 00:51:18 +0000 |
commit | f01fdff97b245caac98100d232c760b4d0531411 (patch) | |
tree | ec640f32eeefc2216a0abd4b8257cf6879a823be /lib/Lex/LiteralSupport.cpp | |
parent | b0156ea412df1c2eb12d620054a404da71784cf5 (diff) |
Get rid of some useless uses of NoExtensions. The philosophy here is
that if we're going to print an extension warning anyway,
there's no point to changing behavior based on NoExtensions: it will
only make error recovery worse.
Note that this doesn't cause any behavior change because NoExtensions
isn't used by the current front-end. I'm still considering what to do about
the remaining use of NoExtensions in IdentifierTable.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70273 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/LiteralSupport.cpp')
-rw-r--r-- | lib/Lex/LiteralSupport.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Lex/LiteralSupport.cpp b/lib/Lex/LiteralSupport.cpp index a3184e90ad..03ecff91a5 100644 --- a/lib/Lex/LiteralSupport.cpp +++ b/lib/Lex/LiteralSupport.cpp @@ -132,11 +132,9 @@ static unsigned ProcessCharEscape(const char *&ThisTokBuf, // Otherwise, these are not valid escapes. case '(': case '{': case '[': case '%': // GCC accepts these as extensions. We warn about them as such though. - if (!PP.getLangOptions().NoExtensions) { - PP.Diag(Loc, diag::ext_nonstandard_escape) - << std::string()+(char)ResultChar; - break; - } + PP.Diag(Loc, diag::ext_nonstandard_escape) + << std::string()+(char)ResultChar; + break; // FALL THROUGH. default: if (isgraph(ThisTokBuf[0])) |