aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseTentative.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-22 01:15:33 +0000
committerChris Lattner <sabre@nondot.org>2008-11-22 01:15:33 +0000
commita4f34eaab2c8b32582af339279d5dc9ba648174c (patch)
tree1f5fff5c41ea906d85a1c4d0e615da3e2ca9f75f /lib/Parse/ParseTentative.cpp
parent9634379265855f1628190e926d9aaf1fb4a5d90e (diff)
Teach tentative parsing to handle block pointers (rdar://6394309)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59853 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseTentative.cpp')
-rw-r--r--lib/Parse/ParseTentative.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp
index ccaae6d3b2..3c50884c9c 100644
--- a/lib/Parse/ParseTentative.cpp
+++ b/lib/Parse/ParseTentative.cpp
@@ -399,7 +399,8 @@ Parser::TPResult Parser::TryParseDeclarator(bool mayBeAbstract,
// ptr-operator declarator
while (1) {
- if (Tok.is(tok::star) || Tok.is(tok::amp)) {
+ if (Tok.is(tok::star) || Tok.is(tok::amp) ||
+ (Tok.is(tok::caret) && getLang().Blocks)) {
// ptr-operator
ConsumeToken();
while (Tok.is(tok::kw_const) ||