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 | c98e9130bcddd0258c110d30749edd2284087e3d (patch) | |
tree | b1bef38e783e38b9a92774dd24175d9a327cbc51 /test/Sema/warn-documentation.cpp | |
parent | fc09336a5965040736f9bc63a70416003972364e (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176387 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/warn-documentation.cpp')
-rw-r--r-- | test/Sema/warn-documentation.cpp | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/test/Sema/warn-documentation.cpp b/test/Sema/warn-documentation.cpp index e2e49e59bf..d166ae0b58 100644 --- a/test/Sema/warn-documentation.cpp +++ b/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; + |