[PATCH] D97132: [clang-tidy] Harden PreferMemberInitializerCheck
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 20 17:37:01 PST 2021
njames93 created this revision.
njames93 added reviewers: aaron.ballman, alexfh, baloghadamsoftware, gribozavr2.
Herald added subscribers: rnkovacs, kbarton, xazax.hun, nemanjai.
njames93 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Prevent warning when the values are initialized using fields that will be initialized later or VarDecls defined in the constructors body.
Both of these cases can't be safely fixed.
Also improve logic of finding where to insert member initializers, previously it could be confused by in class member initializers.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D97132
Files:
clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMemberInitializerCheck.cpp
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-prefer-member-initializer.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97132.325265.patch
Type: text/x-patch
Size: 9762 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210221/fa2efeea/attachment-0001.bin>
More information about the cfe-commits
mailing list