[PATCH] D80977: Diagnose cases where the name of a class member is used within a class definition before the member name is declared.

2020-12-10 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 311085. rsmith added a comment. Rebase and fix test failure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80977/new/ https://reviews.llvm.org/D80977 Files: clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D80977: Diagnose cases where the name of a class member is used within a class definition before the member name is declared.

2020-06-19 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. (Partial review; I'll continue reviewing later.) Comment at: clang/lib/Sema/SemaDecl.cpp:1543 +// in class 'C', where we look up 'f' to determine if we're declaring a +// constructor. + } else if (D->isInIdentifierNamespace(Lookup.FirstIDNS))

[PATCH] D80977: Diagnose cases where the name of a class member is used within a class definition before the member name is declared.

2020-06-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I'm not entirely happy with this approach; there are lots of places where we perform lookups that are incidental and shouldn't result in an error if we end up looking outside the class, and I'm not sure I've marked them all as "synthetic". That said, I've tested this

[PATCH] D80977: Diagnose cases where the name of a class member is used within a class definition before the member name is declared.

2020-06-01 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added a reviewer: rnk. Herald added a project: clang. This is ill-formed per [basic.scope.class]p2. This is done by tracking all unqualified lookups performed within the scope of a class definition that find nothing within the class, and checking for