mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 17:26:06 +00:00

delayed diagnostic This fix avoids an infinite recursion that was uncovered in one of our internal tests by r301992. The testcase is the most reduced version of that auto-generated test. This is an improved version of the reverted commit r302037. The previous fix actually managed to expose another subtle bug whereby `fatal_too_many_errors` error was reported twice, with the second report setting the `FatalErrorOccurred` flag. That prevented the notes that followed the diagnostic the caused `fatal_too_many_errors` to be emitted. This commit ensures that notes that follow `fatal_too_many_errors` but that belong to the diagnostic that caused `fatal_too_many_errors` won't be emitted by setting the `FatalErrorOccurred` when emitting `fatal_too_many_errors`. rdar://31962618 llvm-svn: 302151
30 lines
393 B
Plaintext
30 lines
393 B
Plaintext
// RUN: env CINDEXTEST_KEEP_GOING=1 c-index-test -code-completion-at=%s:25:1 %s
|
|
// Shouldn't crash!
|
|
// This is the minimized test that triggered an infinite recursion:
|
|
|
|
+(BOOL) onEntity {
|
|
}
|
|
|
|
-(const Object &) a_200 {
|
|
}
|
|
|
|
-(int) struct {
|
|
}
|
|
|
|
-(int) bar {
|
|
}
|
|
|
|
-(int) part {
|
|
}
|
|
|
|
+(some_type_t) piece {
|
|
}
|
|
|
|
+(void) z_Z_42 {
|
|
([self onEntity: [] { 42];
|
|
} class: ^ { }
|
|
];
|
|
[super];
|
|
BOOL struct;
|
|
}
|