[PATCH] D31235: Enhance -Wshadow to warn when shadowing typedefs or type aliases

2017-04-03 Thread Ahmed Asadi via Phabricator via cfe-commits
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.

[PATCH] D31235: Enhance -Wshadow to warn when shadowing typedefs or type aliases

2017-03-30 Thread Ahmed Asadi via Phabricator via cfe-commits
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

[PATCH] D31235: Enhance -Wshadow to warn when shadowing typedefs or type aliases

2017-03-30 Thread Ahmed Asadi via Phabricator via cfe-commits
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

[PATCH] D31235: Enhance -Wshadow to warn when shadowing typedefs or type aliases

2017-03-28 Thread Ahmed Asadi via Phabricator via cfe-commits
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

[PATCH] D31235: Enhance -Wshadow to warn when shadowing typedefs or type aliases

2017-03-28 Thread Ahmed Asadi via Phabricator via cfe-commits
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

[PATCH] D31235: Enhance -Wshadow to warn when shadowing typedefs or type aliases

2017-03-22 Thread Ahmed Asadi via Phabricator via cfe-commits
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

[PATCH] D31235: Enhance -Wshadow to warn when shadowing typedefs or type aliases

2017-03-22 Thread Ahmed Asadi via Phabricator via cfe-commits
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:

[PATCH] D31235: Enhance -Wshadow to warn when shadowing typedefs or type aliases

2017-03-22 Thread Ahmed Asadi via Phabricator via cfe-commits
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:

[PATCH] D31069: Don't warn about an unreachable fallthrough annotation in a template function

2017-03-17 Thread Ahmed Asadi via Phabricator via cfe-commits
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

[PATCH] D31069: Don't warn about an unreachable fallthrough annotation in a template function

2017-03-16 Thread Ahmed Asadi via Phabricator via 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