hanchenye-llvm-project/clang/test/Preprocessor
Duncan P. N. Exon Smith e77a3aff6f Headers: Make the type of SIZE_MAX the same as size_t
size_t is usually defined as unsigned long, but on 64-bit platforms,
stdint.h currently defines SIZE_MAX using "ull" (unsigned long long).
Although this is the same width, it doesn't necessarily have the same
alignment or calling convention.  It also triggers printf warnings when
using the format flag "%zu" to print SIZE_MAX.

This changes SIZE_MAX to reuse the compiler-provided __SIZE_MAX__, and
provides similar fixes for the other integers:

  - INTPTR_MIN
  - INTPTR_MAX
  - UINTPTR_MAX
  - PTRDIFF_MIN
  - PTRDIFF_MAX
  - INTMAX_MIN
  - INTMAX_MAX
  - UINTMAX_MAX
  - INTMAX_C()
  - UINTMAX_C()

... and fixes the typedefs for intptr_t and uintptr_t to use
__INTPTR_TYPE__ and __UINTPTR_TYPE__ instead of int32_t, effectively
reverting r89224, r89226, and r89237 (r89221 already having been
effectively reverted).

We can probably also kill __INTPTR_WIDTH__, __INTMAX_WIDTH__, and
__UINTMAX_WIDTH__ in a follow-up, but I was hesitant to delete all the
per-target CHECK lines in this commit since those might serve their own
purpose.

rdar://problem/11811377

llvm-svn: 301593
2017-04-27 21:49:45 +00:00
..
Inputs Preprocessor: Suppress -Wnonportable-include-path for header maps 2017-04-27 21:41:51 +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
_Pragma-physloc.c
_Pragma.c
aarch64-target-features.c [AArch64] Vulcan is now ThunderXT99 2017-03-07 21:24:53 +00:00
annotate_in_macro_arg.c
arm-acle-6.4.c Add support for armv7ve flag in clang (PR31358). 2017-02-09 23:30:10 +00:00
arm-acle-6.5.c Add support for armv7ve flag in clang (PR31358). 2017-02-09 23:30:10 +00:00
arm-target-features.c [ARM] Add regression tests for Cortex-M23 and Cortex-M33 2017-02-20 10:37: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
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 [CUDA] More correctly inherit primitive types from the host during device compilation. 2017-01-05 16:53:21 +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
cxx_oper_keyword_ms_compat.cpp
cxx_oper_spelling.cpp
cxx_or.cpp
cxx_true.cpp
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_include.c
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
headermap-rel2.c
hexagon-predefines.c [Hexagon] Define architecture version macros for hexagonv55 2016-04-21 14:30:04 +00:00
if_warning.c
ifdef-recover.c
ignore-pragmas.c
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 Darwin: Define __STDC_NO_THREADS__ on Darwin targets 2017-04-27 01:47:22 +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
iwithprefix.c
line-directive-output.c
line-directive.c
macho-embedded-predefines.c
macro-multiline.c Enable passing test on Windows + MSYS. 2015-08-16 19:02:49 +00:00
macro-reserved-cxx11.cpp
macro-reserved-ms.c
macro-reserved.c
macro-reserved.cpp
macro_arg_directive.c
macro_arg_directive.h
macro_arg_empty.c
macro_arg_keyword.c
macro_arg_slocentry_merge.c
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
macro_paste_bcpl_comment.c
macro_paste_c_block_comment.c
macro_paste_commaext.c
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_redefined.c
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_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
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 Preprocessor: Suppress -Wnonportable-include-path for header maps 2017-04-27 21:41:51 +00:00
objc-pp.m
openmp-macro-expansion.c
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
pp-modules.h
pp-record.c
pp-record.h
pr2086.c
pr2086.h
pr13851.c
pr19649-signed-wchar_t.c
pr19649-unsigned-wchar_t.c
pragma-captured.c
pragma-pushpop-macro.c
pragma_diagnostic.c Accept "-Weverything" in clang diagnistic pragmas 2016-02-13 01:44:05 +00:00
pragma_diagnostic_output.c
pragma_diagnostic_sections.cpp
pragma_microsoft.c Add -Wignored-pragma-intrinsic flag 2016-09-21 20:19:21 +00:00
pragma_microsoft.cpp
pragma_poison.c
pragma_ps4.c
pragma_sysheader.c
pragma_sysheader.h
pragma_unknown.c
predefined-arch-macros.c When we turn on vsx it should also turn on altivec explicitly, same 2017-04-15 06:15:00 +00:00
predefined-exceptions.m
predefined-macros.c [clang-cl] Define _MSVC_LANG 2016-06-28 03:13:16 +00:00
predefined-nullability.c
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
skipping_unclean.c
stdint.c Headers: Make the type of SIZE_MAX the same as size_t 2017-04-27 21:49:45 +00:00
stringize_misc.c Diagnose missing macro argument following charize operator. 2016-04-01 19:02:20 +00:00
stringize_space.c When copying whitespace flags from the token naming a macro argument onto the 2016-01-15 03:24:18 +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
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
woa-defaults.c
woa-wchar_t.c
x86_target_features.c [X86] Add -mclflushopt/-mno-clflushopt command line support and __CLFLUSHOPT__ define to match gcc. 2017-02-08 06:48:58 +00:00