Comment AST: Recognize function-like objects via return type (NFC)
authorAaron Puchert <aaron.puchert@sap.com>
Fri, 12 Nov 2021 20:09:40 +0000 (21:09 +0100)
committerAaron Puchert <aaron.puchert@sap.com>
Fri, 12 Nov 2021 20:11:11 +0000 (21:11 +0100)
commit3010883fc296619def051e0a2f97d40fb15960d7
tree5e373ca249d5e2b6415d6f8d0ee79ea6c3fe231c
parent4e7df1ef7b679953c1501177539166876c4cbda4
Comment AST: Recognize function-like objects via return type (NFC)

Instead of pretending that function pointer type aliases or variables
are functions, and thereby losing the information that they are type
aliases or variables, respectively, we use the existence of a return
type in the DeclInfo to signify a "function-like" object.

That seems pretty natural, since it's also the return type (or parameter
list) from the DeclInfo that we compare the documentation with.

Addresses a concern voiced in D111264#3115104.

Reviewed By: gribozavr2

Differential Revision: https://reviews.llvm.org/D113691
clang/include/clang/AST/Comment.h
clang/include/clang/AST/CommentSema.h
clang/lib/AST/Comment.cpp
clang/lib/AST/CommentSema.cpp