[PATCH] D97132: [clang-tidy] Harden PreferMemberInitializerCheck
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 22 08:37:31 PST 2021
njames93 added a comment.
In D97132#2578992 <https://reviews.llvm.org/D97132#2578992>, @aaron.ballman wrote:
>> Fix potential crash if macros are used, Now we just don't try to emit a fix.
>
> Can you add a test case that covers this change?
I can try, but I'm not sure of the exact cause of it. It happened when running the check over clang codebase.
The assert was caused by not checking the Optional returned from `findNextToken` which can fail if the location passed is at the end of a macro expansion.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97132/new/
https://reviews.llvm.org/D97132
More information about the cfe-commits
mailing list