Remove an assert that's not true on invalid code.
authorNico Weber <nicolasweber@gmx.de>
Sun, 4 Jan 2015 20:32:12 +0000 (20:32 +0000)
committerNico Weber <nicolasweber@gmx.de>
Sun, 4 Jan 2015 20:32:12 +0000 (20:32 +0000)
commit49e6bc024d0269f580e8601aecf17eaf5537df50
tree3b13a6f2eceb700c87a1fc68bec60c3a5bb12dd3
parent1e94ef5bd09cc47f335d26a98469ca70c4226900
Remove an assert that's not true on invalid code.

r185773 added an assert that checked that a CXXUnresolvedConstructExpr either
has a valid rparen, or exactly one argument.  This doesn't have to be true for
invalid inputs.  Convert the assert to an if, and add a test for this case.

Found by SLi's afl bot.

llvm-svn: 225140
clang/include/clang/AST/ExprCXX.h
clang/test/Misc/ast-dump-invalid.cpp [new file with mode: 0644]
clang/test/SemaCXX/return.cpp