hanchenye-llvm-project/clang/test/Preprocessor
Dylan Noblesmith 673728fe57 Preprocessor: add __BYTE_ORDER__ predefined macro
The __BYTE_ORDER__ predefined macro was added in GCC 4.6:
http://gcc.gnu.org/onlinedocs/gcc-4.6.0/cpp/Common-Predefined-Macros.html

It's used like the following:

 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
 ...
 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
 ...
 #else
 #error insane architecture like the pdp-11
 #endif

There's a similar macro, __FLOAT_WORD_ORDER__, but it looks like it
mainly exist to accommodate fairly obscure architectures and ARM's
old FPA instructions, so it doesn't seem nearly as useful.

The tests are updated to check for the correct(at least, based on
clang's current output) value of the macro on each target. So now the
suite will catch bugs like the one fixed in r157626.

llvm-svn: 160879
2012-07-27 18:34:31 +00:00
..
Inputs/TestFramework.framework [Lex] Add support for 'user specified system frameworks' (see test case). 2012-04-05 17:10:06 +00:00
_Pragma-dependency.c
_Pragma-dependency2.c
_Pragma-in-macro-arg.c [preprocessor] In Preprocessor::CachingLex() check whether there were more tokens 2012-04-04 02:57:01 +00:00
_Pragma-location.c [-E] Emit a rewritten _Pragma on its own line. 2012-06-15 23:33:51 +00:00
_Pragma-physloc.c
_Pragma.c
assembler-with-cpp.c
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 [-E] Emit a rewritten _Pragma on its own line. 2012-06-15 23:33:51 +00:00
comment_save_if.c A couple fixes for preprocessor expressions: 2011-08-03 00:04:13 +00:00
comment_save_macro.c
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 Move suport for redefining operator keywords from -fms-extensions to -fms-compatibility. 2012-03-01 00:13:46 +00:00
cxx_oper_spelling.cpp
cxx_or.cpp
cxx_true.cpp
cxx_xor.cpp
dependencies-and-pp.c
directive-invalid.c
disabled-cond-diags.c
disabled-cond-diags2.c Do not complain about junk on the end of a #endif in a skipped block. Such junk 2012-06-21 00:35:03 +00:00
dump-macros-spacing.c
dump-macros-undef.c
dump-options.c
dump_macros.c
dumptokens_phyloc.c
expr_comma.c
expr_define_expansion.c A couple fixes for preprocessor expressions: 2011-08-03 00:04:13 +00:00
expr_invalid_tok.c
expr_liveness.c
expr_multichar.c
expr_usual_conversions.c
extension-warning.c
feature_tests.c Provide, and document, a set of __c11_atomic_* intrinsics to implement C11's 2012-04-11 17:55:32 +00:00
file_to_include.h
function_macro_file.c
function_macro_file.h
has_attribute.c Merge __has_attribute tests. Patch by Jonathan Sauer! 2012-03-01 17:45:53 +00:00
has_include.c Start testing some commented-out cases of badly-formed __has_include. 2012-07-11 20:12:19 +00:00
hash_line.c
hash_space.c
header_lookup1.c Change this test to reflect the state we are moving in. The Clang 2011-11-05 10:15:33 +00:00
if_warning.c Only ignore extra tokens after #else if we skip it, otherwise warn. Fixes rdar://9475098. 2011-05-21 04:26:04 +00:00
ifdef-recover.c
import_self.c
include-directive1.c
include-directive2.c test/Preprocessor/include-directive2.c: Get rid of using <float.h> to avoid #include_next on mingw. 2011-07-11 14:53:27 +00:00
include-directive3.c
include-macros.c
include-pth.c
indent_macro.c
init.c Preprocessor: add __BYTE_ORDER__ predefined macro 2012-07-27 18:34:31 +00:00
line-directive-output.c
line-directive.c Allow -verify directives to be filtered by preprocessing. 2012-07-11 19:58:23 +00:00
macro-multiline.c
macro_arg_directive.c Don't allow #include (and its friends #import, #include_next and 2011-12-16 22:50:01 +00:00
macro_arg_directive.h Don't allow #include (and its friends #import, #include_next and 2011-12-16 22:50:01 +00:00
macro_arg_keyword.c
macro_disable.c
macro_expand.c
macro_expandloc.c
macro_expandloc2.c
macro_fn.c Minor improvements to some C99 variadic-macro-related diagnostics. 2012-06-22 23:59:08 +00:00
macro_fn_comma_swallow.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 revert r133003 and fix the bug properly: the issue was that ## in a token 2011-06-14 18:19:37 +00:00
macro_paste_bcpl_comment.c
macro_paste_c_block_comment.c Allow -verify directives to be filtered by preprocessing. 2012-07-11 19:58:23 +00:00
macro_paste_commaext.c
macro_paste_empty.c
macro_paste_hard.c
macro_paste_hashhash.c When expanding macro arguments, treat '##' coming from an argument as a normal token. 2011-07-07 03:40:37 +00:00
macro_paste_identifier_error.c Fix issue where a token paste which forms a /* or // would discard the rest of 2012-06-13 19:02:56 +00:00
macro_paste_msextensions.c
macro_paste_none.c
macro_paste_simple.c revert r133003 and fix the bug properly: the issue was that ## in a token 2011-06-14 18:19:37 +00:00
macro_paste_spacing.c
macro_paste_spacing2.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
mi_opt.c
mi_opt.h
mi_opt2.c
mi_opt2.h
microsoft-import.c line endings 2012-03-19 18:47:12 +00:00
missing-system-header.c Change err_pp_file_not_found back to an Error; when it's a Warning, we suppress it in system headers. And it is not a good idea to suppress it in system headers. (This was originally changed in r134996 to implement -MG.) 2011-08-30 23:07:51 +00:00
missing-system-header.h Change err_pp_file_not_found back to an Error; when it's a Warning, we suppress it in system headers. And it is not a good idea to suppress it in system headers. (This was originally changed in r134996 to implement -MG.) 2011-08-30 23:07:51 +00:00
mmx.c Pass a target triple explicitly to check platform specific macros definitions. 2012-05-09 18:49:52 +00:00
non_fragile_feature.m Make -fobjc-nonfragile-abi the -cc1 default, since it's the 2011-10-02 01:16:38 +00:00
non_fragile_feature1.m Rename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstep 2012-07-03 20:49:52 +00:00
objc-pp.m
optimize.c Set __OPTIMIZE_SIZE__ on -Os and -Oz. This matches gcc's behaviour on both OS X 2011-11-26 06:21:20 +00:00
output_paste_avoid.c
overflow.c
pic.c Teach Clang about PIE compilations. This is the first step of PR12380. 2012-04-08 16:40:35 +00:00
pp-record.c [preprocessor] Make sure that MacroExpands callbacks are always in source order. 2012-05-10 18:57:19 +00:00
pp-record.h [preprocessor] Handle correctly inclusion directives that have macro expansions, e.g 2012-03-27 18:47:48 +00:00
pr2086.c
pr2086.h
pragma-pushpop-macro.c fix a bunch of comment typos found by codespell. Patch by 2011-04-15 05:22:18 +00:00
pragma_diagnostic.c
pragma_diagnostic_output.c Copy diagnostic pragmas to the preprocessed output, from Richard Osborne! 2011-06-22 19:41:48 +00:00
pragma_diagnostic_sections.cpp Diagnose uninitialized uses of a variable within its own initializer. 2011-03-27 09:46:56 +00:00
pragma_microsoft.c Adding support for #pragma include_alias in MS compatibility mode. This implements PR 10705. 2012-03-02 22:51:54 +00:00
pragma_poison.c
pragma_sysheader.c Fix tests that weren't actually verifying anything. 2012-04-15 22:09:44 +00:00
pragma_sysheader.h
pragma_unknown.c Rename tok::eom to tok::eod. 2011-02-28 02:37:51 +00:00
predefined-arch-macros.c Wire up -mrdrnd for X86. 2012-07-07 09:39:18 +00:00
predefined-exceptions.m Make -fobjc-nonfragile-abi the -cc1 default, since it's the 2011-10-02 01:16:38 +00:00
predefined-macros.c Define __FINITE_MATH_ONLY__ based on -ffast-math and -ffinite-math-only. 2012-07-19 03:52:53 +00:00
print_line_count.c
print_line_empty_file.c
print_line_track.c
pushable-diagnostics.c
skipping_unclean.c
stdint.c AAPCS compliance - 32-bit wchar_t should be unsigned for both aapcs and aapcs-linux. 2011-11-23 13:35:08 +00:00
stringize_misc.c
stringize_space.c
stringize_space2.c
traditional-cpp.c Lexer: Add extremely limited support for -traditional-cpp, ignoring BCPL 2011-03-18 21:23:38 +00:00
undef-error.c Add pedantic warning -Wempty-translation-unit (C11 6.9p1). 2012-06-06 17:25:21 +00:00
unterminated.c
user_defined_system_framework.c [Lex] Add support for 'user specified system frameworks' (see test case). 2012-04-05 17:10:06 +00:00
warn-disabled-macro-expansion.c Added testcases for -Wdisabled-macro-expansion. 2012-01-03 20:13:03 +00:00
warn-macro-unused.c Reenable test. 2011-07-11 21:58:47 +00:00
warn-macro-unused.h Add missing header file for the test. 2011-07-11 21:58:44 +00:00
warning_tests.c Allow -verify directives to be filtered by preprocessing. 2012-07-11 19:58:23 +00:00
x86_target_features.c rename -ccc-host-triple into -target 2012-01-20 22:01:23 +00:00