clang  14.0.0git
Classes | Namespaces | Macros | Enumerations
LangOptions.h File Reference
#include "clang/Basic/CommentOptions.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/LangStandard.h"
#include "clang/Basic/ObjCRuntime.h"
#include "clang/Basic/Sanitizers.h"
#include "clang/Basic/TargetCXXABI.h"
#include "clang/Basic/Visibility.h"
#include "llvm/ADT/FloatingPointMode.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include <string>
#include <vector>
#include "clang/Basic/LangOptions.def"
#include "clang/Basic/FPOptions.def"
Include dependency graph for LangOptions.h:

Go to the source code of this file.

Classes

class  clang::LangOptionsBase
 Bitfields of LangOptions, split out from LangOptions in order to ensure that this large collection of bitfields is a trivial class type. More...
 
class  clang::LangOptions
 Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that is accepted. More...
 
class  clang::FPOptions
 
class  clang::FPOptionsOverride
 Represents difference between two FPOptions values. More...
 

Namespaces

 clang
 

Macros

#define LANGOPT(Name, Bits, Default, Description)   unsigned Name : Bits;
 
#define ENUM_LANGOPT(Name, Type, Bits, Default, Description)
 
#define LANGOPT(Name, Bits, Default, Description)
 
#define ENUM_LANGOPT(Name, Type, Bits, Default, Description)   unsigned Name : Bits;
 
#define LANGOPT(Name, Bits, Default, Description)
 
#define ENUM_LANGOPT(Name, Type, Bits, Default, Description)
 
#define OPTION(NAME, TYPE, WIDTH, PREVIOUS)
 
#define OPTION(NAME, TYPE, WIDTH, PREVIOUS)   +WIDTH
 
#define OPTION(NAME, TYPE, WIDTH, PREVIOUS)
 
#define OPTION(NAME, TYPE, WIDTH, PREVIOUS)
 

Enumerations

enum  clang::MSVtorDispMode { clang::MSVtorDispMode::Never, clang::MSVtorDispMode::ForVBaseOverride, clang::MSVtorDispMode::ForVFTable }
 In the Microsoft ABI, this controls the placement of virtual displacement members used to implement virtual inheritance. More...
 
enum  clang::TranslationUnitKind { clang::TU_Complete, clang::TU_Prefix, clang::TU_Module, clang::TU_Incremental }
 Describes the kind of translation unit being processed. More...
 

Detailed Description

Defines the clang::LangOptions interface.

Definition in file LangOptions.h.

Macro Definition Documentation

◆ ENUM_LANGOPT [1/3]

#define ENUM_LANGOPT (   Name,
  Type,
  Bits,
  Default,
  Description 
)

Definition at line 386 of file LangOptions.h.

◆ ENUM_LANGOPT [2/3]

#define ENUM_LANGOPT (   Name,
  Type,
  Bits,
  Default,
  Description 
)    unsigned Name : Bits;

Definition at line 386 of file LangOptions.h.

◆ ENUM_LANGOPT [3/3]

#define ENUM_LANGOPT (   Name,
  Type,
  Bits,
  Default,
  Description 
)
Value:
Type get##Name() const { return static_cast<Type>(Name); } \
void set##Name(Type Value) { Name = static_cast<unsigned>(Value); }

Definition at line 386 of file LangOptions.h.

◆ LANGOPT [1/3]

#define LANGOPT (   Name,
  Bits,
  Default,
  Description 
)    unsigned Name : Bits;

Definition at line 385 of file LangOptions.h.

◆ LANGOPT [2/3]

#define LANGOPT (   Name,
  Bits,
  Default,
  Description 
)

Definition at line 385 of file LangOptions.h.

◆ LANGOPT [3/3]

#define LANGOPT (   Name,
  Bits,
  Default,
  Description 
)

Definition at line 385 of file LangOptions.h.

◆ OPTION [1/4]

#define OPTION (   NAME,
  TYPE,
  WIDTH,
  PREVIOUS 
)
Value:
static constexpr storage_type NAME##Shift = \
PREVIOUS##Shift + PREVIOUS##Width; \
static constexpr storage_type NAME##Width = WIDTH; \
static constexpr storage_type NAME##Mask = ((1 << NAME##Width) - 1) \
<< NAME##Shift;

Definition at line 681 of file LangOptions.h.

◆ OPTION [2/4]

#define OPTION (   NAME,
  TYPE,
  WIDTH,
  PREVIOUS 
)    +WIDTH

Definition at line 681 of file LangOptions.h.

◆ OPTION [3/4]

#define OPTION (   NAME,
  TYPE,
  WIDTH,
  PREVIOUS 
)
Value:
TYPE get##NAME() const { \
return static_cast<TYPE>((Value & NAME##Mask) >> NAME##Shift); \
} \
void set##NAME(TYPE value) { \
Value = (Value & ~NAME##Mask) | (storage_type(value) << NAME##Shift); \
}

Definition at line 681 of file LangOptions.h.

◆ OPTION [4/4]

#define OPTION (   NAME,
  TYPE,
  WIDTH,
  PREVIOUS 
)
Value:
bool has##NAME##Override() const { \
return OverrideMask & FPOptions::NAME##Mask; \
} \
TYPE get##NAME##Override() const { \
assert(has##NAME##Override()); \
return Options.get##NAME(); \
} \
void clear##NAME##Override() { \
/* Clear the actual value so that we don't have spurious differences when \
* testing equality. */ \
Options.set##NAME(TYPE(0)); \
OverrideMask &= ~FPOptions::NAME##Mask; \
} \
void set##NAME##Override(TYPE value) { \
Options.set##NAME(value); \
OverrideMask |= FPOptions::NAME##Mask; \
}

Definition at line 681 of file LangOptions.h.

TYPE
#define TYPE(DERIVED, BASE)
Definition: ASTFwd.h:26
set
set(LLVM_LINK_COMPONENTS Support) set(LLVM_EXPORTED_SYMBOL_FILE $
Definition: CMakeLists.txt:1
Value
Value
Definition: UninitializedValues.cpp:102
clang::ast_matchers::has
const internal::ArgumentAdaptingMatcherFunc< internal::HasMatcher > has
Matches AST nodes that have child AST nodes that match the provided matcher.
Definition: ASTMatchersInternal.cpp:994
clang::prec::Shift
@ Shift
Definition: OperatorPrecedence.h:39
Type
MatchType Type
Definition: ASTMatchFinder.cpp:70