-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[parser] If there are unmatched braces in a function definition, try to
recover by returning the statements that we parsed so far, instead of dropping the whole function body. rdar://10967343 llvm-svn: 153367
- Loading branch information
Showing
3 changed files
with
28 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
void foo() { | ||
int x; | ||
if (x) { | ||
} | ||
|
||
// RUN: c-index-test -cursor-at=%s:2:7 %s > %t | ||
// RUN: FileCheck %s -input-file %t | ||
|
||
// CHECK: VarDecl=x:2:7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@implementation I | ||
-(void)meth { | ||
int x; | ||
if (x) { | ||
} | ||
@end | ||
|
||
// RUN: c-index-test -cursor-at=%s:3:7 %s > %t | ||
// RUN: FileCheck %s -input-file %t | ||
|
||
// CHECK: VarDecl=x:3:7 |