]> granicus.if.org Git - clang/commit
When we're performing tentative parsing to determine whether the
authorDouglas Gregor <dgregor@apple.com>
Thu, 15 Jul 2010 21:05:01 +0000 (21:05 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 15 Jul 2010 21:05:01 +0000 (21:05 +0000)
commit06b7080b04ba799379469c03471558e4222921ce
treea272f0a1bd7c90531e1e30a636cdd3e9c532f334
parentc57b0ba341c52ac9f3e6410ca4d21eb28019c901
When we're performing tentative parsing to determine whether the
parser is looking at a declaration or an expression, use a '=' to
conclude that we are parsing a declaration.

This is wrong. However, our previous approach of finding a comma after
the '=' is also wrong, because the ',' could be part of a
template-argument-list. So, for now we're going to use the same wrong
heuristic as GCC and Visual C++, because less real-world code is
likely to be broken this way. I've opened PR7655 to keep track of our
wrongness; note also the XFAIL'd test.

Fixes <rdar://problem/8193163>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108459 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Parse/ParseTentative.cpp
test/Parser/cxx-ambig-decl-expr-xfail.cpp [new file with mode: 0644]
test/Parser/cxx-ambig-decl-expr.cpp [new file with mode: 0644]