diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-10-12 18:51:02 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-10-12 18:51:02 +0000 |
commit | 227c352bae84b7def117a87af760ac956b717bd3 (patch) | |
tree | 8d5ce2944dd6e9bcc202cd2f37e0e410c3d2b25d /clang/lib | |
parent | 1a2c5386cd60b2746a8af62a58a3e94215bd14b8 (diff) | |
download | bcm5719-llvm-227c352bae84b7def117a87af760ac956b717bd3.tar.gz bcm5719-llvm-227c352bae84b7def117a87af760ac956b717bd3.zip |
We do parse hexfloats in C++11; make it actually work.
llvm-svn: 141798
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Lex/Lexer.cpp | 3 | ||||
-rw-r--r-- | clang/lib/Lex/LiteralSupport.cpp | 3 |
2 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp index c7a3df50bca..802024f79b6 100644 --- a/clang/lib/Lex/Lexer.cpp +++ b/clang/lib/Lex/Lexer.cpp @@ -1358,8 +1358,7 @@ void Lexer::LexNumericConstant(Token &Result, const char *CurPtr) { } // If we have a hex FP constant, continue. - if ((C == '-' || C == '+') && (PrevCh == 'P' || PrevCh == 'p') && - !Features.CPlusPlus0x) + if ((C == '-' || C == '+') && (PrevCh == 'P' || PrevCh == 'p')) return LexNumericConstant(Result, ConsumeChar(CurPtr, Size, Result)); // Update the location of token as well as BufferPtr. diff --git a/clang/lib/Lex/LiteralSupport.cpp b/clang/lib/Lex/LiteralSupport.cpp index 96550e6492b..70183fd1a0e 100644 --- a/clang/lib/Lex/LiteralSupport.cpp +++ b/clang/lib/Lex/LiteralSupport.cpp @@ -562,9 +562,6 @@ void NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) { } s = first_non_digit; - // In C++0x, we cannot support hexadecmial floating literals because - // they conflict with user-defined literals, so we warn in previous - // versions of C++ by default. if (!PP.getLangOptions().HexFloats) PP.Diag(TokLoc, diag::ext_hexconstant_invalid); } else if (saw_period) { |