rjmccall added a comment.

Oh thank goodness, they finally fixed this.



================
Comment at: clang/lib/Sema/SemaDecl.cpp:4365
+  // C++ [dcl.typedef]p9: [P1766R1]
+  //   An unnamed class with a typedef name for linkage purposes shall not
+  if (RD->isInvalidDecl())
----------------
Starting the quote here makes it look like it's describing the invalid-decl 
short-circuit just below.


================
Comment at: clang/lib/Sema/SemaDecl.cpp:4394
+        isa<EnumDecl>(D))
+      continue;
+
----------------
This is essentially part of the next paragraph.

I believe `friend` declarations also do not declare "members", under the same 
logic allowing `static_assert`.


================
Comment at: clang/lib/Sema/SemaDecl.cpp:4404
+    if (MemberRD->isLambda())
+      return {NonCLikeKind::Lambda, MemberRD->getSourceRange()};
+
----------------
Do lambdas in nested expressions really get added to the class's decls list?  I 
wouldn't have expected that, but it definitely makes this check a lot easier.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74103/new/

https://reviews.llvm.org/D74103



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to