9#ifndef LLVM_CLANG_TESTING_TESTCLANGCONFIG_H
10#define LLVM_CLANG_TESTING_TESTCLANGCONFIG_H
13#include "llvm/Support/raw_ostream.h"
32#define TESTLANGUAGE_C(lang, version, std_flag, version_index) \
33 || Language == Lang_##lang##version
34#include "clang/Testing/TestLanguage.def"
38 bool isC(
int Version)
const {
40#define TESTLANGUAGE_C(lang, version, std_flag, version_index) \
41 || (Version == version && Language == Lang_##lang##version)
42#include "clang/Testing/TestLanguage.def"
47 const auto MinimumStdVersionIndex = 0
48#define TESTLANGUAGE_C(lang, version, std_flag, version_index) \
49 +(MinimumStdVersion == version ? version_index : 0)
50#include "clang/Testing/TestLanguage.def"
53#define TESTLANGUAGE_C(lang, version, std_flag, version_index) \
54 case Lang_##lang##version: \
55 return MinimumStdVersionIndex <= version_index;
56#include "clang/Testing/TestLanguage.def"
70#define TESTLANGUAGE_CXX(lang, version, std_flag, version_index) \
71 || Language == Lang_##lang##version
72#include "clang/Testing/TestLanguage.def"
78#define TESTLANGUAGE_CXX(lang, version, std_flag, version_index) \
79 || (Version == version && Language == Lang_##lang##version)
80#include "clang/Testing/TestLanguage.def"
85 const auto MinimumStdVersionIndex = 0
86#define TESTLANGUAGE_CXX(lang, version, std_flag, version_index) \
87 +(MinimumStdVersion == version ? version_index : 0)
88#include "clang/Testing/TestLanguage.def"
91#define TESTLANGUAGE_CXX(lang, version, std_flag, version_index) \
92 case Lang_##lang##version: \
93 return MinimumStdVersionIndex <= version_index;
94#include "clang/Testing/TestLanguage.def"
121 return Target ==
"x86_64-pc-win32-msvc";
126 Result.push_back(
"-target");
133 llvm::raw_string_ostream OS(
Result);
135#define TESTLANGUAGE(lang, version, std_flag, version_index) \
136 case Lang_##lang##version: \
137 OS << (#lang #version); \
139#include "clang/Testing/TestLanguage.def"
151 OS << (
Target.find(
"win") != std::string::npos ?
"_win" :
"");
157 llvm::raw_string_ostream OS(
Result);
164 return OS << ClangConfig.
toString();
llvm::MachO::Target Target
The JSON file list parser is used to communicate input to InstallAPI.
Language
The language for the input, used to select and validate the language standard and possible actions.
@ Result
The result type of a method or function.
std::vector< std::string > getCommandLineArgsForTesting(TestLanguage Lang)
A Clang configuration for end-to-end tests that can be converted to command line arguments for the dr...
bool isCXXOrLater(int MinimumStdVersion) const
std::vector< std::string > getCommandLineArgs() const
bool isCXX(int Version) const
bool isCXX17OrLater() const
bool isCOrEarlier(int MaximumStdVersion) const
bool isCXX11OrLater() const
bool isCXX23OrLater() const
bool isC(int Version) const
std::string toString() const
bool isCXX14OrLater() const
bool isC99OrLater() const
std::string Target
The argument of the -target command line flag.
bool isCXX20OrLater() const
bool supportsCXXDynamicExceptionSpecification() const
bool isCOrLater(int MinimumStdVersion) const
std::string toShortString() const
bool isCXXOrEarlier(int MaximumStdVersion) const
friend std::ostream & operator<<(std::ostream &OS, const TestClangConfig &ClangConfig)
bool hasDelayedTemplateParsing() const