[clang] [NFC][Clang] Fix enumerated mismatch warning (PR #112816)

via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 19 08:42:59 PDT 2024


================
@@ -3148,11 +3148,13 @@ Parser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration(
   // we did nothing here, but this allows us to issue a more
   // helpful diagnostic.
   if (Tok.is(tok::kw_concept)) {
-    Diag(Tok.getLocation(),
-         DS.isFriendSpecified() || NextToken().is(tok::kw_friend)
-             ? diag::err_friend_concept
-             : diag::
-                   err_concept_decls_may_only_appear_in_global_namespace_scope);
+    Diag(
+        Tok.getLocation(),
+        DS.isFriendSpecified() || NextToken().is(tok::kw_friend)
+            ? unsigned(diag::err_friend_concept)
----------------
cor3ntin wrote:

```suggestion
            ? llvm::to_underlying(diag::err_friend_concept)
```

https://github.com/llvm/llvm-project/pull/112816


More information about the cfe-commits mailing list