clang API Documentation

Public Types | Public Member Functions | Public Attributes
clang::LangOptions Class Reference

Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that is accepted. More...

#include <LangOptions.h>

Inheritance diagram for clang::LangOptions:
Inheritance graph
[legend]
Collaboration diagram for clang::LangOptions:
Collaboration graph
[legend]

List of all members.

Public Types

enum  GCMode { NonGC, GCOnly, HybridGC }
enum  StackProtectorMode { SSPOff, SSPOn, SSPStrong, SSPReq }
enum  SignedOverflowBehaviorTy { SOB_Undefined, SOB_Defined, SOB_Trapping }
enum  PragmaMSPointersToMembersKind { PPTMK_BestCase, PPTMK_FullGeneralitySingleInheritance, PPTMK_FullGeneralityMultipleInheritance, PPTMK_FullGeneralityVirtualInheritance }
enum  AddrSpaceMapMangling { ASMM_Target, ASMM_On, ASMM_Off }
typedef clang::Visibility Visibility

Public Member Functions

 LangOptions ()
 BENIGN_LANGOPT (ObjCDefaultSynthProperties, 1, 0,"Objective-C auto-synthesized properties") BENIGN_LANGOPT(EncodeExtendedBlockSig
Encoding extended block type
signature 
BENIGN_LANGOPT (ObjCInferRelatedResultType, 1, 1,"Objective-C related result type inference") VALUE_LANGOPT(PackStruct
Encoding extended block type
signature default struct
packing maximum alignment 
VALUE_LANGOPT (MaxTypeAlign, 32, 0,"default maximum alignment for types") LANGOPT(AssumeSaneOperatorNew
Encoding extended block type
signature default struct
packing maximum alignment
implicit 
__attribute__ ((malloc)) for C++'s new operators") ENUM_LANGOPT(ValueVisibilityMode
Encoding extended block type
signature default struct
packing maximum alignment
implicit value symbol
visibility 
ENUM_LANGOPT (TypeVisibilityMode, Visibility, 3, DefaultVisibility,"type symbol visibility") ENUM_LANGOPT(StackProtector
Encoding extended block type
signature default struct
packing maximum alignment
implicit value symbol
visibility stack protector
mode 
ENUM_LANGOPT (SignedOverflowBehavior, SignedOverflowBehaviorTy, 2, SOB_Undefined,"signed integer overflow handling") BENIGN_LANGOPT(ArrowDepth
Encoding extended block type
signature default struct
packing maximum alignment
implicit value symbol
visibility stack protector
mode maximum number of 
operator->s to follow") BENIGN_LANGOPT (InstantiationDepth, 32, 256,"maximum template instantiation depth") BENIGN_LANGOPT(ConstexprCallDepth
Encoding extended block type
signature default struct
packing maximum alignment
implicit value symbol
visibility stack protector
mode maximum number of maximum
constexpr call depth 
BENIGN_LANGOPT (ConstexprStepLimit, 32, 1048576,"maximum constexpr evaluation steps") BENIGN_LANGOPT(BracketDepth
Encoding extended block type
signature default struct
packing maximum alignment
implicit value symbol
visibility stack protector
mode maximum number of maximum
constexpr call depth maximum
bracket nesting depth 
BENIGN_LANGOPT (NumLargeByValueCopy, 32, 0,"if non-zero, warn about parameter or return Warn if parameter/return value is larger in bytes than this setting. 0 is no check.") LANGOPT(SanitizeAddressFieldPadding
Encoding extended block type
signature default struct
packing maximum alignment
implicit value symbol
visibility stack protector
mode maximum number of maximum
constexpr call depth maximum
bracket nesting depth controls
how aggressive is ASan field 
padding (0:none, 1:least" "aggressive, 2:more aggressive)") bool isSignedOverflowDefined() const
bool isSubscriptPointerArithmetic () const
void resetNonModularOptions ()
 Reset all of the options that are not considered when building a module.

Public Attributes

SanitizerSet Sanitize
 Set of enabled sanitizers.
std::string SanitizerBlacklistFile
 Path to blacklist file specifying which objects (files, functions, variables) should not be instrumented.
clang::ObjCRuntime ObjCRuntime
std::string ObjCConstantStringClass
std::string OverflowHandler
 The name of the handler function to be called when -ftrapv is specified.
std::string CurrentModule
 The name of the current module.
std::string ImplementationOfModule
 The name of the module that the translation unit is an implementation of. Prevents semantic imports, but does not otherwise treat this as the CurrentModule.
CommentOptions CommentOpts
 Options for parsing comments.
Encoding extended block type
signature default struct
packing maximum alignment
implicit 
Visibility
Encoding extended block type
signature default struct
packing maximum alignment
implicit 
DefaultVisibility
Encoding extended block type
signature default struct
packing maximum alignment
implicit value symbol
visibility 
StackProtectorMode
Encoding extended block type
signature default struct
packing maximum alignment
implicit value symbol
visibility 
SSPOff

Detailed Description

Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that is accepted.

Definition at line 47 of file LangOptions.h.


Member Typedef Documentation

Reimplemented from clang::LangOptionsBase.

Definition at line 49 of file LangOptions.h.


Member Enumeration Documentation

Enumerator:
ASMM_Target 
ASMM_On 
ASMM_Off 

Definition at line 67 of file LangOptions.h.

Enumerator:
NonGC 
GCOnly 
HybridGC 

Definition at line 51 of file LangOptions.h.

Enumerator:
PPTMK_BestCase 
PPTMK_FullGeneralitySingleInheritance 
PPTMK_FullGeneralityMultipleInheritance 
PPTMK_FullGeneralityVirtualInheritance 

Definition at line 60 of file LangOptions.h.

Enumerator:
SOB_Undefined 
SOB_Defined 
SOB_Trapping 

Definition at line 54 of file LangOptions.h.

Enumerator:
SSPOff 
SSPOn 
SSPStrong 
SSPReq 

Reimplemented from clang::LangOptionsBase.

Definition at line 52 of file LangOptions.h.


Constructor & Destructor Documentation

Definition at line 17 of file LangOptions.cpp.


Member Function Documentation

Encoding extended block type signature default struct packing maximum alignment implicit clang::LangOptions::__attribute__ ( (malloc)  ) [new]

Reimplemented from clang::LangOptionsBase.

clang::LangOptions::BENIGN_LANGOPT ( ObjCDefaultSynthProperties  ,
,
,
"Objective-C auto-synthesized properties"   
)

Reimplemented from clang::LangOptionsBase.

Encoding extended block type signature clang::LangOptions::BENIGN_LANGOPT ( ObjCInferRelatedResultType  ,
,
,
"Objective-C related result type inference"   
)

Reimplemented from clang::LangOptionsBase.

Encoding extended block type signature default struct packing maximum alignment implicit value symbol visibility stack protector mode maximum number of maximum constexpr call depth clang::LangOptions::BENIGN_LANGOPT ( ConstexprStepLimit  ,
32  ,
1048576  ,
"maximum constexpr evaluation steps"   
)

Reimplemented from clang::LangOptionsBase.

Encoding extended block type signature default struct packing maximum alignment implicit value symbol visibility stack protector mode maximum number of maximum constexpr call depth maximum bracket nesting depth clang::LangOptions::BENIGN_LANGOPT ( NumLargeByValueCopy  ,
32  ,
,
"if non-  zero,
warn about parameter or return Warn if parameter/return value is larger in bytes than this setting.0 is no check."   
)

Reimplemented from clang::LangOptionsBase.

Encoding extended block type signature default struct packing maximum alignment implicit value symbol visibility clang::LangOptions::ENUM_LANGOPT ( TypeVisibilityMode  ,
Visibility  ,
,
DefaultVisibility  ,
"type symbol visibility"   
)

Reimplemented from clang::LangOptionsBase.

Encoding extended block type signature default struct packing maximum alignment implicit value symbol visibility stack protector mode clang::LangOptions::ENUM_LANGOPT ( SignedOverflowBehavior  ,
SignedOverflowBehaviorTy  ,
,
SOB_Undefined  ,
"signed integer overflow handling"   
)

Definition at line 238 of file LangOptions.h.

Encoding extended block type signature default struct packing maximum alignment implicit value symbol visibility stack protector mode maximum number of clang::LangOptions::operator->s to follow") BENIGN_LANGOPT ( InstantiationDepth  ,
32  ,
256  ,
"maximum template instantiation depth"   
)

Reimplemented from clang::LangOptionsBase.

Encoding extended block type signature default struct packing maximum alignment implicit value symbol visibility stack protector mode maximum number of maximum constexpr call depth maximum bracket nesting depth controls how aggressive is ASan field clang::LangOptions::padding ( 0:none  ,
1:least" "  aggressive,
2:more  aggressive 
) const [inline]

Definition at line 220 of file LangOptions.h.

Reset all of the options that are not considered when building a module.

Definition at line 23 of file LangOptions.cpp.

References clang::SanitizerSet::clear(), CurrentModule, ImplementationOfModule, Sanitize, and SanitizerBlacklistFile.

Encoding extended block type signature default struct packing maximum alignment clang::LangOptions::VALUE_LANGOPT ( MaxTypeAlign  ,
32  ,
,
"default maximum alignment for types"   
) [read]

Reimplemented from clang::LangOptionsBase.


Member Data Documentation

Encoding extended block type signature default struct packing maximum alignment implicit clang::LangOptions::DefaultVisibility

Reimplemented from clang::LangOptionsBase.

Definition at line 191 of file LangOptions.h.

The name of the module that the translation unit is an implementation of. Prevents semantic imports, but does not otherwise treat this as the CurrentModule.

Definition at line 93 of file LangOptions.h.

Referenced by clang::Sema::ActOnModuleImport(), clang::CompilerInstance::loadModule(), ParseLangArgs(), and resetNonModularOptions().

Definition at line 79 of file LangOptions.h.

Referenced by ParseLangArgs().

The name of the handler function to be called when -ftrapv is specified.

If none is specified, abort (GCC-compatible behaviour).

Definition at line 85 of file LangOptions.h.

Referenced by ParseLangArgs().

Path to blacklist file specifying which objects (files, functions, variables) should not be instrumented.

Definition at line 75 of file LangOptions.h.

Referenced by addDataFlowSanitizerPass(), ParseLangArgs(), and resetNonModularOptions().

Encoding extended block type signature default struct packing maximum alignment implicit value symbol visibility clang::LangOptions::SSPOff

Reimplemented from clang::LangOptionsBase.

Definition at line 195 of file LangOptions.h.

Referenced by ParseLangArgs().

Encoding extended block type signature default struct packing maximum alignment implicit value symbol visibility clang::LangOptions::StackProtectorMode

Reimplemented from clang::LangOptionsBase.

Definition at line 195 of file LangOptions.h.

Encoding extended block type signature default struct packing maximum alignment implicit clang::LangOptions::Visibility

Reimplemented from clang::LangOptionsBase.

Definition at line 191 of file LangOptions.h.


The documentation for this class was generated from the following files: