================
@@ -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 {
----------------
shafik wrote:

This does not looks like a good simplification to me. I either would not have 
bothered and just added the `isNull()` check below or I would have created a 
lambda that takes `D` and `R` from below by reference and did the whole set of 
checks and assigned that result to `HasPrototype`.

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