[PR32667] -Wdocumentation should allow @param/@returns for fields/variables
authorAlex Lorenz <arphaman@gmail.com>
Fri, 21 Apr 2017 14:17:49 +0000 (14:17 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Fri, 21 Apr 2017 14:17:49 +0000 (14:17 +0000)
commit6b82a75df5ca295c9f8159011e907da42725b99b
treec9fdc18270ecde7dfa9dd2d02674e6341017392e
parente2037d24f9cf40fab9a83ce740051e73cae939f1
[PR32667] -Wdocumentation should allow @param/@returns for fields/variables
that have a function/block pointer type

This commit improves the -Wdocumentation warning by making sure that @param and
@returns commands won't trigger warnings when used for fields, variables,
or properties whose type is a function/block pointer type. The
function/block pointer type must be specified directly with the declaration,
and when a typedef is used the warning is still emitted.

In the future we might also want to handle the std::function type as well.

rdar://24978538

llvm-svn: 300981
clang/include/clang/AST/CommentSema.h
clang/lib/AST/Comment.cpp
clang/lib/AST/CommentSema.cpp
clang/test/Sema/warn-documentation.cpp
clang/test/Sema/warn-documentation.m