forked from OSchip/llvm-project
Avoid duplicate unavailbility diagnostics in objc++.
// rdar://10268422 llvm-svn: 142078
This commit is contained in:
parent
3a46b375e2
commit
c27cd1b881
|
@ -1078,7 +1078,9 @@ ExprResult Sema::BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo,
|
|||
return ExprError();
|
||||
}
|
||||
assert(Class && "We don't know which class we're messaging?");
|
||||
(void)DiagnoseUseOfDecl(Class, Loc);
|
||||
// objc++ diagnoses during typename annotation.
|
||||
if (!getLangOptions().CPlusPlus)
|
||||
(void)DiagnoseUseOfDecl(Class, Loc);
|
||||
// Find the method we are messaging.
|
||||
if (!Method) {
|
||||
if (Class->isForwardDecl()) {
|
||||
|
|
|
@ -43,3 +43,13 @@ void test(C *c) {
|
|||
|
||||
}
|
||||
|
||||
// rdar://10268422
|
||||
__attribute ((deprecated))
|
||||
@interface DEPRECATED
|
||||
+(id)new;
|
||||
@end
|
||||
|
||||
void foo() {
|
||||
[DEPRECATED new]; // expected-warning {{warning: 'DEPRECATED' is deprecated}}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue