brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · e85474b Raw
85 lines · c
1// RUN: %clang_cc1 -fsyntax-only -Wdocumentation -verify %s2 3/** @return s Test*/4struct s* f(void);5struct s;6 7struct s1;8/** @return s1 Test 1*/9struct s1* f1(void);10 11struct s2;12/** @return s2 Test 2*/13struct s2* f2(void);14struct s2;15 16// expected-warning@+1 {{'@return' command used in a comment that is not attached to a function or method declaration}}17/** @return s3 Test 3 - expected warning here */18struct s3;19struct s3* f3(void);20 21/** @return s4 Test 4 */22struct s4* f4(void);23struct s4 { int is; };24 25// expected-warning@+1 {{'@return' command used in a comment that is not attached to a function or method declaration}}26/** @return s5 Test 5  - expected warning here */27struct s5 { int is; };28struct s5* f5(void);29 30// expected-warning@+1 {{'@return' command used in a comment that is not attached to a function or method declaration}}31/** @return s6 Test 6  - expected warning here */32struct s6 *ps6;33struct s6* f6(void);34 35// expected-warning@+1 {{'@return' command used in a comment that is not attached to a function or method declaration}}36/** @return s7 Test 7  - expected warning here */37struct s7;38struct s7* f7(void);39 40struct s8 { int is8; };41/** @return s8 Test 8 */42struct s4 *f8(struct s8 *p);43 44 45/** @return e Test*/46enum e* g(void);47enum e;48 49enum e1;50/** @return e1 Test 1*/51enum e1* g1(void);52 53enum e2;54/** @return e2 Test 2*/55enum e2* g2(void);56enum e2;57 58// expected-warning@+1 {{'@return' command used in a comment that is not attached to a function or method declaration}}59/** @return e3 Test 3 - expected warning here */60enum e3;61enum e3* g3(void);62 63/** @return e4 Test 4 */64enum e4* g4(void);65enum e4 { one };66 67// expected-warning@+1 {{'@return' command used in a comment that is not attached to a function or method declaration}}68/** @return e5 Test 5  - expected warning here */69enum e5 { two };70enum e5* g5(void);71 72// expected-warning@+1 {{'@return' command used in a comment that is not attached to a function or method declaration}}73/** @return e6 Test 6  - expected warning here */74enum e6 *pe6;75enum e6* g6(void);76 77// expected-warning@+1 {{'@return' command used in a comment that is not attached to a function or method declaration}}78/** @return e7 Test 7  - expected warning here */79enum e7;80enum e7* g7(void);81 82enum e8 { three };83/** @return e8 Test 8 */84enum e4 *g8(enum e8 *p);85