[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

Malcolm Parsons via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 19 12:13:57 PST 2016


malcolm.parsons added inline comments.


================
Comment at: clang-tidy/modernize/UseDefaultMemberInitCheck.cpp:77-78
+static bool sameValue(const Expr *E1, const Expr *E2) {
+  E1 = ignoreUnaryPlus(getInitializer(E1->IgnoreImpCasts()));
+  E2 = ignoreUnaryPlus(getInitializer(E2->IgnoreImpCasts()));
+
----------------
aaron.ballman wrote:
> malcolm.parsons wrote:
> > aaron.ballman wrote:
> > > Do you also want to ignore paren expressions?
> > Maybe. 
> > Am I reimplementing some existing clang function here?
> You can use `IgnoreParenImpCasts()` instead.
I mean is sameValue() implemented elsewhere?


https://reviews.llvm.org/D26750





More information about the cfe-commits mailing list