summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-08-30 17:09:08 +0000
committerChris Lattner <sabre@nondot.org>2010-08-30 17:09:08 +0000
commit7a9e9e7d76fe2fbd225b177e7c39be6912f451e4 (patch)
tree159c445c777e840ae0913e679b7ded6575c94225 /clang/lib
parent9517943d1177111508a638f8a745c8f1a81a9f45 (diff)
downloadbcm5719-llvm-7a9e9e7d76fe2fbd225b177e7c39be6912f451e4.tar.gz
bcm5719-llvm-7a9e9e7d76fe2fbd225b177e7c39be6912f451e4.zip
use 'features' instead of 'PP->getLangOptions'.
llvm-svn: 112490
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Lex/Lexer.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp
index 4fd35be19c2..5d32c72884f 100644
--- a/clang/lib/Lex/Lexer.cpp
+++ b/clang/lib/Lex/Lexer.cpp
@@ -945,16 +945,16 @@ void Lexer::LexNumericConstant(Token &Result, const char *CurPtr) {
}
// If we fell out, check for a sign, due to 1e+12. If we have one, continue.
- // If we are in Microsoft mode, don't continue if the constant is hex.
- // For example, MSVC will accept the following as 3 tokens: 0x1234567e+1
- if ((C == '-' || C == '+') && (PrevCh == 'E' || PrevCh == 'e') &&
- (!PP || !PP->getLangOptions().Microsoft ||
- !isHexaLiteral(BufferPtr, CurPtr)))
- return LexNumericConstant(Result, ConsumeChar(CurPtr, Size, Result));
+ if ((C == '-' || C == '+') && (PrevCh == 'E' || PrevCh == 'e')) {
+ // If we are in Microsoft mode, don't continue if the constant is hex.
+ // For example, MSVC will accept the following as 3 tokens: 0x1234567e+1
+ if (!Features.Microsoft || !isHexaLiteral(BufferPtr, CurPtr))
+ return LexNumericConstant(Result, ConsumeChar(CurPtr, Size, Result));
+ }
// If we have a hex FP constant, continue.
if ((C == '-' || C == '+') && (PrevCh == 'P' || PrevCh == 'p') &&
- (!PP || !PP->getLangOptions().CPlusPlus0x))
+ !Features.CPlusPlus0x)
return LexNumericConstant(Result, ConsumeChar(CurPtr, Size, Result));
// Update the location of token as well as BufferPtr.
@@ -1000,7 +1000,7 @@ void Lexer::LexStringLiteral(Token &Result, const char *CurPtr, bool Wide) {
// FIXME: Handle UCNs
unsigned Size;
- if (PP && PP->getLangOptions().CPlusPlus0x &&
+ if (Features.CPlusPlus0x && PP &&
isIdentifierStart(getCharAndSize(CurPtr, Size))) {
Result.makeUserDefinedLiteral(ExtraDataAllocator);
Result.setFlagValue(Token::LiteralPortionClean, !Result.needsCleaning());
OpenPOWER on IntegriCloud