summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/Lexer.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-06-07 01:10:31 +0000
committerJordan Rose <jordan_rose@apple.com>2012-06-07 01:10:31 +0000
commit288c421b3d9a9c84b310088ce54c11c050775b9f (patch)
tree22f81731b5b482ce8024786e62d937056908feab /clang/lib/Lex/Lexer.cpp
parent161d5bb6f7c958738a9809efe408fb74f7adcafe (diff)
downloadbcm5719-llvm-288c421b3d9a9c84b310088ce54c11c050775b9f.tar.gz
bcm5719-llvm-288c421b3d9a9c84b310088ce54c11c050775b9f.zip
Insert a space if necessary when suggesting CFBridgingRetain/Release.
This was a problem for people who write 'return(result);' Also fix ARCMT's corresponding code, though there's no test case for this because implicit casts like this are rejected by the migrator for being ambiguous, and explicit casts have no problem. <rdar://problem/11577346> llvm-svn: 158130
Diffstat (limited to 'clang/lib/Lex/Lexer.cpp')
-rw-r--r--clang/lib/Lex/Lexer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp
index 4ab0dae1fa1..a806ce34e23 100644
--- a/clang/lib/Lex/Lexer.cpp
+++ b/clang/lib/Lex/Lexer.cpp
@@ -1124,6 +1124,11 @@ static inline bool isRawStringDelimBody(unsigned char c) {
true : false;
}
+// Allow external clients to make use of CharInfo.
+bool Lexer::isIdentifierBodyChar(char c, const LangOptions &LangOpts) {
+ return isIdentifierBody(c) || (c == '$' && LangOpts.DollarIdents);
+}
+
//===----------------------------------------------------------------------===//
// Diagnostics forwarding code.
OpenPOWER on IntegriCloud