8#ifndef LLVM_CLANG_AST_DEPENDENCEFLAGS_H
9#define LLVM_CLANG_AST_DEPENDENCEFLAGS_H
12#include "llvm/ADT/BitmaskEnum.h"
46 LLVM_MARK_AS_BITMASK_ENUM(
Error)
77 LLVM_MARK_AS_BITMASK_ENUM(
Error)
82#define LLVM_COMMON_DEPENDENCE(NAME) \
83 struct NAME##Scope { \
84 enum NAME : uint8_t { \
91 DependentInstantiation = Dependent | Instantiation, \
94 LLVM_MARK_AS_BITMASK_ENUM(Error) \
97 using NAME = NAME##Scope::NAME;
102#undef LLVM_COMMON_DEPENDENCE
195 return translate(V,
UnexpandedPack, TypeDependence::UnexpandedPack) |
197 translate(V,
Dependent, TypeDependence::Dependent) |
198 translate(V,
Error, TypeDependence::Error) |
203 return translate(V,
UnexpandedPack, ExprDependence::UnexpandedPack) |
205 translate(V,
Type, ExprDependence::Type) |
206 translate(V,
Value, ExprDependence::Value) |
207 translate(V,
Error, ExprDependence::Error);
211 return translate(V,
UnexpandedPack, NNSDependence::UnexpandedPack) |
213 translate(V,
Dependent, NNSDependence::Dependent) |
214 translate(V,
Error, NNSDependence::Error);
218 return translate(V,
UnexpandedPack, TADependence::UnexpandedPack) |
220 translate(V,
Dependent, TADependence::Dependent) |
221 translate(V,
Error, TADependence::Error);
225 return translate(V,
UnexpandedPack, TNDependence::UnexpandedPack) |
227 translate(V,
Dependent, TNDependence::Dependent) |
228 translate(V,
Error, TNDependence::Error);
234 template <
typename T,
typename U>
235 static U translate(
T Bits,
T FromBit,
U ToBit) {
236 return (
Bits & FromBit) ? ToBit :
static_cast<U>(0);
240 using NNSDependence = NestedNameSpecifierDependence;
241 using TADependence = TemplateArgumentDependence;
242 using TNDependence = TemplateNameDependence;
269 if (
D & ExprDependence::Value)
270 D |= ExprDependence::Type;
295inline NestedNameSpecifierDependence
300inline TemplateArgumentDependence
304inline TemplateArgumentDependence
308inline TemplateArgumentDependence
313inline TemplateNameDependence
Provides LLVM's BitmaskEnum facility to enumeration types declared in namespace clang.
#define LLVM_COMMON_DEPENDENCE(NAME)
Dependence(TemplateNameDependence D)
Dependence(ExprDependence D)
TemplateArgumentDependence templateArgument() const
Dependence syntactic()
Extract only the syntactic portions of this type's dependence.
TypeDependence type() const
Dependence(NestedNameSpecifierDependence D)
Dependence(TemplateArgumentDependence D)
NestedNameSpecifierDependence nestedNameSpecifier() const
TemplateNameDependence templateName() const
Dependence(TypeDependence D)
ExprDependence expr() const
Dependence semantic()
Extract the semantic portions of this type's dependence that apply even to uses where the type does n...
The base class of the type hierarchy.
The JSON file list parser is used to communicate input to InstallAPI.
ExprDependence toExprDependence(TemplateArgumentDependence TA)
Computes dependencies of a reference with the name having template arguments with TA dependencies.
ExprDependence turnTypeToValueDependence(ExprDependence D)
ExprDependence toExprDependenceAsWritten(TypeDependence D)
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE()
TypeDependence toTypeDependence(ExprDependence D)
TemplateNameDependence toTemplateNameDependence(NestedNameSpecifierDependence D)
ExprDependence turnValueToTypeDependence(ExprDependence D)
@ Result
The result type of a method or function.
ExprDependence toExprDependenceForImpliedType(TypeDependence D)
const FunctionProtoType * T
NestedNameSpecifierDependence toNestedNameSpecifierDependendence(TypeDependence D)
TemplateArgumentDependence toTemplateArgumentDependence(TypeDependence D)
TypeDependence toSemanticDependence(TypeDependence D)
TypeDependence toSyntacticDependence(TypeDependence D)
@ Dependent
Whether this type.
@ VariablyModified
Whether this type is a variably-modified type (C99 6.7.5).
@ Error
Whether this type references an error, e.g.
@ UnexpandedPack
Whether this type contains an unexpanded parameter pack (for C++11 variadic templates)
@ Instantiation
Whether this type somehow involves.