[PATCH] D57665: [clang-tidy] Handle unions with existing default-member-init
Bruno Ricci via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 3 14:36:36 PST 2019
riccibruno added a comment.
Just to make sure I understand the issue correctly (and so please correct me if I am wrong):
The union member `e` leads to an `IndirectFieldDecl` in the record for `UnionExisting`. Then `CXXCtorInitializer::getMember` returns null since the initialized member is not a `FieldDecl`, but an `IndirectFieldDecl`. Using `CXXCtorInitializer::getAnyMember` handles both `FieldDecl`s and `IndirectFieldDecl`s, which solves the issue.
Looks OK but probably better to wait for someone else to give the OK ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57665/new/
https://reviews.llvm.org/D57665
More information about the cfe-commits
mailing list