HomePhabricator

llvm-undname: Fix nullptr deref on invalid conversion operator names in…

Authored by thakis on Apr 15 2019, 9:42 AM.

Description

llvm-undname: Fix nullptr deref on invalid conversion operator names in template args

A ConversionOperatorIdentifierNode has a TargetType which is read when
printing it, but if the ConversionOperatorIdentifierNode appears in a
template argument there's nothing that can provide the TargetType.
Normally the COIN is a symbol (leaf) name and takes its TargetType from the
symbol's type, but in a template argument context the COIN can only be
either a non-leaf name piece or a type, and must hence be invalid.

Similar to the COIN check in demangleDeclarator().

Found by oss-fuzz.

llvm-svn: 358421

Details

Committed
thakisApr 15 2019, 9:42 AM
Parents
rG0e0bb0e24a0c: [EarlyCSE] add tests for selects with commuted operands (PR41101); NFC
Branches
Unknown
Tags
Unknown