diff --git a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py index ca64119788ee..c950042ff0bd 100755 --- a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py +++ b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py @@ -60,6 +60,11 @@ def main(): if len(clang_tidy_extra_args) == 0: clang_tidy_extra_args = ['--', '--std=c++11'] if extension == '.cpp' \ else ['--'] + + # Tests should not rely on STL being available, and instead provide mock + # implementations of relevant APIs. + clang_tidy_extra_args.append('-nostdinc++') + if resource_dir is not None: clang_tidy_extra_args.append('-resource-dir=%s' % resource_dir)