mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 11:35:51 -04:00

Summary: Instead of asserting all typos are corrected in the sema destructor. The sema destructor is not run in the common case of running the compiler with the -disable-free cc1 flag (which is the default in the driver). Having this assertion led to crashes in libclang and clangd, which are not reproducible when running the compiler. Asserting at the end of the TU could be an option, but finding all missing typo correction cases is hard and having worse diagnostics instead of a failing assertion is a better trade-off. For more discussion on this, see: https://lists.llvm.org/pipermail/cfe-dev/2019-July/062872.html Reviewers: sammccall, rsmith Reviewed By: rsmith Subscribers: usaxena95, dgoldman, jkorous, vsapsai, rnk, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64799 llvm-svn: 374152
17 lines
569 B
Objective-C
17 lines
569 B
Objective-C
// RUN: %clang_cc1 -triple i386-apple-macosx10.10 -fobjc-arc -fsyntax-only -Wno-objc-root-class %s -verify
|
|
|
|
@class Dictionary;
|
|
|
|
@interface Test
|
|
@end
|
|
@implementation Test
|
|
// rdar://problem/47403222
|
|
- (void)rdar47403222:(Dictionary *)opts {
|
|
[self undeclaredMethod:undeclaredArg];
|
|
// expected-error@-1{{no visible @interface for 'Test' declares the selector 'undeclaredMethod:'}}
|
|
// expected-error@-2{{use of undeclared identifier 'undeclaredArg}}
|
|
opts[(__bridge id)undeclaredKey] = 0;
|
|
// expected-error@-1{{use of undeclared identifier 'undeclaredKey'}}
|
|
}
|
|
@end
|