mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 03:56:16 +08:00
Fix rdar://6814047, a crash on invalid in blocks code I noticed when
working on the previous fix. llvm-svn: 69742
This commit is contained in:
@@ -4755,8 +4755,8 @@ void Sema::ActOnBlockError(SourceLocation CaretLoc, Scope *CurScope) {
|
||||
CurFunctionNeedsScopeChecking = CurBlock->SavedFunctionNeedsScopeChecking;
|
||||
|
||||
// Pop off CurBlock, handle nested blocks.
|
||||
PopDeclContext();
|
||||
CurBlock = CurBlock->PrevBlockInfo;
|
||||
|
||||
// FIXME: Delete the ParmVarDecl objects as well???
|
||||
}
|
||||
|
||||
|
||||
@@ -112,6 +112,13 @@ void test11(int i) {
|
||||
^{ break; }(); // expected-error {{'break' statement not in loop or switch statement}}
|
||||
}
|
||||
|
||||
|
||||
void (^test12f)(void);
|
||||
void test12() {
|
||||
test12f = ^test12f; // expected-error {{type name requires a specifier or qualifier}} expected-error {{expected expression}}
|
||||
}
|
||||
|
||||
|
||||
// rdar://6808730
|
||||
void *test13 = ^{
|
||||
int X = 32;
|
||||
@@ -131,9 +138,3 @@ void test14() {
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
void (^test12f)(void);
|
||||
void test12() {
|
||||
test12f = ^test12f; // expected-error {{type name requires a specifier or qualifier}} expected-error {{expected expression}}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user