]> granicus.if.org Git - clang/commit
The grammar for GNU typeof in C requires an expression to be
authorDouglas Gregor <dgregor@apple.com>
Wed, 28 Jul 2010 18:22:12 +0000 (18:22 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 28 Jul 2010 18:22:12 +0000 (18:22 +0000)
commit2a3a1bd20e62205260eb2ba3f91a2b6b2db3ffb8
treee2367101cc7da9e28789ada773f4334c1401d358
parent7e86b28924a171a26d970bed5a163b39d3629577
The grammar for GNU typeof in C requires an expression to be
parenthesized, unlike in C++, e.g.,

  C has: typeof ( expression)
  C++ has: typeof unary-expression

So, once we've parsed a parenthesized expression after typeof, we
should only go on to parse the postfix expression suffix if we're in
C++. Fixes <rdar://problem/8237491>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109606 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Parse/ParseExpr.cpp
test/Parser/typeof.c