=?utf-8?q?Björn?= Svensson <[email protected]>,
=?utf-8?q?Björn?= Svensson <[email protected]>,
=?utf-8?q?Björn?= Svensson <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>


================
@@ -37,10 +59,13 @@ static bool isOnlyFirstEnumeratorInitialized(const EnumDecl 
&Node) {
   return !IsFirst;
 }
 
-static bool areAllEnumeratorsInitialized(const EnumDecl &Node) {
-  return llvm::all_of(Node.enumerators(), [](const EnumConstantDecl *ECD) {
-    return ECD->getInitExpr() != nullptr;
-  });
+static bool areAllEnumeratorsInitialized(const EnumDecl &Node,
+                                         bool AllowSelfRefs) {
+  return llvm::all_of(Node.enumerators(),
+                      [AllowSelfRefs](const EnumConstantDecl *ECD) {
+                        return isAllowedSelfReference(ECD, AllowSelfRefs) ||
----------------
zwuis wrote:

This condition is redundant.

https://github.com/llvm/llvm-project/pull/189459
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to