Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/clang/StaticAnalyzer/Core/AnalyzerOptions.def is written in an unsupported language. File is not indexed.

0001 //===-- AnalyzerOptions.def - Metadata about Static Analyses ----*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 //  This file defines the analyzer options avaible with -analyzer-config.
0010 //
0011 //===----------------------------------------------------------------------===//
0012 
0013 #ifndef LLVM_CLANG_STATICANALYZER_CORE_ANALYZEROPTIONS_H
0014 #error This .def file is expected to be included in translation units where \
0015 "clang/StaticAnalyzer/Core/AnalyzerOptions.h" is already included!
0016 #endif
0017 
0018 #ifdef ANALYZER_OPTION
0019 #ifndef ANALYZER_OPTION_DEPENDS_ON_USER_MODE
0020 #error If you didnt include this file with the intent of generating methods, \
0021 define both 'ANALYZER_OPTION' and 'ANALYZER_OPTION_DEPENDS_ON_USER_MODE' macros!
0022 #endif
0023 #endif
0024 
0025 #ifndef ANALYZER_OPTION_DEPENDS_ON_USER_MODE
0026 #ifdef ANALYZER_OPTION
0027 #error If you didnt include this file with the intent of generating methods, \
0028 define both 'ANALYZER_OPTION' and 'ANALYZER_OPTION_DEPENDS_ON_USER_MODE' macros!
0029 #endif
0030 #endif
0031 
0032 #ifndef ANALYZER_OPTION
0033 /// Create a new analyzer option, but dont generate a method for it in
0034 /// AnalyzerOptions.
0035 ///
0036 ///   TYPE - The type of the option object that will be stored in
0037 ///          AnalyzerOptions. This file is expected to be icluded in translation
0038 ///          units where AnalyzerOptions.h is included, so types from that
0039 ///          header should be used.
0040 ///   NAME - The name of the option object.
0041 ///   CMDFLAG - The command line flag for the option.
0042 ///             (-analyzer-config CMDFLAG=VALUE)
0043 ///   DESC - Description of the flag.
0044 ///   DEFAULT_VAL - The default value for CMDFLAG.
0045 #define ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, DEFAULT_VAL)
0046 #endif
0047 
0048 #ifndef ANALYZER_OPTION_DEPENDS_ON_USER_MODE
0049 /// Create a new analyzer option, but dont generate a method for it in
0050 /// AnalyzerOptions. It's value depends on the option "user-mode".
0051 ///
0052 ///   TYPE - The type of the option object that will be stored in
0053 ///          AnalyzerOptions. This file is expected to be icluded in translation
0054 ///          units where AnalyzerOptions.h is included, so types from that
0055 ///          header should be used.
0056 ///   NAME - The name of the option object.
0057 ///   CMDFLAG - The command line flag for the option.
0058 ///             (-analyzer-config CMDFLAG=VALUE)
0059 ///   DESC - Description of the flag.
0060 ///   SHALLOW_VAL - The default value for CMDFLAG, when "user-mode" was set to
0061 ///                 "shallow".
0062 ///   DEEP_VAL - The default value for CMDFLAG, when "user-mode" was set to
0063 ///              "deep".
0064 #define ANALYZER_OPTION_DEPENDS_ON_USER_MODE(TYPE, NAME, CMDFLAG, DESC,        \
0065                                              SHALLOW_VAL, DEEP_VAL)
0066 #endif
0067 
0068 //===----------------------------------------------------------------------===//
0069 // The "mode" option. Since some options depend on this, we list it on top of
0070 // this file in order to make sure that the generated field for it is
0071 // initialized before the rest.
0072 //===----------------------------------------------------------------------===//
0073 
0074 ANALYZER_OPTION(
0075     StringRef, UserMode, "mode",
0076     "(string) Controls the high-level analyzer mode, which influences the "
0077     "default settings for some of the lower-level config options (such as "
0078     "IPAMode). Value: \"deep\", \"shallow\".",
0079     "deep")
0080 
0081 //===----------------------------------------------------------------------===//
0082 // Boolean analyzer options.
0083 //===----------------------------------------------------------------------===//
0084 
0085 ANALYZER_OPTION(bool, ShouldIncludeImplicitDtorsInCFG, "cfg-implicit-dtors",
0086                 "Whether or not implicit destructors for C++ objects "
0087                 "should be included in the CFG.",
0088                 true)
0089 
0090 ANALYZER_OPTION(bool, ShouldIncludeTemporaryDtorsInCFG, "cfg-temporary-dtors",
0091                 "Whether or not the destructors for C++ temporary "
0092                 "objects should be included in the CFG.",
0093                 true)
0094 
0095 ANALYZER_OPTION(
0096     bool, ShouldIncludeLifetimeInCFG, "cfg-lifetime",
0097     "Whether or not end-of-lifetime information should be included in the CFG.",
0098     false)
0099 
0100 ANALYZER_OPTION(bool, ShouldIncludeLoopExitInCFG, "cfg-loopexit",
0101                 "Whether or not the end of the loop information should "
0102                 "be included in the CFG.",
0103                 false)
0104 
0105 ANALYZER_OPTION(bool, ShouldIncludeRichConstructorsInCFG,
0106                 "cfg-rich-constructors",
0107                 "Whether or not construction site information should be "
0108                 "included in the CFG C++ constructor elements.",
0109                 true)
0110 
0111 ANALYZER_OPTION(
0112     bool, ShouldIncludeScopesInCFG, "cfg-scopes",
0113     "Whether or not scope information should be included in the CFG.", false)
0114 
0115 ANALYZER_OPTION(bool, ShouldIncludeDefaultInitForAggregates,
0116                 "cfg-expand-default-aggr-inits",
0117                 "Whether or not inline CXXDefaultInitializers for aggregate "
0118                 "initialization in the CFG.",
0119                 false)
0120 
0121 ANALYZER_OPTION(
0122     bool, MayInlineTemplateFunctions, "c++-template-inlining",
0123     "Whether or not templated functions may be considered for inlining.", true)
0124 
0125 ANALYZER_OPTION(bool, MayInlineCXXStandardLibrary, "c++-stdlib-inlining",
0126                 "Whether or not C++ standard library functions may be "
0127                 "considered for inlining.",
0128                 true)
0129 
0130 ANALYZER_OPTION(bool, MayInlineCXXAllocator, "c++-allocator-inlining",
0131                 "Whether or not allocator and deallocator calls may be "
0132                 "considered for inlining.",
0133                 true)
0134 
0135 ANALYZER_OPTION(
0136     bool, MayInlineCXXSharedPtrDtor, "c++-shared_ptr-inlining",
0137     "Whether or not the destructor of C++ 'shared_ptr' may be considered for "
0138     "inlining. This covers std::shared_ptr, std::tr1::shared_ptr, and "
0139     "boost::shared_ptr, and indeed any destructor named '~shared_ptr'.",
0140     false)
0141 
0142 ANALYZER_OPTION(bool, MayInlineCXXTemporaryDtors, "c++-temp-dtor-inlining",
0143                 "Whether C++ temporary destructors should be inlined "
0144                 "during analysis. If temporary destructors are disabled "
0145                 "in the CFG via the 'cfg-temporary-dtors' option, "
0146                 "temporary destructors would not be inlined anyway.",
0147                 true)
0148 
0149 ANALYZER_OPTION(
0150     bool, ShouldSuppressNullReturnPaths, "suppress-null-return-paths",
0151     "Whether or not paths that go through null returns should be suppressed. "
0152     "This is a heuristic for avoiding bug reports with paths that go through "
0153     "inlined functions that are more defensive than their callers.",
0154     true)
0155 
0156 ANALYZER_OPTION(
0157     bool, ShouldAvoidSuppressingNullArgumentPaths,
0158     "avoid-suppressing-null-argument-paths",
0159     "Whether a bug report should not be suppressed if its path includes a call "
0160     "with a null argument, even if that call has a null return. This option "
0161     "has no effect when ShouldSuppressNullReturnPaths is false. This is a "
0162     "counter-heuristic to avoid false negatives.",
0163     false)
0164 
0165 ANALYZER_OPTION(bool, ShouldSuppressInlinedDefensiveChecks,
0166                 "suppress-inlined-defensive-checks",
0167                 "Whether or not diagnostics containing inlined "
0168                 "defensive NULL checks should be suppressed.",
0169                 true)
0170 
0171 ANALYZER_OPTION(bool, MayInlineCXXContainerMethods, "c++-container-inlining",
0172                 "Whether or not methods of C++ container objects may be "
0173                 "considered for inlining.",
0174                 false)
0175 
0176 ANALYZER_OPTION(bool, ShouldSuppressFromCXXStandardLibrary,
0177                 "suppress-c++-stdlib",
0178                 "Whether or not diagnostics reported within the C++ "
0179                 "standard library should be suppressed.",
0180                 true)
0181 
0182 ANALYZER_OPTION(bool, ShouldCrosscheckWithZ3, "crosscheck-with-z3",
0183                 "Whether bug reports should be crosschecked with the Z3 "
0184                 "constraint manager backend.",
0185                 false)
0186 
0187 ANALYZER_OPTION(
0188     unsigned, Z3CrosscheckEQClassTimeoutThreshold,
0189     "crosscheck-with-z3-eqclass-timeout-threshold",
0190     "Set a timeout for bug report equivalence classes in milliseconds. "
0191     "If we exhaust this threshold, we will drop the bug report eqclass "
0192     "instead of doing more Z3 queries. Setting this to 700 ms in conjunction "
0193     "with \"crosscheck-with-z3-timeout-threshold\" of 300 ms, would nicely "
0194     "guarantee that no bug report equivalence class can take longer than "
0195     "1 second, effectively mitigating Z3 hangs during refutation. "
0196     "If there were Z3 retries, only the minimum query time is considered "
0197     "when accumulating query times within a report equivalence class. "
0198     "Set 0 for no timeout.", 0)
0199 
0200 ANALYZER_OPTION(
0201     unsigned, Z3CrosscheckTimeoutThreshold,
0202     "crosscheck-with-z3-timeout-threshold",
0203     "Set a timeout for individual Z3 queries in milliseconds. "
0204     "On fast machines, 300 worked well in some cases. "
0205     "The lower it is, the higher the chances of having flaky issues. "
0206     "Having no timeout may hang the analyzer indefinitely. "
0207     "Set 0 for no timeout.", 15'000)
0208 
0209 ANALYZER_OPTION(
0210     unsigned, Z3CrosscheckRLimitThreshold,
0211     "crosscheck-with-z3-rlimit-threshold",
0212     "Set the Z3 resource limit threshold. This sets a supposedly deterministic "
0213     "cutoff point for Z3 queries, as longer queries usually consume more "
0214     "resources. "
0215     "400'000 should on average make Z3 queries run for up to 100ms on modern "
0216     "hardware. Set 0 for unlimited.", 0)
0217 
0218 ANALYZER_OPTION(
0219     PositiveAnalyzerOption, Z3CrosscheckMaxAttemptsPerQuery,
0220     "crosscheck-with-z3-max-attempts-per-query",
0221     "Set how many times the oracle is allowed to run a Z3 query. "
0222     "This must be a positive value. Set 1 to not allow any retry attempts. "
0223     "Increasing the number of attempts is often more effective at reducing "
0224     "the number of nondeterministic diagnostics than "
0225     "\"crosscheck-with-z3-timeout-threshold\" in practice.", 3)
0226 
0227 ANALYZER_OPTION(bool, ShouldReportIssuesInMainSourceFile,
0228                 "report-in-main-source-file",
0229                 "Whether or not the diagnostic report should be always "
0230                 "reported in the main source file and not the headers.",
0231                 false)
0232 
0233 ANALYZER_OPTION(bool, ShouldWriteStableReportFilename, "stable-report-filename",
0234                 "Deprecated: report filenames are now always stable. "
0235                 "See also 'verbose-report-filename'.",
0236                 false)
0237 
0238 ANALYZER_OPTION(bool, ShouldWriteVerboseReportFilename, "verbose-report-filename",
0239                 "Whether or not the report filename should contain extra "
0240                 "information about the issue.",
0241                 false)
0242 
0243 ANALYZER_OPTION(
0244     bool, ShouldSerializeStats, "serialize-stats",
0245     "Whether the analyzer should serialize statistics to plist output. "
0246     "Statistics would be serialized in JSON format inside the main dictionary "
0247     "under the statistics key. Available only if compiled in assert mode or "
0248     "with LLVM statistics explicitly enabled.",
0249     false)
0250 
0251 ANALYZER_OPTION(bool, MayInlineObjCMethod, "objc-inlining",
0252                 "Whether ObjectiveC inlining is enabled, false otherwise.",
0253                 true)
0254 
0255 ANALYZER_OPTION(bool, ShouldPrunePaths, "prune-paths",
0256                 "Whether irrelevant parts of a bug report path should "
0257                 "be pruned out of the final output.",
0258                 true)
0259 
0260 ANALYZER_OPTION(bool, ShouldAddPopUpNotes, "add-pop-up-notes",
0261                 "Whether pop-up notes should be added to the final output.",
0262                 true)
0263 
0264 ANALYZER_OPTION(
0265     bool, ShouldConditionalizeStaticInitializers,
0266     "cfg-conditional-static-initializers",
0267     "Whether 'static' initializers should be in conditional logic in the CFG.",
0268     true)
0269 
0270 ANALYZER_OPTION(bool, ShouldSynthesizeBodies, "faux-bodies",
0271                 "Whether the analyzer engine should synthesize fake "
0272                 "bodies for well-known functions.",
0273                 true)
0274 
0275 ANALYZER_OPTION(
0276     bool, ShouldElideConstructors, "elide-constructors",
0277     "Whether elidable C++ copy-constructors and move-constructors should be "
0278     "actually elided during analysis. Both behaviors are allowed by the C++ "
0279     "standard, and the analyzer, like CodeGen, defaults to eliding. Starting "
0280     "with C++17 some elisions become mandatory, and in these cases the option "
0281     "will be ignored.",
0282     true)
0283 
0284 ANALYZER_OPTION(
0285     bool, ShouldInlineLambdas, "inline-lambdas",
0286     "Whether lambdas should be inlined. Otherwise a sink node will be "
0287     "generated each time a LambdaExpr is visited.",
0288     true)
0289 
0290 ANALYZER_OPTION(bool, ShouldWidenLoops, "widen-loops",
0291                 "Whether the analysis should try to widen loops.", false)
0292 
0293 ANALYZER_OPTION(
0294     bool, ShouldUnrollLoops, "unroll-loops",
0295     "Whether the analysis should try to unroll loops with known bounds.", false)
0296 
0297 ANALYZER_OPTION(
0298     bool, ShouldDisplayNotesAsEvents, "notes-as-events",
0299     "Whether the bug reporter should transparently treat extra note diagnostic "
0300     "pieces as event diagnostic pieces. Useful when the diagnostic consumer "
0301     "doesn't support the extra note pieces.",
0302     false)
0303 
0304 ANALYZER_OPTION(
0305     bool, ShouldAggressivelySimplifyBinaryOperation,
0306     "aggressive-binary-operation-simplification",
0307     "Whether SValBuilder should rearrange comparisons and additive operations "
0308     "of symbolic expressions which consist of a sum of a symbol and a concrete "
0309     "integer into the format where symbols are on the left-hand side and the "
0310     "integer is on the right. This is only done if both symbols and both "
0311     "concrete integers are signed, greater than or equal to the quarter of the "
0312     "minimum value of the type and less than or equal to the quarter of the "
0313     "maximum value of that type. A + n <OP> B + m becomes A - B <OP> m - n, "
0314     "where A and B symbolic, n and m are integers. <OP> is any of '==', '!=', "
0315     "'<', '<=', '>', '>=', '+' or '-'. The rearrangement also happens with '-' "
0316     "instead of '+' on either or both side and also if any or both integers "
0317     "are missing.",
0318     false)
0319 
0320 ANALYZER_OPTION(
0321     bool, ShouldEagerlyAssume, "eagerly-assume",
0322     "If this is enabled (the default behavior), when the analyzer encounters "
0323     "a comparison operator or logical negation, it immediately splits the "
0324     "state to separate the case when the expression is true and the case when "
0325     "it's false. The upside is that this can increase analysis precision until "
0326     "we have a better way to lazily evaluate such logic; the downside is that "
0327     "it eagerly bifurcates paths.",
0328     true)
0329 
0330 ANALYZER_OPTION(
0331     bool, IsNaiveCTUEnabled, "experimental-enable-naive-ctu-analysis",
0332     "Whether naive cross translation unit analysis is enabled. This is an "
0333     "experimental feature to inline functions from other translation units.",
0334     false)
0335 
0336 ANALYZER_OPTION(bool, ShouldDisplayMacroExpansions, "expand-macros",
0337                 "Whether macros related to the bugpath should be "
0338                 "expanded and included in the plist output.",
0339                 false)
0340 
0341 ANALYZER_OPTION(bool, DisplayCTUProgress, "display-ctu-progress",
0342                 "Whether to emit verbose output about "
0343                 "the analyzer's progress related to ctu.",
0344                 false)
0345 
0346 ANALYZER_OPTION(bool, ShouldTrackConditions, "track-conditions",
0347                 "Whether to track conditions that are a control dependency of "
0348                 "an already tracked variable.",
0349                 true)
0350 
0351 ANALYZER_OPTION(bool, ShouldTrackConditionsDebug, "track-conditions-debug",
0352                 "Whether to place an event at each tracked condition.",
0353                 false)
0354 
0355 ANALYZER_OPTION(bool, ShouldApplyFixIts, "apply-fixits",
0356                 "Apply the fix-it hints to the files",
0357                 false)
0358 
0359 ANALYZER_OPTION(bool, ShouldDisplayCheckerNameForText, "display-checker-name",
0360                 "Display the checker name for textual outputs",
0361                 true)
0362 
0363 ANALYZER_OPTION(bool, ShouldSupportSymbolicIntegerCasts,
0364                 "support-symbolic-integer-casts",
0365                 "Produce cast symbols for integral types.",
0366                 false)
0367 
0368 ANALYZER_OPTION(
0369     bool, ShouldAssumeControlledEnvironment, "assume-controlled-environment",
0370     "Whether the analyzed application runs in a controlled environment. "
0371     "We will assume that environment variables exist in queries and they hold "
0372     "no malicious data. For instance, if this option is enabled, 'getenv()' "
0373     "might be modeled by the analyzer to never return NULL.",
0374     false)
0375 
0376 ANALYZER_OPTION(
0377     bool, ShouldIgnoreBisonGeneratedFiles, "ignore-bison-generated-files",
0378     "If enabled, any files containing the \"/* A Bison parser, made by\" "
0379     "won't be analyzed.",
0380     true)
0381 
0382 ANALYZER_OPTION(
0383     bool, ShouldIgnoreFlexGeneratedFiles, "ignore-flex-generated-files",
0384     "If enabled, any files containing the \"/* A lexical scanner generated by "
0385     "flex\" won't be analyzed.",
0386     true)
0387 
0388 ANALYZER_OPTION(
0389     bool, InlineFunctionsWithAmbiguousLoops, "inline-functions-with-ambiguous-loops",
0390     "If disabled (the default), the analyzer puts functions on a \"do not "
0391     "inline this\" list if it finds an execution path within that function "
0392     "that may potentially perform 'analyzer-max-loop' (= 4 by default) "
0393     "iterations in a loop. (Note that functions that _definitely_ reach the "
0394     "loop limit on some execution path are currently marked as \"do not "
0395     "inline\" even if this option is enabled.) Enabling this option "
0396     "eliminates this (somewhat arbitrary) restriction from the analysis "
0397     "scope, which increases the analysis runtime (on average by ~10%, but "
0398     "a few translation units may see much larger slowdowns).",
0399     false)
0400 
0401 //===----------------------------------------------------------------------===//
0402 // Unsigned analyzer options.
0403 //===----------------------------------------------------------------------===//
0404 
0405 ANALYZER_OPTION(unsigned, CTUImportThreshold, "ctu-import-threshold",
0406                 "The maximal amount of translation units that is considered "
0407                 "for import when inlining functions during CTU analysis. "
0408                 "Lowering this threshold can alleviate the memory burden of "
0409                 "analysis with many interdependent definitions located in "
0410                 "various translation units. This is valid only for non C++ "
0411                 "source files.",
0412                 24u)
0413 
0414 ANALYZER_OPTION(unsigned, CTUImportCppThreshold, "ctu-import-cpp-threshold",
0415                 "The maximal amount of translation units that is considered "
0416                 "for import when inlining functions during CTU analysis of C++ "
0417                 "source files.",
0418                 8u)
0419 
0420 ANALYZER_OPTION(
0421     unsigned, AlwaysInlineSize, "ipa-always-inline-size",
0422     "The size of the functions (in basic blocks), which should be considered "
0423     "to be small enough to always inline.",
0424     3)
0425 
0426 ANALYZER_OPTION(
0427     unsigned, GraphTrimInterval, "graph-trim-interval",
0428     "How often nodes in the ExplodedGraph should be recycled to save memory. "
0429     "To disable node reclamation, set the option to 0.",
0430     1000)
0431 
0432 ANALYZER_OPTION(
0433     unsigned, MinCFGSizeTreatFunctionsAsLarge,
0434     "min-cfg-size-treat-functions-as-large",
0435     "The number of basic blocks a function needs to have to be considered "
0436     "large for the 'max-times-inline-large' config option.",
0437     14)
0438 
0439 ANALYZER_OPTION(unsigned, MaxSymbolComplexity, "max-symbol-complexity",
0440                 "The maximum complexity of symbolic constraint.", 35)
0441 
0442 // HACK:https://discourse.llvm.org/t/rfc-make-istainted-and-complex-symbols-friends/79570
0443 // Ideally, we should get rid of this option soon.
0444 ANALYZER_OPTION(unsigned, MaxTaintedSymbolComplexity, "max-tainted-symbol-complexity",
0445                 "[DEPRECATED] The maximum complexity of a symbol to carry taint", 9)
0446 
0447 ANALYZER_OPTION(unsigned, MaxTimesInlineLarge, "max-times-inline-large",
0448                 "The maximum times a large function could be inlined.", 32)
0449 
0450 ANALYZER_OPTION_DEPENDS_ON_USER_MODE(
0451     unsigned, MaxInlinableSize, "max-inlinable-size",
0452     "The bound on the number of basic blocks in an inlined function.",
0453     /* SHALLOW_VAL */ 4, /* DEEP_VAL */ 100)
0454 
0455 ANALYZER_OPTION_DEPENDS_ON_USER_MODE(
0456     unsigned, MaxNodesPerTopLevelFunction, "max-nodes",
0457     "The maximum number of nodes the analyzer can generate while exploring a "
0458     "top level function (for each exploded graph). 0 means no limit.",
0459     /* SHALLOW_VAL */ 75000, /* DEEP_VAL */ 225000)
0460 
0461 ANALYZER_OPTION(
0462     unsigned, CTUMaxNodesPercentage, "ctu-max-nodes-pct",
0463     "The percentage of single-TU analysed nodes that the CTU analysis is "
0464     "allowed to visit.", 50)
0465 
0466 ANALYZER_OPTION(
0467     unsigned, CTUMaxNodesMin, "ctu-max-nodes-min",
0468     "The maximum number of nodes in CTU mode is determinded by "
0469     "'ctu-max-nodes-pct'. However, if the number of nodes in single-TU "
0470     "analysis is too low, it is meaningful to provide a minimum value that "
0471     "serves as an upper bound instead.", 10000)
0472 
0473 ANALYZER_OPTION(
0474     unsigned, RegionStoreSmallStructLimit, "region-store-small-struct-limit",
0475     "The largest number of fields a struct can have and still be considered "
0476     "small. This is currently used to decide whether or not it is worth forcing "
0477     "a LazyCompoundVal on bind. To disable all small-struct-dependent "
0478     "behavior, set the option to 0.",
0479     2)
0480 
0481 ANALYZER_OPTION(
0482     unsigned, RegionStoreSmallArrayLimit, "region-store-small-array-limit",
0483     "The largest number of elements an array can have and still be considered "
0484     "small. This is currently used to decide whether or not it is worth forcing "
0485     "a LazyCompoundVal on bind. To disable all small-array-dependent "
0486     "behavior, set the option to 0.",
0487     5)
0488 
0489 //===----------------------------------------------------------------------===//
0490 // String analyzer options.
0491 //===----------------------------------------------------------------------===//
0492 
0493 ANALYZER_OPTION(StringRef, CTUDir, "ctu-dir",
0494                 "The directory containing the CTU related files.", "")
0495 
0496 ANALYZER_OPTION(StringRef, CTUIndexName, "ctu-index-name",
0497                 "The name of the file containing the CTU index of definitions. "
0498                 "The index file maps USR-names to identifiers. An identifier "
0499                 "can end with an '.ast' suffix, indicating the indentifier is "
0500                 "a path to a pch-dump. Otherwise the identifier is regarded as "
0501                 "path to a source file which is parsed on-demand. Relative "
0502                 "paths are prefixed with ctu-dir, absolute paths are used "
0503                 "unmodified during lookup.",
0504                 "externalDefMap.txt")
0505 
0506 ANALYZER_OPTION(
0507     StringRef, CTUInvocationList, "ctu-invocation-list",
0508     "The path to the YAML format file containing a mapping from source file "
0509     "paths to command-line invocations represented as a list of arguments. "
0510     "This invocation is used produce the source-file's AST in case on-demand "
0511     "loading is performed. Example file-content: "
0512     "{/main.cpp: [clang++, /main.cpp], other.cpp: [clang++, /other.cpp]}",
0513     "invocations.yaml")
0514 
0515 ANALYZER_OPTION(
0516     StringRef, ModelPath, "model-path",
0517     "The analyzer can inline an alternative implementation written in C at the "
0518     "call site if the called function's body is not available. This is a path "
0519     "where to look for those alternative implementations (called models).",
0520     "")
0521 
0522 ANALYZER_OPTION(
0523     StringRef, CTUPhase1InliningMode, "ctu-phase1-inlining",
0524     "Controls which functions will be inlined during the first phase of the ctu "
0525     "analysis. "
0526     "If the value is set to 'all' then all foreign functions are inlinied "
0527     "immediately during the first phase, thus rendering the second phase a noop. "
0528     "The 'ctu-max-nodes-*' budge has no effect in this case. "
0529     "If the value is 'small' then only functions with a linear CFG and with a "
0530     "limited number of statements would be inlined during the first phase. The "
0531     "long and/or nontrivial functions are handled in the second phase and are "
0532     "controlled by the 'ctu-max-nodes-*' budge. "
0533     "The value 'none' means that all foreign functions are inlined only in the "
0534     "second phase, 'ctu-max-nodes-*' budge limits the second phase. "
0535     "Value: \"none\", \"small\", \"all\".",
0536     "small")
0537 
0538 ANALYZER_OPTION(
0539     StringRef, CXXMemberInliningMode, "c++-inlining",
0540     "Controls which C++ member functions will be considered for inlining. "
0541     "Value: \"constructors\", \"destructors\", \"methods\".",
0542     "destructors")
0543 
0544 ANALYZER_OPTION(
0545     StringRef, ExplorationStrategy, "exploration_strategy",
0546     "Value: \"dfs\", \"bfs\", \"unexplored_first\", "
0547     "\"unexplored_first_queue\", \"unexplored_first_location_queue\", "
0548     "\"bfs_block_dfs_contents\".",
0549     "unexplored_first_queue")
0550 
0551 ANALYZER_OPTION(
0552     StringRef, RawSilencedCheckersAndPackages, "silence-checkers",
0553     "A semicolon separated list of checker and package names to silence. "
0554     "Silenced checkers will not emit reports, but the modeling remain enabled.",
0555     "")
0556 
0557 ANALYZER_OPTION_DEPENDS_ON_USER_MODE(
0558     StringRef, IPAMode, "ipa",
0559     "Controls the mode of inter-procedural analysis. Value: \"none\", "
0560     "\"basic-inlining\", \"inlining\", \"dynamic\", \"dynamic-bifurcate\".",
0561     /* SHALLOW_VAL */ "inlining", /* DEEP_VAL */ "dynamic-bifurcate")
0562 
0563 #undef ANALYZER_OPTION_DEPENDS_ON_USER_MODE
0564 #undef ANALYZER_OPTION