[PATCH] D111264: Comment AST: Declare function pointer variables as functions

Aaron Puchert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 9 13:22:04 PST 2021


aaronpuchert added a comment.

In D111264#3115104 <https://reviews.llvm.org/D111264#3115104>, @gribozavr2 wrote:

> I feel uneasy about claiming that variable decls of function type are FunctionKind for the purposes of comment parsing (even doing it for typedefs is questionable). It seems like a better way would be to make "is function like" an extra dimension that can be combined with any decl kind.

Agreed, I'll try to write a patch for that. Essentially we want to know if some kind of function type (or maybe just `FunctionProtoType`?) is involved in that declaration (without desugaring), either of a type declaration, or of the declared type of a non-type declaration. That's pretty much orthogonal to the kind. (Though it's of course incompatible with some kinds, such as `EnumKind` or `NamespaceKind`.)

I'm wondering about global lambdas declarations. These should have class type, but also have parameters like a function.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111264/new/

https://reviews.llvm.org/D111264



More information about the cfe-commits mailing list