llvm-project/clang/test/Preprocessor
Bruno Cardoso Lopes dc3f88ad98 Re-apply: Add python tool to dump and construct header maps
Header maps are binary files used by Xcode, which are used to map
header names or paths to other locations. Clang has support for
those since its inception, but there's not a lot of header map
testing around.

Since it's a binary format, testing becomes pretty much brittle
and its hard to even know what's inside if you don't have the
appropriate tools.

Add a python based tool that allows creating and dumping header
maps based on a json description of those. While here, rewrite
tests to use the tool and remove the binary files from the tree.

This tool was initially written by Daniel Dunbar.

Thanks to Stella Stamenova for helping make this work on Windows.

Differential Revision: https://reviews.llvm.org/D46485

rdar://problem/39994722

llvm-svn: 335295
2018-06-21 21:45:24 +00:00
..
Inputs Re-apply: Add python tool to dump and construct header maps 2018-06-21 21:45:24 +00:00
Weverything_pragma.c Accept "-Weverything" in clang diagnistic pragmas 2016-02-13 01:44:05 +00:00
_Pragma-dependency.c
_Pragma-dependency2.c
_Pragma-in-macro-arg.c
_Pragma-location.c Add -fuse-line-directive flag to control usage of #line with -E 2015-02-26 00:17:25 +00:00
_Pragma-physloc.c
_Pragma.c Improved error recovery for _Pragma 2015-07-30 21:30:00 +00:00
aarch64-target-features.c [PATCH 2/2] [test] Add support for Samsung Exynos M4 (NFC) 2018-06-06 18:58:01 +00:00
annotate_in_macro_arg.c Lex: Don't call getIdentifierInfo on annotation tokens 2015-03-18 07:53:20 +00:00
arm-acle-6.4.c Avoid int to string conversion in Twine or raw_ostream contexts. 2017-12-28 16:58:54 +00:00
arm-acle-6.5.c Avoid int to string conversion in Twine or raw_ostream contexts. 2017-12-28 16:58:54 +00:00
arm-target-features.c [PATCH 2/2] [test] Add support for Samsung Exynos M4 (NFC) 2018-06-06 18:58:01 +00:00
assembler-with-cpp.c
bigoutput.c Adding a test for PR25717. 2016-01-27 02:18:28 +00:00
builtin_line.c
c17.c Add a test that the __STDC_VERSION__ macro reports the correct value for -std=c17. 2017-12-08 02:39:26 +00:00
c90.c
c99-6_10_3_3_p4.c
c99-6_10_3_4_p5.c
c99-6_10_3_4_p6.c
c99-6_10_3_4_p7.c
c99-6_10_3_4_p9.c
clang_headers.c
comment_save.c
comment_save_if.c
comment_save_macro.c [Clang] Remove unwanted --check-prefix=CHECK from unit tests. NFC. 2016-04-20 01:02:18 +00:00
cuda-approx-transcendentals.cu [CUDA] Updated CUDA tests that must run w/o CUDA installation. 2016-08-02 23:43:04 +00:00
cuda-macos-includes.cu [CUDA] Attempt to fix test failures in cuda-macos-includes.cu. 2016-11-18 01:11:32 +00:00
cuda-preprocess.cu [CUDA] Updated CUDA tests that must run w/o CUDA installation. 2016-08-02 23:43:04 +00:00
cuda-types.cu Revert 319303: Add _Float128 as alias to __float128 to enable compilations on Fedora27/glibc2 2018-01-15 21:16:25 +00:00
cxx_and.cpp
cxx_bitand.cpp
cxx_bitor.cpp
cxx_compl.cpp
cxx_not.cpp
cxx_not_eq.cpp
cxx_oper_keyword.cpp Keep the IdentifierInfo in the Token for alternative operator keyword 2017-07-14 09:23:40 +00:00
cxx_oper_keyword_ms_compat.cpp Emit warning if define or undef reserved identifier or keyword. 2014-12-11 12:18:08 +00:00
cxx_oper_spelling.cpp
cxx_or.cpp
cxx_true.cpp Avoid false positive/negative test results from line directive interference.NFC. 2015-06-26 17:49:10 +00:00
cxx_xor.cpp
dependencies-and-pp.c Fix PR31644 introduced by r287138 and add a regression test. 2017-01-14 21:12:08 +00:00
directive-invalid.c
disabled-cond-diags.c
disabled-cond-diags2.c
dump-macros-spacing.c
dump-macros-undef.c
dump-options.c
dump_import.h [Preprocessor] Support for '-dI' flag 2016-11-17 22:45:31 +00:00
dump_import.m [Preprocessor] Support for '-dI' flag 2016-11-17 22:45:31 +00:00
dump_include.c [Preprocessor] Support for '-dI' flag 2016-11-17 22:45:31 +00:00
dump_include.h [Preprocessor] Support for '-dI' flag 2016-11-17 22:45:31 +00:00
dump_macros.c
dumptokens_phyloc.c
elfiamcu-predefines.c [x86] Correct setting of WIntType for MCU target 2016-02-04 11:54:45 +00:00
expr_comma.c
expr_define_expansion.c Add -Wexpansion-to-undefined: warn when using `defined` in a macro definition. 2016-01-19 15:15:31 +00:00
expr_invalid_tok.c Improve diagnostic for the case when a non-defined function-like macro is used 2016-04-16 00:07:09 +00:00
expr_liveness.c
expr_multichar.c
expr_usual_conversions.c
extension-warning.c
feature_tests.c Consolidate and improve the handling of built-in feature-like macros 2016-04-05 08:36:47 +00:00
file_to_include.h
first-line-indent.c
function_macro_file.c
function_macro_file.h
has_attribute.c Improve diagnostic for the case when a non-defined function-like macro is used 2016-04-16 00:07:09 +00:00
has_attribute.cpp Define __has_cpp_attribute(fallthrough) to a more reasonable value. (What year is it?!) 2016-03-08 00:40:32 +00:00
has_c_attribute.c Correct line endings that got mixed up in r320088; NFC. 2017-12-07 23:10:09 +00:00
has_include.c Fix some handling of AST nodes with diagnostics. 2018-03-28 04:16:13 +00:00
hash_line.c
hash_space.c
header_is_main_file.c Do not print include_next/pragma once warnings when input is a header. 2016-10-27 14:17:10 +00:00
header_lookup1.c
headermap-rel.c Re-apply: Add python tool to dump and construct header maps 2018-06-21 21:45:24 +00:00
headermap-rel2.c Re-apply: Add python tool to dump and construct header maps 2018-06-21 21:45:24 +00:00
hexagon-predefines.c [Hexagon] Add front-end support for Hexagon V65 2017-12-13 13:48:07 +00:00
if_warning.c
ifdef-recover.c Preprocessor: support defined() with operator names for MS compatibility 2014-05-21 06:13:51 +00:00
ignore-pragmas.c Revert 320391: Certain targets are failing, pulling back to diagnose. 2017-12-11 18:14:51 +00:00
import_self.c
include-directive1.c
include-directive2.c
include-directive3.c
include-macros.c
include-pth.c
indent_macro.c
init-v7k-compat.c ARMv7k: implement ABI changes for watchOS from standard iOS. 2015-10-30 16:30:45 +00:00
init.c [PowerPC] The __float128 type should only be available on Power9 2018-06-13 16:05:05 +00:00
invalid-__has_warning1.c Consolidate and improve the handling of built-in feature-like macros 2016-04-05 08:36:47 +00:00
invalid-__has_warning2.c Consolidate and improve the handling of built-in feature-like macros 2016-04-05 08:36:47 +00:00
is_target.c Commit missing tests for r320734 2017-12-14 19:22:41 +00:00
is_target_arm.c Commit missing tests for r320734 2017-12-14 19:22:41 +00:00
is_target_arm64.c __is_target_arch: Check the arch and subarch instead of the arch name 2017-12-15 19:58:38 +00:00
is_target_environment_version.c __is_target_environment: Check the environment after parsing it 2017-12-15 20:07:53 +00:00
is_target_os_darwin.c Commit missing tests for r320734 2017-12-14 19:22:41 +00:00
is_target_unknown.c Commit missing tests for r320734 2017-12-14 19:22:41 +00:00
iwithprefix.c [multilib] Teach Clang's code about multilib by threading 2014-12-29 12:09:08 +00:00
line-directive-output.c Add test coverage for recent behavior change in GNU line marker pre-processing 2017-05-23 16:09:13 +00:00
line-directive.c Switch C compilations to C11 by default. 2014-10-20 23:26:58 +00:00
macho-embedded-predefines.c ARM: Correctly identify cortex-m4 as v7em. 2014-06-26 17:24:16 +00:00
macro-multiline.c Use backslash escape, replacing xargs -0 in test macro-multiline.c 2018-01-04 22:58:30 +00:00
macro-reserved-cxx11.cpp [Tests] Add explicit -std=lang option to a number of tests. 2015-08-01 02:55:59 +00:00
macro-reserved-ms.c Fixed warnings on redefine keywords and reserved ids. 2014-12-18 11:14:21 +00:00
macro-reserved.c Fixed warnings on redefine keywords and reserved ids. 2014-12-18 11:14:21 +00:00
macro-reserved.cpp [Tests] Add explicit -std=lang option to a number of tests. 2015-08-01 02:55:59 +00:00
macro_arg_directive.c Lex: Don't let annotation tokens get into macro expansion 2014-12-28 07:42:49 +00:00
macro_arg_directive.h
macro_arg_empty.c
macro_arg_keyword.c
macro_arg_slocentry_merge.c Stop printing macro backtraces that don't help diagnostics. 2015-08-12 18:24:59 +00:00
macro_arg_slocentry_merge.h
macro_backslash.c
macro_disable.c
macro_expand.c Fixed preprocessed output of the first token for pragmas. 2016-02-09 08:51:26 +00:00
macro_expand_empty.c
macro_expandloc.c
macro_fn.c
macro_fn_comma_swallow.c
macro_fn_comma_swallow2.c
macro_fn_disable_expand.c
macro_fn_lparen_scan.c
macro_fn_lparen_scan2.c
macro_fn_placemarker.c
macro_fn_preexpand.c
macro_fn_varargs_iso.c
macro_fn_varargs_named.c
macro_misc.c
macro_not_define.c
macro_paste_bad.c Lex: Fix an invalid access into a SmallString 2014-10-25 11:40:40 +00:00
macro_paste_bcpl_comment.c
macro_paste_c_block_comment.c
macro_paste_commaext.c Fix typos in clang 2018-04-06 15:14:32 +00:00
macro_paste_empty.c
macro_paste_hard.c
macro_paste_hashhash.c
macro_paste_identifier_error.c
macro_paste_msextensions.c Emit a -Wmicrosoft warning when pasting /##/ into a comment token in MS mode. 2015-12-29 23:06:17 +00:00
macro_paste_none.c
macro_paste_simple.c
macro_paste_spacing.c
macro_paste_spacing2.c
macro_raw_string.cpp Stringizing raw string literals containing newline 2017-12-06 17:00:53 +00:00
macro_redefined.c Put macro redefinition warnings under -Wmacro-redefined 2014-04-04 00:17:16 +00:00
macro_rescan.c
macro_rescan2.c
macro_rescan_varargs.c
macro_rparen_scan.c
macro_rparen_scan2.c
macro_space.c
macro_undef.c
macro_vaopt_check.cpp [c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion) 2017-10-15 01:26:26 +00:00
macro_vaopt_expand.cpp [c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion) 2017-10-15 01:26:26 +00:00
macro_variadic.cl
macro_with_initializer_list.cpp
mi_opt.c
mi_opt.h
mi_opt2.c
mi_opt2.h
microsoft-ext.c [MSVC Compat] Accept elided commas in macro function arguments 2016-01-22 19:26:44 +00:00
microsoft-header-search.c Rename -Wmsvc-include to -Wmicrosoft-include, now that -Wmicrosoft is split up. 2015-07-28 16:48:12 +00:00
microsoft-import.c
missing-include-range-check.h Include full filename range for missing includes 2016-10-25 10:13:10 +00:00
missing-system-header.c
missing-system-header.h
mmx.c
non_fragile_feature.m
non_fragile_feature1.m
nonportable-include-with-hmap.c Re-apply: Add python tool to dump and construct header maps 2018-06-21 21:45:24 +00:00
objc-pp.m
openmp-macro-expansion.c According to the OpenMP spec, all the preprocessor macros should be 2015-06-15 23:44:27 +00:00
optimize.c
output_paste_avoid.cpp
overflow.c
pic.c Restructure the propagation of -fPIC/-fPIE. 2016-06-23 15:07:32 +00:00
pp-modules.c Add pragma to perform module import and use it in -E output. 2017-04-29 00:34:47 +00:00
pp-modules.h
pp-record.c
pp-record.h
pr2086.c
pr2086.h
pr13851.c
pr19649-signed-wchar_t.c Commit patch for PR19649. Set the correct sign of wide character for literals based on underlying type of wchar_t. 2015-02-24 13:34:20 +00:00
pr19649-unsigned-wchar_t.c Driver: hoist the `wchar_t` handling to the driver 2017-10-06 23:09:55 +00:00
pragma-captured.c
pragma-comment-linux.c Support `#pragma comment(lib, "name")` in the frontend for ELF 2018-02-07 01:46:46 +00:00
pragma-pushpop-macro.c
pragma_assume_nonnull.c [Preprocessor] Preserve #pragma clang assume_nonnull in preprocessed output 2017-09-27 23:29:37 +00:00
pragma_diagnostic.c Use the -Wunknown-warning-option group for the "unknown warning group" 2017-04-28 14:45:25 +00:00
pragma_diagnostic_output.c
pragma_diagnostic_sections.cpp
pragma_microsoft.c [ms] Parse #pragma optimize and ignore it behind its own flag 2018-03-20 08:53:11 +00:00
pragma_microsoft.cpp
pragma_module.c Permit keywords in module names in #pragma clang module *. 2017-05-05 22:34:07 +00:00
pragma_poison.c
pragma_ps4.c Adds a warning for unrecognized argument to #pragma comment() on PS4. 2015-03-23 20:41:42 +00:00
pragma_sysheader.c
pragma_sysheader.h
pragma_unknown.c Preserve unknown STDC pragma through preprocessor 2018-01-05 22:45:03 +00:00
predefined-arch-macros.c [x86] invpcid intrinsic 2018-05-25 06:34:42 +00:00
predefined-exceptions.m Frontend: Define __EXCEPTIONS if -fexceptions is passed 2014-10-27 20:02:19 +00:00
predefined-macros.c [HIP] Add predefined macros __HIPCC__ and __HIP_DEVICE_COMPILE__ 2018-04-25 13:33:19 +00:00
predefined-nullability.c Add __nonnull/__nullable/__null_unspecified predefines for Darwin. 2015-06-24 22:02:16 +00:00
print-assembler.s Don't print end-of-directive tokens in -E output 2017-10-16 23:07:15 +00:00
print-pragma-microsoft.c
print_line_count.c
print_line_empty_file.c
print_line_include.c
print_line_include.h
print_line_track.c
pushable-diagnostics.c Accept "-Weverything" in clang diagnistic pragmas 2016-02-13 01:44:05 +00:00
riscv-target-features.c [PATCH] [RISCV] Extend getTargetDefines for RISCVTargetInfo 2018-04-05 12:54:00 +00:00
skipping_unclean.c
stdint.c Basic: fix __{,U}INTPTR_TYPE__ on ARM 2017-10-18 00:00:50 +00:00
stringize_misc.c Diagnose missing macro argument following charize operator. 2016-04-01 19:02:20 +00:00
stringize_space.c Fix whitespace before token-paste of an argument. 2017-05-04 21:31:17 +00:00
sysroot-prefix.c Fix sysroot-prefix.c on Windows (/ vs \). 2016-05-06 21:17:32 +00:00
traditional-cpp.c Fix CHECK directives that weren't checking. 2015-08-31 21:48:52 +00:00
ucn-allowed-chars.c
ucn-pp-identifier.c Preprocessor: support defined() with operator names for MS compatibility 2014-05-21 06:13:51 +00:00
undef-error.c
unterminated.c
user_defined_system_framework.c
utf8-allowed-chars.c
warn-disabled-macro-expansion.c
warn-macro-unused.c
warn-macro-unused.h
warning_tests.c Consolidate and improve the handling of built-in feature-like macros 2016-04-05 08:36:47 +00:00
wasm-target-features.c [WebAssembly] Initial WebAssembly support in clang 2015-09-03 22:51:53 +00:00
wchar_t.c Driver: hoist the `wchar_t` handling to the driver 2017-10-06 23:09:55 +00:00
woa-defaults.c Basic: fix `__INTPTR_TYPE__` for Windows ARM 2017-10-17 22:49:53 +00:00
woa-wchar_t.c Target: fix wchar_t definition for Windows on ARM 2014-05-04 01:56:04 +00:00
x86_target_features.c This patch aims to match the changes introduced 2018-05-18 11:56:21 +00:00