Parse: Don't consider attributes of broken member declarators
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 1 Aug 2013 04:22:55 +0000 (04:22 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 1 Aug 2013 04:22:55 +0000 (04:22 +0000)
commit23252a3672853ded2e1a3eaec159c4f7e1dbc4ca
tree666c9591b39151a130962867ff7a9aa6c3c57a7f
parentb71782b7e510e6088b8970d20ebbf1bbcf662b98
Parse: Don't consider attributes of broken member declarators

ParseCXXClassMemberDeclaration was trying to use the result of
ActOnCXXMemberDeclarator to attach it to some late parsed attributes.

However when failures arise, we have no decl to attach to which
eventually leads us to a NULL pointer dereference.

While we are here, clean up the code a bit.

Fixes PR16765

llvm-svn: 187557
clang/lib/Parse/ParseDeclCXX.cpp
clang/test/Parser/cxx-attributes.cpp