diff options
Diffstat (limited to 'test/Sema/warn-documentation.cpp')
-rw-r--r-- | test/Sema/warn-documentation.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/test/Sema/warn-documentation.cpp b/test/Sema/warn-documentation.cpp index 649f072ab9..b5d3300efd 100644 --- a/test/Sema/warn-documentation.cpp +++ b/test/Sema/warn-documentation.cpp @@ -380,14 +380,39 @@ using test_tparam15 = test_tparam13<T, int>; /// Aaa /// \deprecated Bbb -void test_deprecated_1(int a); +void test_deprecated_1(int a) __attribute__((deprecated)); // We don't want \deprecated to warn about empty paragraph. It is fine to use // \deprecated by itself without explanations. /// Aaa /// \deprecated -void test_deprecated_2(int a); +void test_deprecated_2(int a) __attribute__((deprecated)); + +/// Aaa +/// \deprecated +void test_deprecated_3(int a) __attribute__((availability(macosx,introduced=10.4))); + +/// Aaa +/// \deprecated +void test_deprecated_4(int a) __attribute__((unavailable)); + +// expected-warning@+2 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note@+3 {{add a deprecation attribute to the declaration to silence this warning}} +/// Aaa +/// \deprecated +void test_deprecated_5(int a); + +// expected-warning@+2 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note@+3 {{add a deprecation attribute to the declaration to silence this warning}} +/// Aaa +/// \deprecated +void test_deprecated_6(int a) { +} + +// expected-warning@+2 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} +/// Aaa +/// \deprecated +template<typename T> +void test_deprecated_7(T aaa); /// \invariant aaa |