================
@@ -5262,7 +5260,41 @@ Sema::DeduceAutoType(TypeLoc Type, Expr *Init, QualType 
&Result,
 
     DeducedType = getDecltypeForExpr(Init);
     assert(!DeducedType.isNull());
-  } else {
+  } else if (CanTryFastPath) {
+    // Fast-path a subset of `auto` deduction for non-init-list cases in
+    // non-ObjC and non-OpenCL language modes. For these cases, the deduced
+    // type can be computed directly from the initializer type by removing
+    // references, applying array/function decay, and dropping top-level
+    // cv-qualifiers. For single-level `auto*` declarators, the deduced type
+    // is the pointee type of the processed initializer type.
+
+    QualType TypeTy = Type.getType();
----------------
Sirraide wrote:

Please don’t call a variable `TypeTy`; maybe `DeclaredTy` or sth like that

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

Reply via email to