================
@@ -877,8 +878,30 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D,
// In most cases, there's no actual problem with an explicitly-specified
// type, but a function type won't work here, and ActOnVariableDeclarator
- // shouldn't be called for such a type.
- if (R->isFunctionType())
+ // shouldn't be called for such a type.
+ // Recover from invalid pointer declarators by removing pointer chunks
+ // so type deduction can proceed and the bindings remain usable.
+ bool DroppedPointer = false;
+ for (unsigned I = D.getNumTypeObjects(); I > 0; --I) {
----------------
Murthy-Manideep wrote:
I agree with your suggestion. I’ll update the codes to handle only a simple
auto * declaration.
https://github.com/llvm/llvm-project/pull/235427
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits