annotate clang/test/Sema/warn-documentation-fixits.c @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 1d019706d866
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -fsyntax-only -Wdocumentation -Wdocumentation-pedantic -fcomment-block-commands=foobar -verify %s
anatofuz
parents:
diff changeset
2 // RUN %clang_cc1 -std=c18 -fsyntax-only -Wdocumentation -Wdocumentation-pedantic -fcomment-block-commands=foobar -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck -DATTRIBUTE="__attribute__((deprecated))" %s
anatofuz
parents:
diff changeset
3 // RUN: %clang_cc1 -std=c2x -DC2x -fsyntax-only -Wdocumentation -Wdocumentation-pedantic -fcomment-block-commands=foobar -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck --check-prefixes=CHECK,CHECK2x -DATTRIBUTE="[[deprecated]]" %s
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 // expected-warning@+1 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note@+2 {{add a deprecation attribute to the declaration to silence this warning}}
anatofuz
parents:
diff changeset
6 /// \deprecated
anatofuz
parents:
diff changeset
7 void test_deprecated_1();
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 // expected-warning@+1 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note@+2 {{add a deprecation attribute to the declaration to silence this warning}}
anatofuz
parents:
diff changeset
10 /// \deprecated
anatofuz
parents:
diff changeset
11 void test_deprecated_2(int a);
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 #define MY_ATTR_DEPRECATED __attribute__((deprecated))
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 // expected-warning@+1 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note@+2 {{add a deprecation attribute to the declaration to silence this warning}}
anatofuz
parents:
diff changeset
16 /// \deprecated
anatofuz
parents:
diff changeset
17 void test_deprecated_3(int a);
anatofuz
parents:
diff changeset
18
anatofuz
parents:
diff changeset
19 #ifdef C2x
anatofuz
parents:
diff changeset
20 #define ATTRIBUTE_DEPRECATED [[deprecated]]
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 // expected-warning@+1 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note@+2 {{add a deprecation attribute to the declaration to silence this warning}}
anatofuz
parents:
diff changeset
23 /// \deprecated
anatofuz
parents:
diff changeset
24 void test_deprecated_4(int a);
anatofuz
parents:
diff changeset
25 #endif
anatofuz
parents:
diff changeset
26
anatofuz
parents:
diff changeset
27 // CHECK: fix-it:"{{.*}}":{7:1-7:1}:"[[ATTRIBUTE]] "
anatofuz
parents:
diff changeset
28 // CHECK: fix-it:"{{.*}}":{11:1-11:1}:"[[ATTRIBUTE]] "
anatofuz
parents:
diff changeset
29 // CHECK: fix-it:"{{.*}}":{17:1-17:1}:"MY_ATTR_DEPRECATED "
anatofuz
parents:
diff changeset
30 // CHECK2x: fix-it:"{{.*}}":{24:1-24:1}:"ATTRIBUTE_DEPRECATED "