Handle blocks in the tree transform for the typo correction as otherwise, the
capture may miss. This would trigger an assertion. Thanks to Doug Gregor for
the help with this!
Fixes PR25001.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251729
91177308-0d34-0410-b5e6-
96231b3b80d8
ExprResult TransformLambdaExpr(LambdaExpr *E) { return Owned(E); }
+ ExprResult TransformBlockExpr(BlockExpr *E) { return Owned(E); }
+
ExprResult Transform(Expr *E) {
ExprResult Res;
while (true) {
--- /dev/null
+// RUN: %clang_cc1 -triple i386-apple-macosx -fblocks -fsyntax-only -verify %s
+
+extern int h(int *);
+extern void g(int, void (^)(void));
+extern int fuzzys; // expected-note {{'fuzzys' declared here}}
+
+static void f(void *v) {
+ g(fuzzy, ^{ // expected-error {{did you mean 'fuzzys'}}
+ int i = h(v);
+ });
+}
+