clang 17.0.0git
|
#include "clang/Frontend/CompilerInvocation.h"
#include "TestModuleFileExtension.h"
#include "clang/Basic/Builtins.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/CommentOptions.h"
#include "clang/Basic/DebugInfoOptions.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/DiagnosticDriver.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/FileSystemOptions.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/LangStandard.h"
#include "clang/Basic/ObjCRuntime.h"
#include "clang/Basic/Sanitizers.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/TargetOptions.h"
#include "clang/Basic/Version.h"
#include "clang/Basic/Visibility.h"
#include "clang/Basic/XRayInstr.h"
#include "clang/Config/config.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Driver/Options.h"
#include "clang/Frontend/CommandLineSourceLoc.h"
#include "clang/Frontend/DependencyOutputOptions.h"
#include "clang/Frontend/FrontendDiagnostic.h"
#include "clang/Frontend/FrontendOptions.h"
#include "clang/Frontend/FrontendPluginRegistry.h"
#include "clang/Frontend/MigratorOptions.h"
#include "clang/Frontend/PreprocessorOutputOptions.h"
#include "clang/Frontend/TextDiagnosticBuffer.h"
#include "clang/Frontend/Utils.h"
#include "clang/Lex/HeaderSearchOptions.h"
#include "clang/Lex/PreprocessorOptions.h"
#include "clang/Sema/CodeCompleteOptions.h"
#include "clang/Serialization/ASTBitCodes.h"
#include "clang/Serialization/ModuleFileExtension.h"
#include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/CachedHashString.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/FloatingPointMode.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/Linker/Linker.h"
#include "llvm/MC/MCTargetOptions.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/OptSpecifier.h"
#include "llvm/Option/OptTable.h"
#include "llvm/Option/Option.h"
#include "llvm/ProfileData/InstrProfReader.h"
#include "llvm/Remarks/HotnessThresholdParser.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/HashBuilder.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Regex.h"
#include "llvm/Support/VersionTuple.h"
#include "llvm/Support/VirtualFileSystem.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/TargetParser/Host.h"
#include "llvm/TargetParser/Triple.h"
#include <algorithm>
#include <atomic>
#include <cassert>
#include <cstddef>
#include <cstring>
#include <ctime>
#include <fstream>
#include <limits>
#include <memory>
#include <optional>
#include <string>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>
#include "clang/Driver/Options.inc"
#include "clang/StaticAnalyzer/Core/Analyses.def"
#include "clang/StaticAnalyzer/Core/AnalyzerOptions.def"
#include "clang/Basic/LangStandards.def"
#include "clang/Basic/LangOptions.def"
#include "clang/Basic/DiagnosticOptions.def"
Go to the source code of this file.
Macros | |
#define | SIMPLE_ENUM_VALUE_TABLE |
#define | PARSE_OPTION_WITH_MARSHALLING( ARGS, DIAGS, PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX) |
#define | GENERATE_OPTION_WITH_MARSHALLING( ARGS, STRING_ALLOCATOR, PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER, MERGER, EXTRACTOR, TABLE_INDEX) |
#define | ANALYZER_OPTION_WITH_MARSHALLING(...) GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define | ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATFN) |
#define | ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATFN) |
#define | ANALYSIS_PURGE(NAME, CMDFLAG, DESC) |
#define | ANALYSIS_INLINING_MODE(NAME, CMDFLAG, DESC) |
#define | ANALYZER_OPTION_WITH_MARSHALLING(...) PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define | ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATFN) .Case(CMDFLAG, NAME##Model) |
#define | ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATFN) .Case(CMDFLAG, PD_##NAME) |
#define | ANALYSIS_PURGE(NAME, CMDFLAG, DESC) .Case(CMDFLAG, NAME) |
#define | ANALYSIS_INLINING_MODE(NAME, CMDFLAG, DESC) .Case(CMDFLAG, NAME) |
#define | ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, DEFAULT_VAL) initOption(AnOpts.Config, Diags, AnOpts.NAME, CMDFLAG, DEFAULT_VAL); |
#define | ANALYZER_OPTION_DEPENDS_ON_USER_MODE(...) |
#define | ANALYZER_OPTION(...) |
#define | ANALYZER_OPTION_DEPENDS_ON_USER_MODE(TYPE, NAME, CMDFLAG, DESC, SHALLOW_VAL, DEEP_VAL) |
#define | CODEGEN_OPTION_WITH_MARSHALLING(...) GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define | CODEGEN_OPTION_WITH_MARSHALLING(...) PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define | DEPENDENCY_OUTPUT_OPTION_WITH_MARSHALLING(...) GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define | DEPENDENCY_OUTPUT_OPTION_WITH_MARSHALLING(...) PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define | FILE_SYSTEM_OPTION_WITH_MARSHALLING(...) GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define | FILE_SYSTEM_OPTION_WITH_MARSHALLING(...) PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define | MIGRATOR_OPTION_WITH_MARSHALLING(...) GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define | MIGRATOR_OPTION_WITH_MARSHALLING(...) PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define | DIAG_OPTION_WITH_MARSHALLING(...) GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define | DIAG_OPTION_WITH_MARSHALLING(...) PARSE_OPTION_WITH_MARSHALLING(Args, *Diags, __VA_ARGS__) |
#define | FRONTEND_OPTION_WITH_MARSHALLING(...) GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define | FRONTEND_OPTION_WITH_MARSHALLING(...) PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define | HEADER_SEARCH_OPTION_WITH_MARSHALLING(...) GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define | HEADER_SEARCH_OPTION_WITH_MARSHALLING(...) PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define | LANG_OPTION_WITH_MARSHALLING(...) GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define | LANGSTANDARD(id, name, lang, desc, features) |
#define | LANGSTANDARD_ALIAS(id, alias) if (KindValue == LangStandard::lang_##id) ++NumAliases; |
#define | LANGSTANDARD_ALIAS_DEPR(id, alias) |
#define | LANGSTANDARD(id, name, lang, desc, features) |
#define | LANGSTANDARD_ALIAS(id, alias) if (KindValue == LangStandard::lang_##id) Diag << alias; |
#define | LANGSTANDARD_ALIAS_DEPR(id, alias) |
#define | LANG_OPTION_WITH_MARSHALLING(...) PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define | PREPROCESSOR_OPTION_WITH_MARSHALLING(...) GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define | PREPROCESSOR_OPTION_WITH_MARSHALLING(...) PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define | PREPROCESSOR_OUTPUT_OPTION_WITH_MARSHALLING(...) GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define | PREPROCESSOR_OUTPUT_OPTION_WITH_MARSHALLING(...) PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define | TARGET_OPTION_WITH_MARSHALLING(...) GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define | TARGET_OPTION_WITH_MARSHALLING(...) PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define | LANGOPT(Name, Bits, Default, Description) HBuilder.add(LangOpts->Name); |
#define | ENUM_LANGOPT(Name, Type, Bits, Default, Description) HBuilder.add(static_cast<unsigned>(LangOpts->get##Name())); |
#define | BENIGN_LANGOPT(Name, Bits, Default, Description) |
#define | BENIGN_ENUM_LANGOPT(Name, Type, Bits, Default, Description) |
#define | DIAGOPT(Name, Bits, Default) HBuilder.add(diagOpts.Name); |
#define | ENUM_DIAGOPT(Name, Type, Bits, Default) HBuilder.add(diagOpts.get##Name()); |
Typedefs | |
using | ParseFn = llvm::function_ref< bool(CompilerInvocation &, ArrayRef< const char * >, DiagnosticsEngine &, const char *)> |
using | GenerateFn = llvm::function_ref< void(CompilerInvocation &, SmallVectorImpl< const char * > &, CompilerInvocation::StringAllocator)> |
Functions | |
static Expected< std::optional< uint32_t > > | parseToleranceOption (StringRef Arg) |
static std::optional< bool > | normalizeSimpleFlag (OptSpecifier Opt, unsigned TableIndex, const ArgList &Args, DiagnosticsEngine &Diags) |
static std::optional< bool > | normalizeSimpleNegativeFlag (OptSpecifier Opt, unsigned, const ArgList &Args, DiagnosticsEngine &) |
static void | denormalizeSimpleFlag (SmallVectorImpl< const char * > &Args, const char *Spelling, CompilerInvocation::StringAllocator, Option::OptionClass, unsigned,...) |
The tblgen-erated code passes in a fifth parameter of an arbitrary type, but denormalizeSimpleFlags never looks at it. | |
template<typename T > | |
static constexpr bool | is_uint64_t_convertible () |
template<typename T , std::enable_if_t<!is_uint64_t_convertible< T >(), bool > = false> | |
static auto | makeFlagToValueNormalizer (T Value) |
static auto | makeBooleanOptionNormalizer (bool Value, bool OtherValue, OptSpecifier OtherOpt) |
static auto | makeBooleanOptionDenormalizer (bool Value) |
static void | denormalizeStringImpl (SmallVectorImpl< const char * > &Args, const char *Spelling, CompilerInvocation::StringAllocator SA, Option::OptionClass OptClass, unsigned, const Twine &Value) |
template<typename T > | |
static void | denormalizeString (SmallVectorImpl< const char * > &Args, const char *Spelling, CompilerInvocation::StringAllocator SA, Option::OptionClass OptClass, unsigned TableIndex, T Value) |
static std::optional< SimpleEnumValue > | findValueTableByName (const SimpleEnumValueTable &Table, StringRef Name) |
static std::optional< SimpleEnumValue > | findValueTableByValue (const SimpleEnumValueTable &Table, unsigned Value) |
static std::optional< unsigned > | normalizeSimpleEnum (OptSpecifier Opt, unsigned TableIndex, const ArgList &Args, DiagnosticsEngine &Diags) |
static void | denormalizeSimpleEnumImpl (SmallVectorImpl< const char * > &Args, const char *Spelling, CompilerInvocation::StringAllocator SA, Option::OptionClass OptClass, unsigned TableIndex, unsigned Value) |
template<typename T > | |
static void | denormalizeSimpleEnum (SmallVectorImpl< const char * > &Args, const char *Spelling, CompilerInvocation::StringAllocator SA, Option::OptionClass OptClass, unsigned TableIndex, T Value) |
static std::optional< std::string > | normalizeString (OptSpecifier Opt, int TableIndex, const ArgList &Args, DiagnosticsEngine &Diags) |
template<typename IntTy > | |
static std::optional< IntTy > | normalizeStringIntegral (OptSpecifier Opt, int, const ArgList &Args, DiagnosticsEngine &Diags) |
static std::optional< std::vector< std::string > > | normalizeStringVector (OptSpecifier Opt, int, const ArgList &Args, DiagnosticsEngine &) |
static void | denormalizeStringVector (SmallVectorImpl< const char * > &Args, const char *Spelling, CompilerInvocation::StringAllocator SA, Option::OptionClass OptClass, unsigned TableIndex, const std::vector< std::string > &Values) |
static std::optional< std::string > | normalizeTriple (OptSpecifier Opt, int TableIndex, const ArgList &Args, DiagnosticsEngine &Diags) |
template<typename T , typename U > | |
static T | mergeForwardValue (T KeyPath, U Value) |
template<typename T , typename U > | |
static T | mergeMaskValue (T KeyPath, U Value) |
template<typename T > | |
static T | extractForwardValue (T KeyPath) |
template<typename T , typename U , U Value> | |
static T | extractMaskValue (T KeyPath) |
static StringRef | GetInputKindName (InputKind IK) |
Get language name for given input kind. | |
static bool | FixupInvocation (CompilerInvocation &Invocation, DiagnosticsEngine &Diags, const ArgList &Args, InputKind IK) |
static unsigned | getOptimizationLevel (ArgList &Args, InputKind IK, DiagnosticsEngine &Diags) |
static unsigned | getOptimizationLevelSize (ArgList &Args) |
static void | GenerateArg (SmallVectorImpl< const char * > &Args, llvm::opt::OptSpecifier OptSpecifier, CompilerInvocation::StringAllocator SA) |
static void | GenerateArg (SmallVectorImpl< const char * > &Args, llvm::opt::OptSpecifier OptSpecifier, const Twine &Value, CompilerInvocation::StringAllocator SA) |
static bool | RoundTrip (ParseFn Parse, GenerateFn Generate, CompilerInvocation &RealInvocation, CompilerInvocation &DummyInvocation, ArrayRef< const char * > CommandLineArgs, DiagnosticsEngine &Diags, const char *Argv0, bool CheckAgainstOriginalInvocation=false, bool ForceRoundTrip=false) |
May perform round-trip of command line arguments. | |
static void | addDiagnosticArgs (ArgList &Args, OptSpecifier Group, OptSpecifier GroupWithValue, std::vector< std::string > &Diagnostics) |
static void | parseAnalyzerConfigs (AnalyzerOptions &AnOpts, DiagnosticsEngine *Diags) |
static void | getAllNoBuiltinFuncValues (ArgList &Args, std::vector< std::string > &Funcs) |
static void | GenerateAnalyzerArgs (AnalyzerOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA) |
static bool | ParseAnalyzerArgs (AnalyzerOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags) |
static StringRef | getStringOption (AnalyzerOptions::ConfigTable &Config, StringRef OptionName, StringRef DefaultVal) |
static void | initOption (AnalyzerOptions::ConfigTable &Config, DiagnosticsEngine *Diags, StringRef &OptionField, StringRef Name, StringRef DefaultVal) |
static void | initOption (AnalyzerOptions::ConfigTable &Config, DiagnosticsEngine *Diags, bool &OptionField, StringRef Name, bool DefaultVal) |
static void | initOption (AnalyzerOptions::ConfigTable &Config, DiagnosticsEngine *Diags, unsigned &OptionField, StringRef Name, unsigned DefaultVal) |
static void | GenerateOptimizationRemark (SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA, OptSpecifier OptEQ, StringRef Name, const CodeGenOptions::OptRemark &Remark) |
Generate a remark argument. This is an inverse of ParseOptimizationRemark . | |
static CodeGenOptions::OptRemark | ParseOptimizationRemark (DiagnosticsEngine &Diags, ArgList &Args, OptSpecifier OptEQ, StringRef Name) |
Parse a remark command line argument. | |
static bool | parseDiagnosticLevelMask (StringRef FlagName, const std::vector< std::string > &Levels, DiagnosticsEngine &Diags, DiagnosticLevelMask &M) |
static void | parseSanitizerKinds (StringRef FlagName, const std::vector< std::string > &Sanitizers, DiagnosticsEngine &Diags, SanitizerSet &S) |
static SmallVector< StringRef, 4 > | serializeSanitizerKinds (SanitizerSet S) |
static void | parseXRayInstrumentationBundle (StringRef FlagName, StringRef Bundle, ArgList &Args, DiagnosticsEngine &D, XRayInstrSet &S) |
static std::string | serializeXRayInstrumentationBundle (const XRayInstrSet &S) |
static void | setPGOUseInstrumentor (CodeGenOptions &Opts, const Twine &ProfileName, llvm::vfs::FileSystem &FS, DiagnosticsEngine &Diags) |
static void | GenerateDependencyOutputArgs (const DependencyOutputOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA) |
static bool | ParseDependencyOutputArgs (DependencyOutputOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags, frontend::ActionKind Action, bool ShowLineMarkers) |
static bool | parseShowColorsArgs (const ArgList &Args, bool DefaultColor) |
static bool | checkVerifyPrefixes (const std::vector< std::string > &VerifyPrefixes, DiagnosticsEngine &Diags) |
static void | GenerateFileSystemArgs (const FileSystemOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA) |
static bool | ParseFileSystemArgs (FileSystemOptions &Opts, const ArgList &Args, DiagnosticsEngine &Diags) |
static void | GenerateMigratorArgs (const MigratorOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA) |
static bool | ParseMigratorArgs (MigratorOptions &Opts, const ArgList &Args, DiagnosticsEngine &Diags) |
static bool | parseTestModuleFileExtensionArg (StringRef Arg, std::string &BlockName, unsigned &MajorVersion, unsigned &MinorVersion, bool &Hashed, std::string &UserInfo) |
Parse the argument to the -ftest-module-file-extension command-line argument. | |
static const auto & | getFrontendActionTable () |
Return a table that associates command line option specifiers with the frontend action. | |
static std::optional< frontend::ActionKind > | getFrontendAction (OptSpecifier &Opt) |
Maps command line option to frontend action. | |
static std::optional< OptSpecifier > | getProgramActionOpt (frontend::ActionKind ProgramAction) |
Maps frontend action to command line option. | |
static void | GenerateFrontendArgs (const FrontendOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA, bool IsHeader) |
static bool | ParseFrontendArgs (FrontendOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags, bool &IsHeaderFile) |
static void | GenerateHeaderSearchArgs (HeaderSearchOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA) |
static bool | ParseHeaderSearchArgs (HeaderSearchOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags, const std::string &WorkingDir) |
static bool | IsInputCompatibleWithStandard (InputKind IK, const LangStandard &S) |
Check if input file kind and language standard are compatible. | |
static bool | isStrictlyPreprocessorAction (frontend::ActionKind Action) |
static void | GeneratePreprocessorArgs (PreprocessorOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA, const LangOptions &LangOpts, const FrontendOptions &FrontendOpts, const CodeGenOptions &CodeGenOpts) |
static bool | ParsePreprocessorArgs (PreprocessorOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags, frontend::ActionKind Action, const FrontendOptions &FrontendOpts) |
static void | GeneratePreprocessorOutputArgs (const PreprocessorOutputOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA, frontend::ActionKind Action) |
static bool | ParsePreprocessorOutputArgs (PreprocessorOutputOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags, frontend::ActionKind Action) |
static void | GenerateTargetArgs (const TargetOptions &Opts, SmallVectorImpl< const char * > &Args, CompilerInvocation::StringAllocator SA) |
static bool | ParseTargetArgs (TargetOptions &Opts, ArgList &Args, DiagnosticsEngine &Diags) |
#define ANALYSIS_CONSTRAINTS | ( | NAME, | |
CMDFLAG, | |||
DESC, | |||
CREATFN | |||
) |
#define ANALYSIS_CONSTRAINTS | ( | NAME, | |
CMDFLAG, | |||
DESC, | |||
CREATFN | |||
) | .Case(CMDFLAG, NAME##Model) |
#define ANALYSIS_DIAGNOSTICS | ( | NAME, | |
CMDFLAG, | |||
DESC, | |||
CREATFN | |||
) |
#define ANALYSIS_DIAGNOSTICS | ( | NAME, | |
CMDFLAG, | |||
DESC, | |||
CREATFN | |||
) | .Case(CMDFLAG, PD_##NAME) |
#define ANALYSIS_INLINING_MODE | ( | NAME, | |
CMDFLAG, | |||
DESC | |||
) |
#define ANALYSIS_INLINING_MODE | ( | NAME, | |
CMDFLAG, | |||
DESC | |||
) | .Case(CMDFLAG, NAME) |
#define ANALYSIS_PURGE | ( | NAME, | |
CMDFLAG, | |||
DESC | |||
) |
#define ANALYSIS_PURGE | ( | NAME, | |
CMDFLAG, | |||
DESC | |||
) | .Case(CMDFLAG, NAME) |
#define ANALYZER_OPTION | ( | ... | ) |
#define ANALYZER_OPTION | ( | TYPE, | |
NAME, | |||
CMDFLAG, | |||
DESC, | |||
DEFAULT_VAL | |||
) | initOption(AnOpts.Config, Diags, AnOpts.NAME, CMDFLAG, DEFAULT_VAL); |
#define ANALYZER_OPTION_DEPENDS_ON_USER_MODE | ( | ... | ) |
#define ANALYZER_OPTION_DEPENDS_ON_USER_MODE | ( | TYPE, | |
NAME, | |||
CMDFLAG, | |||
DESC, | |||
SHALLOW_VAL, | |||
DEEP_VAL | |||
) |
#define ANALYZER_OPTION_WITH_MARSHALLING | ( | ... | ) | GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define ANALYZER_OPTION_WITH_MARSHALLING | ( | ... | ) | PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define BENIGN_ENUM_LANGOPT | ( | Name, | |
Type, | |||
Bits, | |||
Default, | |||
Description | |||
) |
#define BENIGN_LANGOPT | ( | Name, | |
Bits, | |||
Default, | |||
Description | |||
) |
#define CODEGEN_OPTION_WITH_MARSHALLING | ( | ... | ) | GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define CODEGEN_OPTION_WITH_MARSHALLING | ( | ... | ) | PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define DEPENDENCY_OUTPUT_OPTION_WITH_MARSHALLING | ( | ... | ) | GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define DEPENDENCY_OUTPUT_OPTION_WITH_MARSHALLING | ( | ... | ) | PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define DIAG_OPTION_WITH_MARSHALLING | ( | ... | ) | GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define DIAG_OPTION_WITH_MARSHALLING | ( | ... | ) | PARSE_OPTION_WITH_MARSHALLING(Args, *Diags, __VA_ARGS__) |
#define DIAGOPT | ( | Name, | |
Bits, | |||
Default | |||
) | HBuilder.add(diagOpts.Name); |
#define ENUM_DIAGOPT | ( | Name, | |
Type, | |||
Bits, | |||
Default | |||
) | HBuilder.add(diagOpts.get##Name()); |
#define ENUM_LANGOPT | ( | Name, | |
Type, | |||
Bits, | |||
Default, | |||
Description | |||
) | HBuilder.add(static_cast<unsigned>(LangOpts->get##Name())); |
#define FILE_SYSTEM_OPTION_WITH_MARSHALLING | ( | ... | ) | GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define FILE_SYSTEM_OPTION_WITH_MARSHALLING | ( | ... | ) | PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define FRONTEND_OPTION_WITH_MARSHALLING | ( | ... | ) | GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define FRONTEND_OPTION_WITH_MARSHALLING | ( | ... | ) | PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define GENERATE_OPTION_WITH_MARSHALLING | ( | ARGS, | |
STRING_ALLOCATOR, | |||
PREFIX_TYPE, | |||
NAME, | |||
ID, | |||
KIND, | |||
GROUP, | |||
ALIAS, | |||
ALIASARGS, | |||
FLAGS, | |||
PARAM, | |||
HELPTEXT, | |||
METAVAR, | |||
VALUES, | |||
SPELLING, | |||
SHOULD_PARSE, | |||
ALWAYS_EMIT, | |||
KEYPATH, | |||
DEFAULT_VALUE, | |||
IMPLIED_CHECK, | |||
IMPLIED_VALUE, | |||
NORMALIZER, | |||
DENORMALIZER, | |||
MERGER, | |||
EXTRACTOR, | |||
TABLE_INDEX | |||
) |
Definition at line 446 of file CompilerInvocation.cpp.
#define HEADER_SEARCH_OPTION_WITH_MARSHALLING | ( | ... | ) | GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define HEADER_SEARCH_OPTION_WITH_MARSHALLING | ( | ... | ) | PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define LANG_OPTION_WITH_MARSHALLING | ( | ... | ) | GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define LANG_OPTION_WITH_MARSHALLING | ( | ... | ) | PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define LANGOPT | ( | Name, | |
Bits, | |||
Default, | |||
Description | |||
) | HBuilder.add(LangOpts->Name); |
#define LANGSTANDARD | ( | id, | |
name, | |||
lang, | |||
desc, | |||
features | |||
) |
#define LANGSTANDARD | ( | id, | |
name, | |||
lang, | |||
desc, | |||
features | |||
) |
#define LANGSTANDARD_ALIAS | ( | id, | |
alias | |||
) | if (KindValue == LangStandard::lang_##id) ++NumAliases; |
#define LANGSTANDARD_ALIAS_DEPR | ( | id, | |
alias | |||
) |
#define LANGSTANDARD_ALIAS_DEPR | ( | id, | |
alias | |||
) |
#define MIGRATOR_OPTION_WITH_MARSHALLING | ( | ... | ) | GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define MIGRATOR_OPTION_WITH_MARSHALLING | ( | ... | ) | PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define PARSE_OPTION_WITH_MARSHALLING | ( | ARGS, | |
DIAGS, | |||
PREFIX_TYPE, | |||
NAME, | |||
ID, | |||
KIND, | |||
GROUP, | |||
ALIAS, | |||
ALIASARGS, | |||
FLAGS, | |||
PARAM, | |||
HELPTEXT, | |||
METAVAR, | |||
VALUES, | |||
SPELLING, | |||
SHOULD_PARSE, | |||
ALWAYS_EMIT, | |||
KEYPATH, | |||
DEFAULT_VALUE, | |||
IMPLIED_CHECK, | |||
IMPLIED_VALUE, | |||
NORMALIZER, | |||
DENORMALIZER, | |||
MERGER, | |||
EXTRACTOR, | |||
TABLE_INDEX | |||
) |
Definition at line 429 of file CompilerInvocation.cpp.
#define PREPROCESSOR_OPTION_WITH_MARSHALLING | ( | ... | ) | GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define PREPROCESSOR_OPTION_WITH_MARSHALLING | ( | ... | ) | PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define PREPROCESSOR_OUTPUT_OPTION_WITH_MARSHALLING | ( | ... | ) | GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define PREPROCESSOR_OUTPUT_OPTION_WITH_MARSHALLING | ( | ... | ) | PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
#define SIMPLE_ENUM_VALUE_TABLE |
Definition at line 168 of file CompilerInvocation.cpp.
#define TARGET_OPTION_WITH_MARSHALLING | ( | ... | ) | GENERATE_OPTION_WITH_MARSHALLING(Args, SA, __VA_ARGS__) |
#define TARGET_OPTION_WITH_MARSHALLING | ( | ... | ) | PARSE_OPTION_WITH_MARSHALLING(Args, Diags, __VA_ARGS__) |
using GenerateFn = llvm::function_ref<void( CompilerInvocation &, SmallVectorImpl<const char *> &, CompilerInvocation::StringAllocator)> |
Definition at line 643 of file CompilerInvocation.cpp.
using ParseFn = llvm::function_ref<bool(CompilerInvocation &, ArrayRef<const char *>, DiagnosticsEngine &, const char *)> |
Definition at line 638 of file CompilerInvocation.cpp.
|
static |
Definition at line 816 of file CompilerInvocation.cpp.
|
static |
Definition at line 2204 of file CompilerInvocation.cpp.
References clang::C, clang::isAlphanumeric(), clang::isLetter(), and clang::DiagnosticsEngine::Report().
|
static |
Definition at line 328 of file CompilerInvocation.cpp.
References denormalizeSimpleEnumImpl().
|
static |
Definition at line 311 of file CompilerInvocation.cpp.
References denormalizeString(), and findValueTableByValue().
Referenced by denormalizeSimpleEnum().
|
static |
The tblgen-erated code passes in a fifth parameter of an arbitrary type, but denormalizeSimpleFlags never looks at it.
Avoid bloating compile-time with unnecessary template instantiations and just ignore it with a variadic argument.
Definition at line 194 of file CompilerInvocation.cpp.
Referenced by GenerateArg().
|
static |
Definition at line 267 of file CompilerInvocation.cpp.
References denormalizeStringImpl().
Referenced by denormalizeSimpleEnumImpl(), denormalizeStringVector(), GenerateArg(), and GenerateFrontendArgs().
|
static |
Definition at line 243 of file CompilerInvocation.cpp.
Referenced by denormalizeString().
|
static |
Definition at line 369 of file CompilerInvocation.cpp.
References denormalizeString().
|
static |
Definition at line 420 of file CompilerInvocation.cpp.
Definition at line 425 of file CompilerInvocation.cpp.
|
static |
Definition at line 274 of file CompilerInvocation.cpp.
Referenced by normalizeSimpleEnum().
|
static |
Definition at line 283 of file CompilerInvocation.cpp.
Referenced by denormalizeSimpleEnumImpl().
|
static |
Definition at line 464 of file CompilerInvocation.cpp.
References clang::CodeGenOptions::CodeModel, clang::TargetOptions::CodeModel, clang::LangOptions::CurrentModule, clang::LangOptions::DCC_FastCall, clang::LangOptions::DCC_RegCall, clang::LangOptions::DCC_StdCall, clang::LangOptions::DCC_VectorCall, clang::FrontendOptions::DisableFree, clang::FrontendOptions::GenerateGlobalModuleIndex, clang::CompilerInvocationValueBase::getCodeGenOpts(), clang::CompilerInvocationValueBase::getFrontendOpts(), GetInputKindName(), clang::CompilerInvocationRefBase::getLangOpts(), clang::DiagnosticsEngine::getNumErrors(), clang::LangOptions::getOpenCLCompatibleVersion(), clang::LangOptions::getOpenCLVersionString(), clang::CompilerInvocationRefBase::getTargetOpts(), clang::CodeGenOptions::hasSanitizeCoverage(), clang::LangOptions::ModuleName, clang::LangOptions::None, clang::DiagnosticsEngine::Report(), clang::LangOptions::SanitizeCoverage, clang::FrontendOptions::ShowStats, clang::TargetOptions::Triple, and clang::FrontendOptions::UseGlobalModuleIndex.
|
static |
Definition at line 849 of file CompilerInvocation.cpp.
References clang::AnalyzerOptions::AnalysisConstraintsOpt, clang::AnalyzerOptions::AnalysisDiagOpt, clang::AnalyzerOptions::AnalysisPurgeOpt, clang::C, clang::AnalyzerOptions::CheckersAndPackages, clang::AnalyzerOptions::Config, GenerateArg(), clang::AnalyzerOptions::InliningMode, and parseAnalyzerConfigs().
Referenced by clang::CompilerInvocation::generateCC1CommandLine().
|
static |
Definition at line 620 of file CompilerInvocation.cpp.
References denormalizeSimpleFlag(), and clang::driver::getDriverOptTable().
Referenced by GenerateAnalyzerArgs(), GenerateDependencyOutputArgs(), GenerateFrontendArgs(), GenerateHeaderSearchArgs(), GenerateOptimizationRemark(), GeneratePreprocessorArgs(), GeneratePreprocessorOutputArgs(), and GenerateTargetArgs().
|
static |
Definition at line 628 of file CompilerInvocation.cpp.
References denormalizeString(), and clang::driver::getDriverOptTable().
|
static |
Definition at line 2071 of file CompilerInvocation.cpp.
References clang::EDK_DepFileEntry, clang::EDK_ModuleFile, clang::EDK_ProfileList, clang::EDK_SanitizeIgnorelist, clang::DependencyOutputOptions::ExtraDeps, GenerateArg(), clang::None, and clang::DependencyOutputOptions::ShowIncludesDest.
Referenced by clang::CompilerInvocation::generateCC1CommandLine().
|
static |
Definition at line 2222 of file CompilerInvocation.cpp.
Referenced by clang::CompilerInvocation::generateCC1CommandLine().
|
static |
Definition at line 2502 of file CompilerInvocation.cpp.
References clang::FrontendOptions::ActionName, clang::ADOF_Default, clang::ADOF_JSON, clang::Asm, clang::frontend::ASTDump, clang::FrontendOptions::ASTDumpAll, clang::FrontendOptions::ASTDumpDecls, clang::FrontendOptions::ASTDumpFormat, clang::FrontendOptions::AuxTargetCPU, clang::FrontendOptions::AuxTargetFeatures, clang::C, clang::FrontendOptions::CodeCompletionAt, clang::CUDA, clang::CXX, clang::FrontendOptions::DashX, denormalizeString(), clang::ParsedSourceLocation::FileName, clang::frontend::FixIt, clang::FrontendOptions::FixItSuffix, GenerateArg(), clang::driver::getDriverOptTable(), clang::InputKind::getFormat(), clang::InputKind::getHeaderUnitKind(), clang::InputKind::getLanguage(), getProgramActionOpt(), clang::InputKind::HeaderUnit_Abs, clang::InputKind::HeaderUnit_None, clang::InputKind::HeaderUnit_System, clang::InputKind::HeaderUnit_User, clang::HIP, clang::HLSL, clang::FrontendOptions::Inputs, clang::InputKind::isPreprocessed(), clang::LLVM_IR, clang::FrontendOptions::ModuleFileExtensions, clang::FrontendOptions::ModuleFiles, clang::InputKind::ModuleMap, clang::ObjC, clang::ObjCXX, clang::OpenCL, clang::OpenCLCXX, clang::frontend::PluginAction, clang::FrontendOptions::PluginArgs, clang::FrontendOptions::Plugins, clang::InputKind::Precompiled, clang::FrontendOptions::ProgramAction, clang::RenderScript, clang::ParsedSourceLocation::ToString(), and clang::Unknown.
Referenced by clang::CompilerInvocation::generateCC1CommandLine().
|
static |
Definition at line 2926 of file CompilerInvocation.cpp.
References clang::frontend::After, clang::frontend::Angled, clang::frontend::CSystem, clang::frontend::CXXSystem, clang::frontend::ExternCSystem, clang::File, GenerateArg(), clang::HeaderSearchOptions::Entry::Group, clang::HeaderSearchOptions::Entry::IgnoreSysRoot, clang::frontend::IndexHeaderMap, clang::HeaderSearchOptions::Entry::IsFramework, clang::HeaderSearchOptions::ModuleCachePath, clang::HeaderSearchOptions::ModulesIgnoreMacros, clang::frontend::ObjCSystem, clang::frontend::ObjCXXSystem, P, clang::HeaderSearchOptions::PrebuiltModuleFiles, clang::HeaderSearchOptions::PrebuiltModulePaths, clang::frontend::Quoted, clang::frontend::System, clang::HeaderSearchOptions::SystemHeaderPrefixes, clang::HeaderSearchOptions::UseLibcxx, clang::HeaderSearchOptions::UserEntries, and clang::HeaderSearchOptions::VFSOverlayFiles.
Referenced by clang::CompilerInvocation::generateCC1CommandLine().
|
static |
Definition at line 2247 of file CompilerInvocation.cpp.
Referenced by clang::CompilerInvocation::generateCC1CommandLine().
|
static |
Generate a remark argument. This is an inverse of ParseOptimizationRemark
.
Definition at line 1204 of file CompilerInvocation.cpp.
References GenerateArg(), clang::Remark, clang::CodeGenOptions::RK_Disabled, and clang::CodeGenOptions::RK_Enabled.
|
static |
Definition at line 4112 of file CompilerInvocation.cpp.
References clang::PreprocessorOptions::ChainedIncludes, clang::PreprocessorOptions::DeserializedPCHDeclsToErrorOn, GenerateArg(), clang::PreprocessorOptions::Includes, clang::PreprocessorOptions::Macros, clang::PreprocessorOptions::PCHWithHdrStop, clang::PreprocessorOptions::PCHWithHdrStopCreate, clang::PreprocessorOptions::PrecompiledPreambleBytes, clang::PreprocessorOptions::RemappedFiles, and clang::PreprocessorOptions::SourceDateEpoch.
Referenced by clang::CompilerInvocation::generateCC1CommandLine().
|
static |
Definition at line 4278 of file CompilerInvocation.cpp.
References clang::PreprocessorOutputOptions::DirectivesOnly, GenerateArg(), isStrictlyPreprocessorAction(), clang::PreprocessorOutputOptions::ShowCPP, and clang::PreprocessorOutputOptions::ShowMacros.
Referenced by clang::CompilerInvocation::generateCC1CommandLine().
|
static |
Definition at line 4316 of file CompilerInvocation.cpp.
References clang::TargetOptions::DarwinTargetVariantSDKVersion, GenerateArg(), and clang::TargetOptions::SDKVersion.
Referenced by clang::CompilerInvocation::generateCC1CommandLine().
|
static |
Definition at line 842 of file CompilerInvocation.cpp.
References clang::Builtin::Context::isBuiltinFunc().
|
static |
Maps command line option to frontend action.
Definition at line 2484 of file CompilerInvocation.cpp.
References getFrontendActionTable().
Referenced by ParseFrontendArgs().
|
static |
Return a table that associates command line option specifiers with the frontend action.
Note: The pair {frontend::PluginAction, OPT_plugin} is intentionally missing, as this case is handled separately from other frontend options.
Definition at line 2429 of file CompilerInvocation.cpp.
References clang::frontend::ASTDeclList, clang::frontend::ASTDump, clang::frontend::ASTPrint, clang::frontend::ASTView, clang::frontend::DumpCompilerOptions, clang::frontend::DumpRawTokens, clang::frontend::DumpTokens, clang::frontend::EmitAssembly, clang::frontend::EmitBC, clang::frontend::EmitCodeGenOnly, clang::frontend::EmitHTML, clang::frontend::EmitLLVM, clang::frontend::EmitLLVMOnly, clang::frontend::EmitObj, clang::frontend::ExtractAPI, clang::frontend::FixIt, clang::frontend::GenerateHeaderUnit, clang::frontend::GenerateInterfaceStubs, clang::frontend::GenerateModule, clang::frontend::GenerateModuleInterface, clang::frontend::GeneratePCH, clang::frontend::InitOnly, clang::frontend::MigrateSource, clang::frontend::ModuleFileInfo, clang::frontend::ParseSyntaxOnly, clang::frontend::PrintDependencyDirectivesSourceMinimizerOutput, clang::frontend::PrintPreamble, clang::frontend::PrintPreprocessedInput, clang::frontend::RewriteMacros, clang::frontend::RewriteObjC, clang::frontend::RewriteTest, clang::frontend::RunAnalysis, clang::frontend::RunPreprocessorOnly, clang::frontend::TemplightDump, and clang::frontend::VerifyPCH.
Referenced by getFrontendAction(), and getProgramActionOpt().
|
static |
Get language name for given input kind.
Definition at line 3222 of file CompilerInvocation.cpp.
References clang::Asm, clang::C, clang::CUDA, clang::CXX, clang::InputKind::getLanguage(), clang::HIP, clang::HLSL, clang::LLVM_IR, clang::ObjC, clang::ObjCXX, clang::OpenCL, clang::OpenCLCXX, clang::RenderScript, and clang::Unknown.
Referenced by FixupInvocation().
|
static |
Definition at line 574 of file CompilerInvocation.cpp.
References clang::InputKind::getLanguage(), clang::getLastArgIntValue(), clang::OpenCL, and clang::OpenCLCXX.
|
static |
Definition at line 604 of file CompilerInvocation.cpp.
|
static |
Maps frontend action to command line option.
Definition at line 2494 of file CompilerInvocation.cpp.
References getFrontendActionTable().
Referenced by GenerateFrontendArgs().
|
static |
Definition at line 1087 of file CompilerInvocation.cpp.
Referenced by initOption().
|
static |
Definition at line 1102 of file CompilerInvocation.cpp.
References getStringOption(), and clang::DiagnosticsEngine::Report().
|
static |
Definition at line 1092 of file CompilerInvocation.cpp.
References getStringOption().
|
static |
Definition at line 1122 of file CompilerInvocation.cpp.
References getStringOption(), and clang::DiagnosticsEngine::Report().
|
staticconstexpr |
Definition at line 201 of file CompilerInvocation.cpp.
|
static |
Check if input file kind and language standard are compatible.
Definition at line 3177 of file CompilerInvocation.cpp.
References clang::Asm, clang::C, clang::CUDA, clang::CXX, clang::InputKind::getLanguage(), clang::HIP, clang::HLSL, clang::LLVM_IR, clang::ObjC, clang::ObjCXX, clang::OpenCL, clang::OpenCLCXX, clang::RenderScript, and clang::Unknown.
|
static |
Definition at line 4067 of file CompilerInvocation.cpp.
References clang::frontend::ASTDeclList, clang::frontend::ASTDump, clang::frontend::ASTPrint, clang::frontend::ASTView, clang::frontend::DumpCompilerOptions, clang::frontend::DumpRawTokens, clang::frontend::DumpTokens, clang::frontend::EmitAssembly, clang::frontend::EmitBC, clang::frontend::EmitCodeGenOnly, clang::frontend::EmitHTML, clang::frontend::EmitLLVM, clang::frontend::EmitLLVMOnly, clang::frontend::EmitObj, clang::frontend::ExtractAPI, clang::frontend::FixIt, clang::frontend::GenerateHeaderUnit, clang::frontend::GenerateInterfaceStubs, clang::frontend::GenerateModule, clang::frontend::GenerateModuleInterface, clang::frontend::GeneratePCH, clang::frontend::InitOnly, clang::frontend::MigrateSource, clang::frontend::ModuleFileInfo, clang::frontend::ParseSyntaxOnly, clang::frontend::PluginAction, clang::frontend::PrintDependencyDirectivesSourceMinimizerOutput, clang::frontend::PrintPreamble, clang::frontend::PrintPreprocessedInput, clang::frontend::RewriteMacros, clang::frontend::RewriteObjC, clang::frontend::RewriteTest, clang::frontend::RunAnalysis, clang::frontend::RunPreprocessorOnly, clang::frontend::TemplightDump, and clang::frontend::VerifyPCH.
Referenced by GeneratePreprocessorOutputArgs(), ParsePreprocessorArgs(), and ParsePreprocessorOutputArgs().
|
static |
Definition at line 234 of file CompilerInvocation.cpp.
|
static |
Definition at line 222 of file CompilerInvocation.cpp.
|
static |
Definition at line 207 of file CompilerInvocation.cpp.
Definition at line 412 of file CompilerInvocation.cpp.
Definition at line 416 of file CompilerInvocation.cpp.
|
static |
Definition at line 291 of file CompilerInvocation.cpp.
References findValueTableByName(), and clang::DiagnosticsEngine::Report().
|
static |
Definition at line 172 of file CompilerInvocation.cpp.
|
static |
Definition at line 181 of file CompilerInvocation.cpp.
|
static |
Definition at line 337 of file CompilerInvocation.cpp.
|
static |
Definition at line 348 of file CompilerInvocation.cpp.
References clang::DiagnosticsEngine::Report().
|
static |
Definition at line 364 of file CompilerInvocation.cpp.
|
static |
Definition at line 401 of file CompilerInvocation.cpp.
|
static |
Definition at line 935 of file CompilerInvocation.cpp.
References clang::AnalyzerOptions::AnalysisConstraintsOpt, clang::AnalyzerOptions::AnalysisDiagOpt, clang::AnalyzerOptions::AnalysisPurgeOpt, clang::AnalyzerOptions::CheckersAndPackages, clang::AnalyzerOptions::Config, clang::AnalyzerOptions::FullCompilerInvocation, clang::DiagnosticsEngine::getNumErrors(), clang::AnalyzerOptions::InliningMode, clang::AnalyzerOptions::isUnknownAnalyzerConfig(), clang::NUM_ANALYSIS_DIAG_CLIENTS, clang::NumConstraints, clang::NumInliningModes, clang::NumPurgeModes, parseAnalyzerConfigs(), clang::DiagnosticsEngine::Report(), and clang::AnalyzerOptions::ShouldEmitErrorsOnInvalidConfigValue.
|
static |
Definition at line 1135 of file CompilerInvocation.cpp.
References clang::AnalyzerOptions::getRegisteredCheckers(), clang::AnalyzerOptions::getRegisteredPackages(), clang::DiagnosticsEngine::Report(), and clang::AnalyzerOptions::SilencedCheckersAndPackages.
Referenced by GenerateAnalyzerArgs(), and ParseAnalyzerArgs().
|
static |
Definition at line 2103 of file CompilerInvocation.cpp.
References clang::EDK_DepFileEntry, clang::EDK_ModuleFile, clang::EDK_ProfileList, clang::EDK_SanitizeIgnorelist, clang::DependencyOutputOptions::ExtraDeps, Filename, clang::DiagnosticsEngine::getNumErrors(), clang::DependencyOutputOptions::HeaderIncludeFiltering, clang::DependencyOutputOptions::HeaderIncludeFormat, clang::HIFIL_None, clang::HIFIL_Only_Direct_System, clang::HIFMT_JSON, clang::HIFMT_Textual, clang::DependencyOutputOptions::IncludeSystemHeaders, clang::None, clang::frontend::PrintPreprocessedInput, clang::DiagnosticsEngine::Report(), clang::DependencyOutputOptions::ShowIncludesDest, clang::Stderr, and clang::Stdout.
|
static |
Definition at line 1272 of file CompilerInvocation.cpp.
References clang::Error, clang::None, clang::Note, clang::Remark, clang::DiagnosticsEngine::Report(), and clang::Warning.
|
static |
Definition at line 2233 of file CompilerInvocation.cpp.
References clang::DiagnosticsEngine::getNumErrors().
|
static |
Definition at line 2671 of file CompilerInvocation.cpp.
References clang::FrontendOptions::ActionName, clang::ADOF_Default, clang::ADOF_JSON, clang::FrontendOptions::ARCMT_None, clang::FrontendOptions::ARCMTAction, clang::Asm, clang::frontend::ASTDump, clang::FrontendOptions::ASTDumpAll, clang::FrontendOptions::ASTDumpDecls, clang::FrontendOptions::ASTDumpFormat, clang::FrontendOptions::AuxTargetCPU, clang::FrontendOptions::AuxTargetFeatures, clang::C, clang::FrontendOptions::CodeCompletionAt, clang::CUDA, clang::CXX, clang::FrontendOptions::DashX, clang::ParsedSourceLocation::FileName, clang::frontend::FixIt, clang::FrontendOptions::FixItSuffix, clang::ParsedSourceLocation::FromString(), clang::frontend::GenerateInterfaceStubs, clang::frontend::GenerateModule, clang::InputKind::getFormat(), getFrontendAction(), clang::InputKind::getHeader(), clang::InputKind::getHeaderUnitKind(), clang::FrontendOptions::getInputKindForExtension(), clang::DiagnosticsEngine::getNumErrors(), clang::InputKind::getPreprocessed(), clang::InputKind::HeaderUnit_Abs, clang::InputKind::HeaderUnit_None, clang::InputKind::HeaderUnit_System, clang::InputKind::HeaderUnit_User, clang::HIP, clang::HLSL, clang::FrontendOptions::Inputs, clang::FrontendOptions::IsSystemModule, clang::InputKind::isUnknown(), clang::LLVM_IR, clang::FrontendOptions::ModuleFileExtensions, clang::FrontendOptions::ModuleFiles, clang::InputKind::ModuleMap, clang::ObjC, clang::FrontendOptions::ObjCMT_None, clang::FrontendOptions::ObjCMTAction, clang::ObjCXX, clang::OpenCL, clang::OpenCLCXX, clang::frontend::ParseSyntaxOnly, parseTestModuleFileExtensionArg(), clang::frontend::PluginAction, clang::FrontendOptions::PluginArgs, clang::FrontendOptions::Plugins, clang::InputKind::Precompiled, clang::FrontendOptions::ProgramAction, clang::RenderScript, clang::DiagnosticsEngine::Report(), clang::InputKind::Source, clang::Unknown, clang::InputKind::withFormat(), and clang::InputKind::withHeaderUnit().
|
static |
Definition at line 3047 of file CompilerInvocation.cpp.
References clang::HeaderSearchOptions::AddPath(), clang::HeaderSearchOptions::AddPrebuiltModulePath(), clang::HeaderSearchOptions::AddSystemHeaderPrefix(), clang::HeaderSearchOptions::AddVFSOverlayFile(), clang::frontend::After, clang::frontend::Angled, clang::frontend::CSystem, clang::frontend::CXXSystem, clang::frontend::ExternCSystem, clang::DiagnosticsEngine::getNumErrors(), clang::frontend::IndexHeaderMap, clang::HeaderSearchOptions::ModuleCachePath, clang::HeaderSearchOptions::ModulesIgnoreMacros, clang::frontend::ObjCSystem, clang::frontend::ObjCXXSystem, P, clang::HeaderSearchOptions::PrebuiltModuleFiles, clang::frontend::Quoted, clang::HeaderSearchOptions::Sysroot, clang::frontend::System, and clang::HeaderSearchOptions::UseLibcxx.
|
static |
Definition at line 2257 of file CompilerInvocation.cpp.
References clang::DiagnosticsEngine::getNumErrors().
|
static |
Parse a remark command line argument.
It may be missing, disabled/enabled by '-R[no-]group' or specified with a regular expression by '-Rgroup=regexp'. On top of that, it can be disabled/enabled globally by '-R[no-]everything'.
Definition at line 1221 of file CompilerInvocation.cpp.
References clang::DiagnosticsEngine::Report(), clang::Result, clang::CodeGenOptions::RK_Disabled, clang::CodeGenOptions::RK_DisabledEverything, clang::CodeGenOptions::RK_Enabled, clang::CodeGenOptions::RK_EnabledEverything, and clang::CodeGenOptions::RK_WithPattern.
|
static |
Definition at line 4181 of file CompilerInvocation.cpp.
References clang::PreprocessorOptions::addMacroDef(), clang::PreprocessorOptions::addMacroUndef(), clang::PreprocessorOptions::addRemappedFile(), clang::PreprocessorOptions::ChainedIncludes, clang::PreprocessorOptions::DeserializedPCHDeclsToErrorOn, clang::DiagnosticsEngine::getNumErrors(), clang::PreprocessorOptions::Includes, isStrictlyPreprocessorAction(), clang::PreprocessorOptions::LexEditorPlaceholders, clang::PreprocessorOptions::PCHWithHdrStop, clang::PreprocessorOptions::PrecompiledPreambleBytes, clang::DiagnosticsEngine::Report(), clang::PreprocessorOptions::SourceDateEpoch, and V.
|
static |
|
static |
Definition at line 1294 of file CompilerInvocation.cpp.
References clang::parseSanitizerValue(), and clang::DiagnosticsEngine::Report().
Definition at line 2173 of file CompilerInvocation.cpp.
References ShowColors.
|
static |
Definition at line 4333 of file CompilerInvocation.cpp.
References clang::TargetOptions::DarwinTargetVariantSDKVersion, clang::DiagnosticsEngine::getNumErrors(), clang::DiagnosticsEngine::Report(), and clang::TargetOptions::SDKVersion.
|
static |
Parse the argument to the -ftest-module-file-extension command-line argument.
Definition at line 2405 of file CompilerInvocation.cpp.
Referenced by ParseFrontendArgs().
|
static |
Definition at line 117 of file CompilerInvocation.cpp.
|
static |
Definition at line 1312 of file CompilerInvocation.cpp.
References clang::XRayInstrKind::All, clang::XRayInstrKind::None, clang::parseXRayInstrValue(), and clang::DiagnosticsEngine::Report().
|
static |
May perform round-trip of command line arguments.
By default, the round-trip is enabled in assert builds. This can be overwritten at run-time via the "-round-trip-args" and "-no-round-trip-args" command line flags, or via the ForceRoundTrip parameter.
During round-trip, the command line arguments are parsed into a dummy CompilerInvocation, which is used to generate the command line arguments again. The real CompilerInvocation is then created by parsing the generated arguments, not the original ones. This (in combination with tests covering argument behavior) ensures the generated command line is complete (doesn't drop/mangle any arguments).
Finally, we check the command line that was used to create the real CompilerInvocation instance. By default, we compare it to the command line the real CompilerInvocation generates. This checks whether the generator is deterministic. If CheckAgainstOriginalInvocation
is enabled, we instead compare it to the original command line to verify the original command-line was canonical and can round-trip exactly.
Definition at line 665 of file CompilerInvocation.cpp.
References clang::Equal, clang::DiagnosticsEngine::getNumWarnings(), OS, clang::DiagnosticsEngine::Report(), and clang::DiagnosticsEngine::setClient().
Referenced by clang::CompilerInvocation::checkCC1RoundTrip(), and clang::CompilerInvocation::CreateFromArgs().
|
static |
Definition at line 1306 of file CompilerInvocation.cpp.
References clang::serializeSanitizerSet().
|
static |
Definition at line 1331 of file CompilerInvocation.cpp.
References OS, and clang::serializeXRayInstrValue().
|
static |
Definition at line 1341 of file CompilerInvocation.cpp.
References clang::DiagnosticsEngine::Error, clang::DiagnosticsEngine::getCustomDiagID(), clang::CodeGenOptions::ProfileClangInstr, clang::CodeGenOptions::ProfileCSIRInstr, clang::CodeGenOptions::ProfileIRInstr, and clang::DiagnosticsEngine::Report().