vsapsai added a comment.

My concern with this approach is I'm not sure if 
`isEquivalentInternalLinkageDeclaration` is a desired long-term solution for 
anonymous C++ enums. If it is, we can piggy-back on it, otherwise hitching our 
wagon to this train might be undesirable.

Also I need to check the patch again because NonExternal != Internal is not 
easy for my comprehension.



================
Comment at: clang/test/Modules/ambiguous-anonymous-enum-lookup.m.cpp:9
+#define TEXTUAL_H
+enum { kAnonymousEnumValue = 0 };
+#endif
----------------
For enums it is nice to test having a constant that references another constant 
in the same enum. E.g., `kAnonymousEnumAnotherValue = kAnonymousEnumValue + 1`.


================
Comment at: clang/test/Modules/ambiguous-anonymous-enum-lookup.m.cpp:38
+
+int testReferencingAnonymousEnumConstant() {
+  return kAnonymousEnumValue; // expected-no-diagnostics
----------------
Should we test also non-equivalent enums or is it tested somewhere else?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121465

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D121465: WIP: [cl... Jan Svoboda via Phabricator via cfe-commits
    • [PATCH] D121465: WIP... Volodymyr Sapsai via Phabricator via cfe-commits

Reply via email to