]> granicus.if.org Git - clang/commit
Follow-up to r217302: Don't crash on ~A::A in a postfix expr suffix followed by '<'.
authorNico Weber <nicolasweber@gmx.de>
Mon, 2 Feb 2015 05:33:50 +0000 (05:33 +0000)
committerNico Weber <nicolasweber@gmx.de>
Mon, 2 Feb 2015 05:33:50 +0000 (05:33 +0000)
commitf794b6635f799d719101ba05821c6c64cd167c2f
tree21384c4576d3b0db5e2967cd779af94fee569630
parentb6321012762b749774c4d6aab3982b488501a45e
Follow-up to r217302: Don't crash on ~A::A in a postfix expr suffix followed by '<'.

This used to crash, complaining "ObjectType and scope specifier cannot coexist":

    struct A { } b = b.~A::A <int>;

The only other caller of ParseOptionalCXXScopeSpecifier() that passes in a
non-empty ObjectType clears the ObjectType of the scope specifier comes back
non-empty (see the tok::period case in Parser::ParsePostfixExpressionSuffix()),
so do that here too.

Found by SLi's bot.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227781 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Parse/ParseExprCXX.cpp
test/Parser/cxx-class.cpp