//===-- AnalyzerOptions.def - Metadata about Static Analyses ----*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file defines the analyzer options avaible with -analyzer-config. // //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_STRINGREF_H #error This .def file is expected to be included in translation units where \ "llvm/ADT/StringRef.h" is already included! #endif #ifdef ANALYZER_OPTION #ifndef ANALYZER_OPTION_DEPENDS_ON_USER_MODE #error If you didnt include this file with the intent of generating methods, \ define both 'ANALYZER_OPTION' and 'ANALYZER_OPTION_DEPENDS_ON_USER_MODE' macros! #endif #endif #ifndef ANALYZER_OPTION_DEPENDS_ON_USER_MODE #ifdef ANALYZER_OPTION #error If you didnt include this file with the intent of generating methods, \ define both 'ANALYZER_OPTION' and 'ANALYZER_OPTION_DEPENDS_ON_USER_MODE' macros! #endif #endif #ifndef ANALYZER_OPTION /// Create a new analyzer option, but dont generate a method for it in /// AnalyzerOptions. /// /// TYPE - The type of the option object that will be stored in /// AnalyzerOptions. This file is expected to be icluded in translation /// units where AnalyzerOptions.h is included, so types from that /// header should be used. /// NAME - The name of the option object. /// CMDFLAG - The command line flag for the option. /// (-analyzer-config CMDFLAG=VALUE) /// DESC - Description of the flag. /// DEFAULT_VAL - The default value for CMDFLAG. #define ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, DEFAULT_VAL) #endif #ifndef ANALYZER_OPTION_DEPENDS_ON_USER_MODE /// Create a new analyzer option, but dont generate a method for it in /// AnalyzerOptions. It's value depends on the option "user-mode". /// /// TYPE - The type of the option object that will be stored in /// AnalyzerOptions. This file is expected to be icluded in translation /// units where AnalyzerOptions.h is included, so types from that /// header should be used. /// NAME - The name of the option object. /// CMDFLAG - The command line flag for the option. /// (-analyzer-config CMDFLAG=VALUE) /// DESC - Description of the flag. /// SHALLOW_VAL - The default value for CMDFLAG, when "user-mode" was set to /// "shallow". /// DEEP_VAL - The default value for CMDFLAG, when "user-mode" was set to /// "deep". #define ANALYZER_OPTION_DEPENDS_ON_USER_MODE(TYPE, NAME, CMDFLAG, DESC, \ SHALLOW_VAL, DEEP_VAL) #endif //===----------------------------------------------------------------------===// // The "mode" option. Since some options depend on this, we list it on top of // this file in order to make sure that the generated field for it is // initialized before the rest. //===----------------------------------------------------------------------===// ANALYZER_OPTION( StringRef, … }