summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-08-20 00:07:23 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-08-20 00:07:23 +0000
commitd38ad47cfaefa7c72d8b3024b7a63de146120dc8 (patch)
treefe5490e83de534fd7b58b6f3466430625229b581 /clang/lib/Lex
parentf9486598b513565dc32e89059c2d2dd0e861700b (diff)
downloadbcm5719-llvm-d38ad47cfaefa7c72d8b3024b7a63de146120dc8.tar.gz
bcm5719-llvm-d38ad47cfaefa7c72d8b3024b7a63de146120dc8.zip
ObjectiveC migrator: More work towards
insertion of ObjC audit pragmas. llvm-svn: 188733
Diffstat (limited to 'clang/lib/Lex')
-rw-r--r--clang/lib/Lex/Lexer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp
index 71db68a58c0..c28781dc5f2 100644
--- a/clang/lib/Lex/Lexer.cpp
+++ b/clang/lib/Lex/Lexer.cpp
@@ -430,7 +430,8 @@ unsigned Lexer::MeasureTokenLength(SourceLocation Loc,
/// \returns true if there was a failure, false on success.
bool Lexer::getRawToken(SourceLocation Loc, Token &Result,
const SourceManager &SM,
- const LangOptions &LangOpts) {
+ const LangOptions &LangOpts,
+ bool IgnoreWhiteSpace) {
// TODO: this could be special cased for common tokens like identifiers, ')',
// etc to make this faster, if it mattered. Just look at StrData[0] to handle
// all obviously single-char tokens. This could use
@@ -448,7 +449,7 @@ bool Lexer::getRawToken(SourceLocation Loc, Token &Result,
const char *StrData = Buffer.data()+LocInfo.second;
- if (isWhitespace(StrData[0]))
+ if (!IgnoreWhiteSpace && isWhitespace(StrData[0]))
return true;
// Create a lexer starting at the beginning of this token.
OpenPOWER on IntegriCloud