[PATCH] Sema: Fix some undefined behaviour when acting on redeclarations
Justin Bogner
mail at justinbogner.com
Mon Jun 22 17:22:00 PDT 2015
If we hit an error already, we may have set Name to nullptr, which
means calling isAcceptableTagRedeclaration hits UB. Avoid this like we
do elsewhere in the function by checking Name first.
We could also fix this by passing OrigName instead, since the name is
only used for diagnostics anyway. Should I do that instead, or is this
good to commit?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ub-clang-sema.patch
Type: text/x-patch
Size: 1360 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150622/c4c1b300/attachment.bin>
More information about the cfe-commits
mailing list