[PATCH] D52421: [Sema] Diagnose parameter names that shadow inherited field names

2018-11-06 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D52421#1288917, @aaron.ballman wrote: > In https://reviews.llvm.org/D52421#1288910, @lebedev.ri wrote: > > > ... > > > ... Ok, thank you for reassuring me that it is working as intended. https://reviews.llvm.org/D52421 ___

[PATCH] D52421: [Sema] Diagnose parameter names that shadow inherited field names

2018-11-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D52421#1288910, @lebedev.ri wrote: > And now i'm having concerns. > > struct Base { > void* f; > }; > > struct Inherit : Base { > static void func(void* f) { // <- does 'f' *actually* shadow the 'f' in > the 'Base'? Y

[PATCH] D52421: [Sema] Diagnose parameter names that shadow inherited field names

2018-11-06 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. And now i'm having concerns. struct Base { void* f; }; struct Inherit : Base { static void func(void* f) { // <- does 'f' *actually* shadow the 'f' in the 'Base'? You can't access that non-static member variable from static function. } };

[PATCH] D52421: [Sema] Diagnose parameter names that shadow inherited field names

2018-11-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit in r346041. https://reviews.llvm.org/D52421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52421: [Sema] Diagnose parameter names that shadow inherited field names

2018-11-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. @rsmith -- any thoughts on this before I commit? https://reviews.llvm.org/D52421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52421: [Sema] Diagnose parameter names that shadow inherited field names

2018-09-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision. lebedev.ri added a comment. This revision is now accepted and ready to land. This looks good to me, but you probably want to wait for someone else to review this, too. https://reviews.llvm.org/D52421 ___ cfe-commi

[PATCH] D52421: [Sema] Diagnose parameter names that shadow inherited field names

2018-09-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaDecl.cpp:12380-12382 } + if (LangOpts.CPlusPlus && II) { lebedev.ri wrote: > I think you could move it into the `if()` above? You are correct, I'll hoist it. https://reviews.llvm.org/D52421

[PATCH] D52421: [Sema] Diagnose parameter names that shadow inherited field names

2018-09-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 166716. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. Updated based on review feedback. https://reviews.llvm.org/D52421 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaDec

[PATCH] D52421: [Sema] Diagnose parameter names that shadow inherited field names

2018-09-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Thanks! Comment at: lib/Sema/SemaDecl.cpp:12380-12382 } + if (LangOpts.CPlusPlus && II) { I think you could move it into the `if()` above? https://reviews.llvm.org/D52421 ___ cfe

[PATCH] D52421: [Sema] Diagnose parameter names that shadow inherited field names

2018-09-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: lebedev.ri, rsmith, dblaikie. This patch diagnoses parameter names that shadow the names of inherited fields under -Wshadow-field. It addresses PR34120. Note, unlike GCC, we take into account the accessibility of the field when