[PATCH] D26118: [clang-tidy] Change readability-redundant-member-init to get base type from constructor
Malcolm Parsons via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 1 14:10:41 PDT 2016
malcolm.parsons added inline comments.
================
Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:57
"initializer for base class %0 is redundant")
- << Init->getTypeSourceInfo()->getType()
+ << Construct->getType()
<< FixItHint::CreateRemoval(Init->getSourceRange());
----------------
aaron.ballman wrote:
> Why is it more correct to use the CXXConstructExpr type information rather than the CXXCtorInitializer?
Something to do with templates and namespaces.
In the bug report, `CXXCtorInitializer` had type `std::__1::bitset<128>` and `CXXConstructExpr` had type `std::bitset<MAX_SUBTARGET_FEATURES>`.
I don't know why.
Repository:
rL LLVM
https://reviews.llvm.org/D26118
More information about the cfe-commits
mailing list