================
@@ -1190,6 +1190,11 @@ void Sema::ActOnPragmaAttributePop(SourceLocation 
PragmaLoc,
 void Sema::AddPragmaAttributes(Scope *S, Decl *D) {
   if (PragmaAttributeStack.empty())
     return;
+
+  if (ParmVarDecl *P = dyn_cast<ParmVarDecl>(D))
+    if (P->getIdentifier() == nullptr && P->getType()->isVoidType())
----------------
AaronBallman wrote:

```suggestion
    if (P->getType()->isVoidType())
```
I don't think we need to look at the identifier; a `void` parameter has to be 
unnamed anyway.

https://github.com/llvm/llvm-project/pull/124920
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to