[AST] Really allocate a SmallVector to the right size.
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 4 Aug 2015 13:34:50 +0000 (13:34 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 4 Aug 2015 13:34:50 +0000 (13:34 +0000)
commitc9ba1bd20a7d861feb3a3dd7bbe277c6646ebf47
tree8caa69058276dfca70c69fb90c2489b43609e2b4
parent381b73c96b6b80ef6f0455a1926bd0680f4b2be0
[AST] Really allocate a SmallVector to the right size.

set_size only resets the end pointer and asserts if it is used to grow
the buffer. This would crash when mangling a float with more than 80 bits,
add a test with a ppc double double (128 bits).

Found by inspection.

llvm-svn: 243979
clang/lib/AST/ItaniumMangle.cpp
clang/test/CodeGenCXX/mangle-literal-suffix.cpp