================
@@ -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>();
----------------
AaronBallman wrote:

There's a bit of a gotcha here -- functions without prototypes have a result 
type that could be adjusted, so this will cause an assertion that the caller is 
unlikely to expect. Can we have a fallback for functions without prototypes and 
some test coverage for those?

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

Reply via email to