ahmedasadi updated this revision to Diff 94007.
ahmedasadi added a comment.
Updated diff to address Eric's comment - it's best not to issue a warning if
the shadowing declaration is part of a class (this is what GCC currently does).
I will need someone to commit this new patch for me.
https://
ahmedasadi added a comment.
Thanks for reviewing. Would you be able to commit this patch for me, as I do
not have commit access?
https://reviews.llvm.org/D31235
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/m
ahmedasadi updated this revision to Diff 93583.
ahmedasadi marked an inline comment as done.
ahmedasadi added a comment.
Re-ordered the checks in shouldWarnIfShadowedDecl as suggested by rnk.
https://reviews.llvm.org/D31235
Files:
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sem
ahmedasadi updated this revision to Diff 93342.
ahmedasadi marked 4 inline comments as done.
https://reviews.llvm.org/D31235
Files:
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/Sema/SemaDecl.cpp
test/SemaCXX/warn-shadow.cpp
Index: test/SemaCXX/warn-shadow.cpp
ahmedasadi marked 3 inline comments as done.
ahmedasadi added inline comments.
Comment at: test/SemaCXX/warn-shadow.cpp:65
char *data; // expected-warning {{declaration shadows a static data member
of 'A'}}
+char *a1; // expected-warning {{declaration shadows a typedef
ahmedasadi added inline comments.
Comment at: lib/Sema/SemaDecl.cpp:6753
// the constructor initializes the field with the parameter.
-if (isa(NewDC) && isa(D)) {
- // Remember that this was shadowed so we can either warn about its
- // modification or its exis
ahmedasadi updated this revision to Diff 92659.
ahmedasadi added a comment.
Updated diff to include context.
https://reviews.llvm.org/D31235
Files:
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/Sema/SemaDecl.cpp
test/SemaCXX/warn-shadow.cpp
Index: test/SemaCX
ahmedasadi created this revision.
Enhance -Wshadow to emit a warning when typedefs or type aliases are shadowed,
or when it shadows a variable.
Bug:
https://bugs.llvm.org//show_bug.cgi?id=28676
Repository:
rL LLVM
https://reviews.llvm.org/D31235
Files:
include/clang/Basic/DiagnosticSema
ahmedasadi added a comment.
Thanks for reviewing. Yes, I need someone to commit for me.
https://reviews.llvm.org/D31069
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ahmedasadi updated this revision to Diff 92104.
ahmedasadi added a comment.
Added a test case.
https://reviews.llvm.org/D31069
Files:
lib/Sema/AnalysisBasedWarnings.cpp
test/SemaCXX/P30636.cpp
Index: test/SemaCXX/P30636.cpp
=
10 matches
Mail list logo