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
___
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
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.
}
};
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
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
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
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
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
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
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
10 matches
Mail list logo