[all-commits] [llvm/llvm-project] 576283: [clang] Support `constexpr` for some `ASTNodeKind`...

Eric Li via All-commits all-commits at lists.llvm.org
Thu Oct 13 10:01:39 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 576283c3a8ef5078b3ec12fa442c14f3a1b5fea2
      https://github.com/llvm/llvm-project/commit/576283c3a8ef5078b3ec12fa442c14f3a1b5fea2
  Author: Eric Li <li.zhe.hua at gmail.com>
  Date:   2022-10-13 (Thu, 13 Oct 2022)

  Changed paths:
    M clang/include/clang/AST/ASTTypeTraits.h
    M clang/unittests/AST/ASTTypeTraitsTest.cpp

  Log Message:
  -----------
  [clang] Support `constexpr` for some `ASTNodeKind` member functions

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.

Differential Revision: https://reviews.llvm.org/D135816




More information about the All-commits mailing list