================
@@ -9529,12 +9529,23 @@ static FunctionDecl *CreateNewFunctionDecl(Sema 
&SemaRef, Declarator &D,
     //     declarator to still have a function type. e.g.,
     //       typedef void func(int a);
     //       __attribute__((noreturn)) func other_func; // This has a prototype
+    auto HasFunctionPrototype = [&](QualType T) -> bool {
+      if (T.isNull())
+        return false;
+      if (T->getAs<FunctionProtoType>())
+        return true;
+      if (const FunctionType *Adjusted = T->getAsAdjusted<FunctionType>())
+        return isa<FunctionProtoType>(Adjusted);
----------------
Sirraide wrote:

Does this actually do anything here? As I understand it, `getAs()` should 
already ignore all type sugar

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

Reply via email to