clang API Documentation
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>
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 |
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.
Reimplemented from clang::LangOptionsBase.
Definition at line 49 of file LangOptions.h.
Definition at line 67 of file LangOptions.h.
Definition at line 51 of file LangOptions.h.
PPTMK_BestCase | |
PPTMK_FullGeneralitySingleInheritance | |
PPTMK_FullGeneralityMultipleInheritance | |
PPTMK_FullGeneralityVirtualInheritance |
Definition at line 60 of file LangOptions.h.
Definition at line 54 of file LangOptions.h.
Reimplemented from clang::LangOptionsBase.
Definition at line 52 of file LangOptions.h.
Definition at line 17 of file LangOptions.cpp.
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 | , |
1 | , | ||
0 | , | ||
"Objective-C auto-synthesized properties" | |||
) |
Reimplemented from clang::LangOptionsBase.
Encoding extended block type signature clang::LangOptions::BENIGN_LANGOPT | ( | ObjCInferRelatedResultType | , |
1 | , | ||
1 | , | ||
"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 | , | ||
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." | |||
) |
Reimplemented from clang::LangOptionsBase.
Encoding extended block type signature default struct packing maximum alignment implicit value symbol visibility clang::LangOptions::ENUM_LANGOPT | ( | TypeVisibilityMode | , |
Visibility | , | ||
3 | , | ||
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 | , | ||
2 | , | ||
SOB_Undefined | , | ||
"signed integer overflow handling" | |||
) |
bool clang::LangOptions::isSubscriptPointerArithmetic | ( | ) | const [inline] |
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.
void LangOptions::resetNonModularOptions | ( | ) |
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 | , | ||
0 | , | ||
"default maximum alignment for types" | |||
) | [read] |
Reimplemented from clang::LangOptionsBase.
Options for parsing comments.
Definition at line 96 of file LangOptions.h.
Referenced by clang::Sema::ActOnComment(), checkLanguageOptions(), clang::CompilerInvocation::CreateFromArgs(), clang::ASTContext::getRawCommentForDeclNoCache(), and clang::ASTReader::ReadComments().
std::string clang::LangOptions::CurrentModule |
The name of the current module.
Definition at line 88 of file LangOptions.h.
Referenced by clang::Sema::ActOnModuleImport(), clang::Sema::addMethodToGlobalList(), clang::GenerateModuleAction::BeginSourceFileAction(), clang::GenerateModuleAction::ComputeASTConsumerArguments(), clang::CodeGen::CodeGenModule::EmitTopLevelDecl(), EvaluateBuildingModule(), clang::ModuleMap::findOrCreateModule(), clang::ModuleMap::inferFrameworkModule(), clang::ASTUnit::isModuleFile(), clang::CompilerInstance::loadModule(), ParseLangArgs(), and resetNonModularOptions().
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.
std::string clang::LangOptions::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.
Definition at line 93 of file LangOptions.h.
Referenced by clang::Sema::ActOnModuleImport(), clang::CompilerInstance::loadModule(), ParseLangArgs(), and resetNonModularOptions().
std::string clang::LangOptions::ObjCConstantStringClass |
Definition at line 79 of file LangOptions.h.
Referenced by ParseLangArgs().
Definition at line 77 of file LangOptions.h.
Referenced by clang::Sema::ActOnAtEnd(), clang::Sema::ActOnDefs(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::BuildExceptionDeclaration(), clang::Decl::canBeWeakImported(), checkArithmeticOnObjCPointer(), clang::Sema::CheckImplementationIvars(), checkLanguageOptions(), CheckObjCTraitOperandConstraints(), CheckProtocolMethodDefs(), createARCRuntimeFunction(), clang::CodeGen::CreateGNUObjCRuntime(), clang::Sema::DefaultSynthesizeProperties(), DiagnoseUnimplementedAccessor(), clang::CodeGen::CodeGenFunction::EmitObjCAutoreleasePoolStmt(), EncodeBitField(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), getObjCPersonality(), getObjCXXPersonality(), getTerminateFn(), HasFeature(), hasUnwindExceptions(), clang::Sema::ImplMethodsVsClassMethods(), InitializePredefinedMacros(), ParseLangArgs(), and UseOptimizedSetter().
std::string clang::LangOptions::OverflowHandler |
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().
Set of enabled sanitizers.
Definition at line 71 of file LangOptions.h.
Referenced by clang::CodeGen::CodeGenModule::CodeGenModule(), clang::CodeGen::SanitizerMetadata::disableSanitizerForGlobal(), clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromLiteral(), getDarwinDefines(), HasFeature(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), clang::RecordDecl::mayInsertExtraPadding(), ParseLangArgs(), clang::CodeGen::SanitizerMetadata::reportGlobalToASan(), resetNonModularOptions(), and clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition().
std::string clang::LangOptions::SanitizerBlacklistFile |
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.