1 //===- ExpressionTraits.h - C++ Expression Traits Support Enums -*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 /// Defines enumerations for expression traits intrinsics.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_BASIC_EXPRESSIONTRAITS_H
15 #define LLVM_CLANG_BASIC_EXPRESSIONTRAITS_H
17 #include "llvm/Support/Compiler.h"
21 enum ExpressionTrait {
22 #define EXPRESSION_TRAIT(Spelling, Name, Key) ET_##Name,
23 #include "clang/Basic/TokenKinds.def"
24 ET_Last = -1 // ET_Last == last ET_XX in the enum.
25 #define EXPRESSION_TRAIT(Spelling, Name, Key) +1
26 #include "clang/Basic/TokenKinds.def"
29 /// Return the internal name of type trait \p T. Never null.
30 const char *getTraitName(ExpressionTrait T) LLVM_READONLY;
32 /// Return the spelling of the type trait \p TT. Never null.
33 const char *getTraitSpelling(ExpressionTrait T) LLVM_READONLY;