diff options
3 files changed, 8 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/modernize-deprecated-headers-cxx03.cpp b/clang-tools-extra/test/clang-tidy/modernize-deprecated-headers-cxx03.cpp index a7c28a55e5e..137f0c91801 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-deprecated-headers-cxx03.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-deprecated-headers-cxx03.cpp @@ -1,4 +1,5 @@ // RUN: %check_clang_tidy %s modernize-deprecated-headers %t -- -- -std=c++03 -isystem %S/Inputs/Headers +// REQUIRES: target-headers #include <assert.h> #include <complex.h> diff --git a/clang-tools-extra/test/clang-tidy/modernize-deprecated-headers-cxx11.cpp b/clang-tools-extra/test/clang-tidy/modernize-deprecated-headers-cxx11.cpp index 5be4293c007..ae6c6ba3246 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-deprecated-headers-cxx11.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-deprecated-headers-cxx11.cpp @@ -1,4 +1,5 @@ // RUN: %check_clang_tidy %s modernize-deprecated-headers %t -- -- -std=c++11 -isystem %S/Inputs/Headers +// REQUIRES: target-headers #include <assert.h> #include <complex.h> diff --git a/clang-tools-extra/test/lit.cfg b/clang-tools-extra/test/lit.cfg index 5344e391e7e..3220831ccea 100644 --- a/clang-tools-extra/test/lit.cfg +++ b/clang-tools-extra/test/lit.cfg @@ -189,6 +189,12 @@ if not platform.system() in ['Windows'] or not execute_external: if platform.system() not in ['Windows']: config.available_features.add('ansi-escape-sequences') +# Set if default-target's system headers available. +# For example in general, MS headers are supposed unavailable on non-Windows hosts. +# FIXME: It should be probable for cross compilations. +if not (platform.system() not in ['Windows'] and re.match(r'.*-win32$', config.target_triple)): + config.available_features.add('target-headers') + check_clang_tidy = os.path.join( config.test_source_root, "clang-tidy", "check_clang_tidy.py") config.substitutions.append( |