aboutsummaryrefslogtreecommitdiff
path: root/clang
diff options
context:
space:
mode:
authorErik Pilkington <erik.pilkington@gmail.com>2019-01-14 19:17:31 +0000
committerErik Pilkington <erik.pilkington@gmail.com>2019-01-14 19:17:31 +0000
commit0535b0f387317cc3a7c0ad75a04774efb8fce3be (patch)
tree40cc109916403ca29dcd18b9a0ad8e38e1b3712a /clang
parent0e0ccaf7d5df6884df0317715d56b3486483f74a (diff)
Improve a -Wunguarded-availability note
Mention the deployment target, and don't say "partial" which doesn't really mean anything to users. rdar://problem/33601513 Differential revision: https://reviews.llvm.org/D56523 llvm-svn: 351108
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Basic/DiagnosticSemaKinds.td5
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp31
-rw-r--r--clang/lib/Sema/SemaExpr.cpp2
-rw-r--r--clang/test/Sema/attr-availability.c6
-rw-r--r--clang/test/Sema/availability-guard-format.mm4
-rw-r--r--clang/test/SemaObjC/attr-availability.m18
-rw-r--r--clang/test/SemaObjC/property-deprecated-warning.m11
-rw-r--r--clang/test/SemaObjC/unguarded-availability-new.m8
-rw-r--r--clang/test/SemaObjC/unguarded-availability.m36
9 files changed, 65 insertions, 56 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index 78ecc8784ad8..5feb877e46c5 100644
--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -4565,7 +4565,10 @@ def warn_unavailable_fwdclass_message : Warning<
InGroup<UnavailableDeclarations>;
def note_availability_specified_here : Note<
"%0 has been explicitly marked "
- "%select{unavailable|deleted|deprecated|partial}1 here">;
+ "%select{unavailable|deleted|deprecated}1 here">;
+def note_partial_availability_specified_here : Note<
+ "%0 has been marked as being introduced in %1 %2 here, "
+ "but the deployment target is %1 %3">;
def note_implicitly_deleted : Note<
"explicitly defaulted function was implicitly deleted here">;
def warn_not_enough_argument : Warning<
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index bb4bb7da2fb1..0e10804a2ec7 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -7584,14 +7584,16 @@ static void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K,
unsigned Warning = UseNewWarning ? diag::warn_unguarded_availability_new
: diag::warn_unguarded_availability;
- S.Diag(Loc, Warning)
- << OffendingDecl
- << AvailabilityAttr::getPrettyPlatformName(
- S.getASTContext().getTargetInfo().getPlatformName())
- << Introduced.getAsString();
+ std::string PlatformName = AvailabilityAttr::getPrettyPlatformName(
+ S.getASTContext().getTargetInfo().getPlatformName());
- S.Diag(OffendingDecl->getLocation(), diag::note_availability_specified_here)
- << OffendingDecl << /* partial */ 3;
+ S.Diag(Loc, Warning) << OffendingDecl << PlatformName
+ << Introduced.getAsString();
+
+ S.Diag(OffendingDecl->getLocation(),
+ diag::note_partial_availability_specified_here)
+ << OffendingDecl << PlatformName << Introduced.getAsString()
+ << S.Context.getTargetInfo().getPlatformMinVersion().getAsString();
if (const auto *Enclosing = findEnclosingDeclToAnnotate(Ctx)) {
if (const auto *TD = dyn_cast<TagDecl>(Enclosing))
@@ -8045,15 +8047,18 @@ void DiagnoseUnguardedAvailability::DiagnoseDeclAvailability(
? diag::warn_unguarded_availability_new
: diag::warn_unguarded_availability;
+ std::string PlatformName = AvailabilityAttr::getPrettyPlatformName(
+ SemaRef.getASTContext().getTargetInfo().getPlatformName());
+
SemaRef.Diag(Range.getBegin(), DiagKind)
- << Range << D
- << AvailabilityAttr::getPrettyPlatformName(
- SemaRef.getASTContext().getTargetInfo().getPlatformName())
- << Introduced.getAsString();
+ << Range << D << PlatformName << Introduced.getAsString();
SemaRef.Diag(OffendingDecl->getLocation(),
- diag::note_availability_specified_here)
- << OffendingDecl << /* partial */ 3;
+ diag::note_partial_availability_specified_here)
+ << OffendingDecl << PlatformName << Introduced.getAsString()
+ << SemaRef.Context.getTargetInfo()
+ .getPlatformMinVersion()
+ .getAsString();
auto FixitDiag =
SemaRef.Diag(Range.getBegin(), diag::note_unguarded_available_silence)
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 31d7407b0ab7..d5416d4d057c 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -121,7 +121,7 @@ void Sema::NoteDeletedFunction(FunctionDecl *Decl) {
return NoteDeletedInheritingConstructor(Ctor);
Diag(Decl->getLocation(), diag::note_availability_specified_here)
- << Decl << true;
+ << Decl << 1;
}
/// Determine whether a FunctionDecl was ever declared with an
diff --git a/clang/test/Sema/attr-availability.c b/clang/test/Sema/attr-availability.c
index 4a266382529a..dbdf6593c3f7 100644
--- a/clang/test/Sema/attr-availability.c
+++ b/clang/test/Sema/attr-availability.c
@@ -16,13 +16,13 @@ extern void
ATSFontGetPostScriptName(int flags) __attribute__((availability(macosx,introduced=8.0,obsoleted=9.0, message="use ATSFontGetFullPostScriptName"))); // expected-note {{'ATSFontGetPostScriptName' has been explicitly marked unavailable here}}
#if defined(WARN_PARTIAL)
-// expected-note@+3 {{has been explicitly marked partial here}}
+// expected-note@+3 {{'PartiallyAvailable' has been marked as being introduced in macOS 10.8 here, but the deployment target is macOS 10.5.0}}
#endif
extern void
PartiallyAvailable() __attribute__((availability(macosx,introduced=10.8)));
#ifdef WARN_PARTIAL
-// expected-note@+2 2 {{marked partial here}}
+// expected-note@+2 2 {{'PartialEnum' has been marked as being introduced in macOS 10.8 here, but the deployment target is macOS 10.5.0}}
#endif
enum __attribute__((availability(macosx,introduced=10.8))) PartialEnum {
kPartialEnumConstant,
@@ -41,7 +41,7 @@ void test_10095131() {
#ifdef WARN_PARTIAL
// FIXME: This note should point to the declaration with the availability
// attribute.
-// expected-note@+2 {{marked partial here}}
+// expected-note@+2 {{'PartiallyAvailable' has been marked as being introduced in macOS 10.8 here, but the deployment target is macOS 10.5.0}}
#endif
extern void PartiallyAvailable() ;
void with_redeclaration() {
diff --git a/clang/test/Sema/availability-guard-format.mm b/clang/test/Sema/availability-guard-format.mm
index 910de49ffc81..0e158c4173c2 100644
--- a/clang/test/Sema/availability-guard-format.mm
+++ b/clang/test/Sema/availability-guard-format.mm
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macosx-10.11 -Wunguarded-availability -fdiagnostics-parseable-fixits -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.11 -Wunguarded-availability -fdiagnostics-parseable-fixits -fsyntax-only -verify %s
// Testing that even for source code using '_' as a delimiter in availability version tuple '.' is actually used in diagnostic output as a delimiter.
@interface foo
-- (void) method_bar __attribute__((availability(macosx, introduced = 10_12))); // expected-note {{'method_bar' has been explicitly marked partial here}}
+- (void) method_bar __attribute__((availability(macosx, introduced = 10_12))); // expected-note {{'method_bar' has been marked as being introduced in macOS 10.12 here, but the deployment target is macOS 10.11.0}}
@end
int main() {
diff --git a/clang/test/SemaObjC/attr-availability.m b/clang/test/SemaObjC/attr-availability.m
index da1a664e9122..eb25175c5a4a 100644
--- a/clang/test/SemaObjC/attr-availability.m
+++ b/clang/test/SemaObjC/attr-availability.m
@@ -5,7 +5,7 @@
- (void)proto_method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expected-note 2 {{'proto_method' has been explicitly marked deprecated here}}
#if defined(WARN_PARTIAL)
- // expected-note@+2 2 {{'partial_proto_method' has been explicitly marked partial here}}
+// expected-note@+2 2 {{'partial_proto_method' has been marked as being introduced in macOS 10.8 here, but the deployment target is macOS 10.5.0}}
#endif
- (void)partial_proto_method __attribute__((availability(macosx,introduced=10.8)));
@end
@@ -13,7 +13,7 @@
@interface A <P>
- (void)method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expected-note {{'method' has been explicitly marked deprecated here}}
#if defined(WARN_PARTIAL)
- // expected-note@+2 2 {{'partialMethod' has been explicitly marked partial here}}
+// expected-note@+2 2 {{'partialMethod' has been marked as being introduced in macOS 10.8 here, but the deployment target is macOS 10.5.0}}
#endif
- (void)partialMethod __attribute__((availability(macosx,introduced=10.8)));
@@ -137,8 +137,8 @@ id NSNibOwner, topNibObjects;
@interface PartialI <PartialProt>
#ifdef WARN_PARTIAL
-// expected-note@+3{{marked partial here}}
-// expected-note@+3{{marked partial here}}
+// expected-note@+3{{'partialMethod' has been marked as being introduced in macOS 10.8 here, but the deployment target is macOS 10.5.0}}
+// expected-note@+3{{'partialMethod' has been marked as being introduced in macOS 10.8 here, but the deployment target is macOS 10.5.0}}
#endif
- (void)partialMethod __attribute__((availability(macosx,introduced=10.8)));
+ (void)partialMethod __attribute__((availability(macosx,introduced=10.8)));
@@ -147,12 +147,12 @@ id NSNibOwner, topNibObjects;
@interface PartialI ()
- (void)ipartialMethod1 __attribute__((availability(macosx,introduced=10.8)));
#if defined(WARN_PARTIAL)
- // expected-note@+2 {{'ipartialMethod2' has been explicitly marked partial here}}
+// expected-note@+2 {{'ipartialMethod2' has been marked as being introduced in macOS 10.8 here, but the deployment target is macOS 10.5.0}}
#endif
- (void)ipartialMethod2 __attribute__((availability(macosx,introduced=10.8)));
+ (void)ipartialMethod1 __attribute__((availability(macosx,introduced=10.8)));
#if defined(WARN_PARTIAL)
- // expected-note@+2 {{'ipartialMethod2' has been explicitly marked partial here}}
+// expected-note@+2 {{'ipartialMethod2' has been marked as being introduced in macOS 10.8 here, but the deployment target is macOS 10.5.0}}
#endif
+ (void)ipartialMethod2 __attribute__((availability(macosx,introduced=10.8)));
@end
@@ -190,7 +190,7 @@ void partialfun(PartialI* a) {
}
#if defined(WARN_PARTIAL)
- // expected-note@+2 2 {{'PartialI2' has been explicitly marked partial here}}
+// expected-note@+2 2 {{'PartialI2' has been marked as being introduced in macOS 10.8 here, but the deployment target is macOS 10.5.0}}
#endif
__attribute__((availability(macosx, introduced = 10.8))) @interface PartialI2
@end
@@ -314,8 +314,8 @@ __attribute__((objc_root_class))
#if defined(WARN_PARTIAL)
int fn_10_5() __attribute__((availability(macosx, introduced=10.5)));
-int fn_10_7() __attribute__((availability(macosx, introduced=10.7))); // expected-note{{marked partial here}}
-int fn_10_8() __attribute__((availability(macosx, introduced=10.8))) { // expected-note{{marked partial here}}
+int fn_10_7() __attribute__((availability(macosx, introduced=10.7))); // expected-note{{'fn_10_7' has been marked as being introduced in macOS 10.7 here, but the deployment target is macOS 10.5.0}}
+int fn_10_8() __attribute__((availability(macosx, introduced=10.8))) { // expected-note{{'fn_10_8' has been marked as being introduced in macOS 10.8 here, but the deployment target is macOS 10.5.0}}
return fn_10_7();
}
diff --git a/clang/test/SemaObjC/property-deprecated-warning.m b/clang/test/SemaObjC/property-deprecated-warning.m
index 0591c78fba4a..a1e971118b2c 100644
--- a/clang/test/SemaObjC/property-deprecated-warning.m
+++ b/clang/test/SemaObjC/property-deprecated-warning.m
@@ -9,7 +9,7 @@ typedef signed char BOOL;
@property(nonatomic,assign) id ptarget __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{property 'ptarget' is declared deprecated here}} expected-note {{'ptarget' has been explicitly marked deprecated here}}
#if defined(WARN_PARTIAL)
-// expected-note@+2 {{'partialPtarget' has been explicitly marked partial here}}
+// expected-note@+2 {{'partialPtarget' has been marked as being introduced in iOS 5.0 here, but the deployment target is iOS 3.0.0}}
#endif
@property(nonatomic,assign) id partialPtarget __attribute__((availability(ios,introduced=5.0)));
@end
@@ -24,7 +24,7 @@ typedef signed char BOOL;
@property(nonatomic,assign) id target __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{property 'target' is declared deprecated here}} expected-note {{'setTarget:' has been explicitly marked deprecated here}}
#if defined(WARN_PARTIAL)
-// expected-note@+2 {{'setPartialTarget:' has been explicitly marked partial here}}
+// expected-note@+2 {{'setPartialTarget:' has been marked as being introduced in iOS 5.0 here, but the deployment target is iOS 3.0.0}}
#endif
@property(nonatomic,assign) id partialTarget __attribute__((availability(ios,introduced=5.0)));
@end
@@ -40,7 +40,8 @@ typedef signed char BOOL;
// expected-note 2 {{'setDep_target:' has been explicitly marked deprecated here}}
#if defined(WARN_PARTIAL)
-// expected-note@+2 2 {{'partial_dep_target' has been explicitly marked partial here}} expected-note@+2 2 {{'setPartial_dep_target:' has been explicitly marked partial here}}
+// expected-note@+3 2 {{'partial_dep_target' has been marked as being introduced in iOS 5.0 here, but the deployment target is iOS 3.0.0}}
+// expected-note@+2 2 {{'setPartial_dep_target:' has been marked as being introduced in iOS 5.0 here, but the deployment target is iOS 3.0.0}}
#endif
@property(nonatomic,assign) id partial_dep_target __attribute__((availability(ios,introduced=5.0)));
@end
@@ -100,12 +101,12 @@ typedef signed char BOOL;
@property(setter=setNewDelegate:,assign) id delegate __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{'setNewDelegate:' has been explicitly marked deprecated here}} expected-note {{property 'delegate' is declared deprecated here}}
#if defined(WARN_PARTIAL)
-// expected-note@+2 {{'partialIsEnabled' has been explicitly marked partial here}}
+// expected-note@+2 {{'partialIsEnabled' has been marked as being introduced in iOS 5.0 here, but the deployment target is iOS 3.0.0}}
#endif
@property(getter=partialIsEnabled,assign) BOOL partialEnabled __attribute__((availability(ios,introduced=5.0)));
#if defined(WARN_PARTIAL)
-// expected-note@+2 {{'partialSetNewDelegate:' has been explicitly marked partial here}}
+// expected-note@+2 {{'partialSetNewDelegate:' has been marked as being introduced in iOS 5.0 here, but the deployment target is iOS 3.0.0}}
#endif
@property(setter=partialSetNewDelegate:,assign) id partialDelegate __attribute__((availability(ios,introduced=5.0)));
@end
diff --git a/clang/test/SemaObjC/unguarded-availability-new.m b/clang/test/SemaObjC/unguarded-availability-new.m
index 474730f0d362..ed61bf977958 100644
--- a/clang/test/SemaObjC/unguarded-availability-new.m
+++ b/clang/test/SemaObjC/unguarded-availability-new.m
@@ -68,15 +68,15 @@
void previouslyAvailable() AVAILABLE_PREV;
#ifdef WARN_PREV
- // expected-note@-2 {{'previouslyAvailable' has been explicitly marked partial here}}
+// expected-note@-2 {{'previouslyAvailable' has been marked as being introduced}}
#endif
void currentlyAvailable() AVAILABLE_CURRENT;
#ifdef WARN_CURRENT
- // expected-note@-2 {{'currentlyAvailable' has been explicitly marked partial here}}
+// expected-note@-2 {{'currentlyAvailable' has been marked as being introduced}}
#endif
void willBeAvailabile() AVAILABLE_NEXT;
#ifndef NO_WARNING
- // expected-note@-2 {{'willBeAvailabile' has been explicitly marked partial here}}
+// expected-note@-2 {{'willBeAvailabile' has been marked as being introduced in}}
#endif
#ifdef TEST_FUNC_CURRENT
@@ -91,7 +91,7 @@ void willBeAvailabile() AVAILABLE_NEXT;
typedef int AVAILABLE_NEXT new_int;
#ifndef NO_WARNING
- // expected-note@-2 {{'new_int' has been explicitly marked partial here}}
+// expected-note@-2 {{'new_int' has been marked as being introduced in}}
#endif
FUNC_AVAILABLE new_int x;
#ifndef NO_WARNING
diff --git a/clang/test/SemaObjC/unguarded-availability.m b/clang/test/SemaObjC/unguarded-availability.m
index 39c631097985..c185a363cd68 100644
--- a/clang/test/SemaObjC/unguarded-availability.m
+++ b/clang/test/SemaObjC/unguarded-availability.m
@@ -1,18 +1,18 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macosx-10.9 -Wunguarded-availability -fblocks -fsyntax-only -verify %s
-// RUN: %clang_cc1 -xobjective-c++ -std=c++11 -DOBJCPP -triple x86_64-apple-macosx-10.9 -Wunguarded-availability -fblocks -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -Wunguarded-availability -fblocks -fsyntax-only -verify %s
+// RUN: %clang_cc1 -xobjective-c++ -std=c++11 -DOBJCPP -triple x86_64-apple-macosx10.9 -Wunguarded-availability -fblocks -fsyntax-only -verify %s
#define AVAILABLE_10_0 __attribute__((availability(macos, introduced = 10.0)))
#define AVAILABLE_10_11 __attribute__((availability(macos, introduced = 10.11)))
#define AVAILABLE_10_12 __attribute__((availability(macos, introduced = 10.12)))
-typedef int AVAILABLE_10_12 new_int; // expected-note + {{marked partial here}}
+typedef int AVAILABLE_10_12 new_int; // expected-note + {{'new_int' has been marked as being introduced in macOS 10.12 here, but the deployment target is macOS 10.9.0}}
-int func_10_11() AVAILABLE_10_11; // expected-note 8 {{'func_10_11' has been explicitly marked partial here}}
+int func_10_11() AVAILABLE_10_11; // expected-note 8 {{'func_10_11' has been marked as being introduced in macOS 10.11 here, but the deployment target is macOS 10.9.0}}
#ifdef OBJCPP
-// expected-note@+2 6 {{marked partial here}}
+// expected-note@+2 6 {{'func_10_12' has been marked as being introduced in macOS 10.12 here, but the deployment target is macOS 10.9.0}}
#endif
-int func_10_12() AVAILABLE_10_12; // expected-note 7 {{'func_10_12' has been explicitly marked partial here}}
+int func_10_12() AVAILABLE_10_12; // expected-note 7 {{'func_10_12' has been marked as being introduced in macOS 10.12 here, but the deployment target is macOS 10.9.0}}
int func_10_0() AVAILABLE_10_0;
@@ -61,11 +61,11 @@ void star_case() {
}
}
-typedef int int_10_11 AVAILABLE_10_11; // expected-note {{'int_10_11' has been explicitly marked partial here}}
+typedef int int_10_11 AVAILABLE_10_11; // expected-note {{'int_10_11' has been marked as being introduced in macOS 10.11 here, but the deployment target is macOS 10.9.0}}
#ifdef OBJCPP
-// expected-note@+2 {{marked partial here}}
+// expected-note@+2 {{'int_10_12' has been marked as being introduced in macOS 10.12 here, but the deployment target is macOS 10.9.0}}
#endif
-typedef int int_10_12 AVAILABLE_10_12; // expected-note 2 {{'int_10_12' has been explicitly marked partial here}}
+typedef int int_10_12 AVAILABLE_10_12; // expected-note 2 {{'int_10_12' has been marked as being introduced in macOS 10.12 here, but the deployment target is macOS 10.9.0}}
void use_typedef() {
int_10_11 x; // expected-warning{{'int_10_11' is only available on macOS 10.11 or newer}} expected-note{{enclose 'int_10_11' in an @available check to silence this warning}}
@@ -106,10 +106,10 @@ int protected_scope() {
struct S {
int m1;
- int m2 __attribute__((availability(macos, introduced = 10.12))); // expected-note{{marked partial here}}
+ int m2 __attribute__((availability(macos, introduced = 10.12))); // expected-note{{has been marked as being introduced in macOS 10.12 here, but the deployment target is macOS 10.9.0}}
struct Nested {
- int nested_member __attribute__((availability(macos, introduced = 10.12))); // expected-note{{marked partial here}}
+ int nested_member __attribute__((availability(macos, introduced = 10.12))); // expected-note{{'nested_member' has been marked as being introduced in macOS 10.12 here, but the deployment target is macOS 10.9.0}}
} n;
};
@@ -139,9 +139,9 @@ void (^topLevelBlockDecl)() = ^ {
AVAILABLE_10_12
__attribute__((objc_root_class))
-@interface InterWithProp // expected-note 2 {{marked partial here}}
+@interface InterWithProp // expected-note 2 {{'InterWithProp' has been marked as being introduced in macOS 10.12 here, but the deployment target is macOS 10.9.0}}
@property(class) int x;
-+ (void) setX: (int)newX AVAILABLE_10_12; // expected-note{{marked partial here}}
++ (void) setX: (int)newX AVAILABLE_10_12; // expected-note{{'setX:' has been marked as being introduced in macOS 10.12 here, but the deployment target is macOS 10.9.0}}
@end
void test_property(void) {
int y = InterWithProp.x; // expected-warning{{'InterWithProp' is only available on macOS 10.12 or newer}} expected-note{{@available}}
@@ -150,7 +150,7 @@ void test_property(void) {
__attribute__((objc_root_class))
@interface Subscriptable
-- (id)objectAtIndexedSubscript:(int)sub AVAILABLE_10_12; // expected-note{{marked partial here}}
+- (id)objectAtIndexedSubscript:(int)sub AVAILABLE_10_12; // expected-note{{'objectAtIndexedSubscript:' has been marked as being introduced in macOS 10.12 here, but the deployment target is macOS 10.9.0}}
@end
void test_at(Subscriptable *x) {
@@ -196,7 +196,7 @@ int instantiate_template() {
}
template <class>
-int with_availability_attr() AVAILABLE_10_11 { // expected-note 2 {{marked partial here}}
+int with_availability_attr() AVAILABLE_10_11 { // expected-note 2 {{'with_availability_attr<int>' has been marked as being introduced in macOS 10.11 here, but the deployment target is macOS 10.9.0}}
return 0;
}
@@ -244,7 +244,7 @@ struct InStruct { // expected-note{{annotate 'InStruct' with an availability att
};
#ifdef OBJCPP
-static constexpr int AVAILABLE_10_12 SomeConstexprValue = 2; // expected-note{{marked partial here}}
+static constexpr int AVAILABLE_10_12 SomeConstexprValue = 2; // expected-note{{'SomeConstexprValue' has been marked as being introduced in macOS 10.12 here, but the deployment target is macOS 10.9.0}}
typedef enum { // expected-note{{annotate anonymous enum with an availability attribute}}
SomeValue = SomeConstexprValue // expected-warning{{'SomeConstexprValue' is only available on macOS 10.12 or newer}}
} SomeEnum;
@@ -268,7 +268,7 @@ void with_local_struct() {
// Avoid the warning on protocol requirements.
AVAILABLE_10_12
-@protocol NewProtocol // expected-note {{'NewProtocol' has been explicitly marked partial here}}
+@protocol NewProtocol // expected-note {{'NewProtocol' has been marked as being introduced in macOS 10.12 here, but the deployment target is macOS 10.9.0}}
@end
@protocol ProtocolWithNewProtocolRequirement <NewProtocol> // expected-note {{annotate 'ProtocolWithNewProtocolRequirement' with an availability attribute to silence}}
@@ -291,7 +291,7 @@ AVAILABLE_10_12
typedef enum {
AK_Dodo __attribute__((availability(macos, deprecated=10.3))), // expected-note 3 {{marked deprecated here}}
AK_Cat __attribute__((availability(macos, introduced=10.4))),
- AK_CyborgCat __attribute__((availability(macos, introduced=10.12))), // expected-note {{marked partial here}}
+ AK_CyborgCat __attribute__((availability(macos, introduced=10.12))), // expected-note {{'AK_CyborgCat' has been marked as being introduced in macOS 10.12 here, but the deployment target is macOS 10.9.0}}
} Animals;
void switchAnimals(Animals a) {