[cfe-commits] r55468 - /cfe/trunk/lib/Parse/ParseDecl.cpp
Steve Naroff
snaroff at apple.com
Thu Aug 28 03:07:07 PDT 2008
Author: snaroff
Date: Thu Aug 28 05:07:06 2008
New Revision: 55468
URL: http://llvm.org/viewvc/llvm-project?rev=55468&view=rev
Log:
Fix Parser::ParseDeclaratorInternal(): add langopts test when recognizing blocks.
Modified:
cfe/trunk/lib/Parse/ParseDecl.cpp
Modified: cfe/trunk/lib/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=55468&r1=55467&r2=55468&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Thu Aug 28 05:07:06 2008
@@ -1116,10 +1116,10 @@
(Kind != tok::caret || !getLang().Blocks))
return ParseDirectDeclarator(D);
- // Otherwise, '*' -> pointer or '&' -> reference.
+ // Otherwise, '*' -> pointer, '^' -> block, '&' -> reference.
SourceLocation Loc = ConsumeToken(); // Eat the * or &.
- if (Kind == tok::star || Kind == tok::caret) {
+ if (Kind == tok::star || (Kind == tok::caret && getLang().Blocks)) {
// Is a pointer.
DeclSpec DS;
More information about the cfe-commits
mailing list