diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-03-01 22:51:30 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-03-01 22:51:30 +0000 |
commit | d49963609d58ceaf85de6ad90170a359258a3a2c (patch) | |
tree | 7b995443c861e4f0a59b5ced57007c4f502ace81 /clang/test/Sema/warn-documentation.cpp | |
parent | db4443f7af005588d4fd0df5669a2a2ee21fac11 (diff) | |
download | llvm-d49963609d58ceaf85de6ad90170a359258a3a2c.zip llvm-d49963609d58ceaf85de6ad90170a359258a3a2c.tar.gz llvm-d49963609d58ceaf85de6ad90170a359258a3a2c.tar.bz2 |
comment parsing. Keep the original command format
in AST for source fidelity and use it in diagnostics
to refer to the original format. // rdar://13066276
llvm-svn: 176387
Diffstat (limited to 'clang/test/Sema/warn-documentation.cpp')
-rw-r--r-- | clang/test/Sema/warn-documentation.cpp | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/clang/test/Sema/warn-documentation.cpp b/clang/test/Sema/warn-documentation.cpp index e2e49e5..d166ae0 100644 --- a/clang/test/Sema/warn-documentation.cpp +++ b/clang/test/Sema/warn-documentation.cpp @@ -862,28 +862,28 @@ int test_nocrash9; // We used to crash on this. PR15068 -// expected-warning@+2 {{empty paragraph passed to '\param' command}} -// expected-warning@+2 {{empty paragraph passed to '\param' command}} +// expected-warning@+2 {{empty paragraph passed to '@param' command}} +// expected-warning@+2 {{empty paragraph passed to '@param' command}} ///@param x ///@param y int test_nocrash10(int x, int y); -// expected-warning@+2 {{empty paragraph passed to '\param' command}} expected-warning@+2 {{parameter 'x' not found in the function declaration}} -// expected-warning@+2 {{empty paragraph passed to '\param' command}} expected-warning@+2 {{parameter 'y' not found in the function declaration}} +// expected-warning@+2 {{empty paragraph passed to '@param' command}} expected-warning@+2 {{parameter 'x' not found in the function declaration}} +// expected-warning@+2 {{empty paragraph passed to '@param' command}} expected-warning@+2 {{parameter 'y' not found in the function declaration}} ///@param x ///@param y int test_nocrash11(); -// expected-warning@+3 {{empty paragraph passed to '\param' command}} expected-warning@+3 {{parameter 'x' not found in the function declaration}} -// expected-warning@+3 {{empty paragraph passed to '\param' command}} expected-warning@+3 {{parameter 'y' not found in the function declaration}} +// expected-warning@+3 {{empty paragraph passed to '@param' command}} expected-warning@+3 {{parameter 'x' not found in the function declaration}} +// expected-warning@+3 {{empty paragraph passed to '@param' command}} expected-warning@+3 {{parameter 'y' not found in the function declaration}} /** @param x @param y **/ int test_nocrash12(); -// expected-warning@+2 {{empty paragraph passed to '\param' command}} -// expected-warning@+1 {{empty paragraph passed to '\param' command}} +// expected-warning@+2 {{empty paragraph passed to '@param' command}} +// expected-warning@+1 {{empty paragraph passed to '@param' command}} ///@param x@param y int test_nocrash13(int x, int y); @@ -895,3 +895,15 @@ int test_nocrash13(int x, int y); /// \headerfile foo.h int test_duplicate_headerfile1(int); + +// rdar://13066276 +// expected-warning@+1 {{'@return' command used in a comment that is not attached to a function or method declaration}} +/** @return s */ +struct s* f(void); +struct s; + +// expected-warning@+1 {{'\return' command used in a comment that is not attached to a function or method declaration}} +/** \return s */ +struct q* g(void); +struct q; + |