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