[PATCH] D135816: [clang] Support `constexpr` for some `ASTNodeKind` member functions

Eric Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 12 14:34:55 PDT 2022


li.zhe.hua created this revision.
li.zhe.hua added a reviewer: aaron.ballman.
Herald added a project: All.
li.zhe.hua requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135816

Files:
  clang/include/clang/AST/ASTTypeTraits.h
  clang/unittests/AST/ASTTypeTraitsTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135816.467264.patch
Type: text/x-patch
Size: 3629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221012/85053866/attachment.bin>


More information about the cfe-commits mailing list