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

Eric Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 13 09:42:32 PDT 2022


li.zhe.hua marked an inline comment as done.
li.zhe.hua added inline comments.


================
Comment at: clang/include/clang/AST/ASTTypeTraits.h:90-92
   bool operator<(const ASTNodeKind &Other) const {
     return KindId < Other.KindId;
   }
----------------
aaron.ballman wrote:
> Any reason for this to not be `constexpr` as well?
Not in particular. I really only needed `hasPointerIdentity`, but figured it'd be odd not to support `isSame` or `isNone`, so the same probably goes for `operator<`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135816



More information about the cfe-commits mailing list