Add constexpr support for:
- The getFromNodeKind factory function
- isSame
- isNone
- hasPointerIdentity
This enables these functions to be used in SFINAE context for AST node
types.
Paths
| Differential D135816
[clang] Support `constexpr` for some `ASTNodeKind` member functions ClosedPublic Authored by li.zhe.hua on Oct 12 2022, 2:34 PM.
Details Summary Add constexpr support for:
This enables these functions to be used in SFINAE context for AST node
Diff Detail
Event TimelineComment Actions LGTM, looks mostly straight forward but I am not super familiar with this code so I will let Aaron also review it too. Comment Actions LGTM aside from a minor question.
This revision is now accepted and ready to land.Oct 13 2022, 9:02 AM li.zhe.hua added inline comments.
This revision was landed with ongoing or failed builds.Oct 13 2022, 10:01 AM Closed by commit rG576283c3a8ef: [clang] Support `constexpr` for some `ASTNodeKind` member functions (authored by li.zhe.hua). · Explain Why This revision was automatically updated to reflect the committed changes. li.zhe.hua marked an inline comment as done.
Revision Contents
Diff 467517 clang/include/clang/AST/ASTTypeTraits.h
clang/unittests/AST/ASTTypeTraitsTest.cpp
|
Any reason for this to not be constexpr as well?