[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 19 08:52:37 PDT 2024


================
@@ -3140,13 +3184,20 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T,
   return cast<FunctionType>(Result.getTypePtr());
 }
 
+QualType ASTContext::adjustFunctionResultType(QualType FunctionType,
+                                              QualType ResultType) {
+  return adjustType(FunctionType, [&](QualType Orig) {
+    const auto *FPT = Orig->castAs<FunctionProtoType>();
----------------
Sirraide wrote:

Ah, good point. I forgot that prototypeless functions can still have result types.

(Side note: I also just somehow managed to edit your comment instead of posting this one...)

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


More information about the cfe-commits mailing list