Unnamed: 0
int64
0
0
repo_id
stringlengths
5
186
file_path
stringlengths
15
223
content
stringlengths
1
32.8M
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/_Pragma-dependency2.c
// RUN: %clang_cc1 -E %s -verify #define DO_PRAGMA _Pragma DO_PRAGMA ("GCC dependency \"blahblabh\"") // expected-error {{file not found}}
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/missing-system-header.c
// RUN: %clang_cc1 -verify -fsyntax-only %s #include "missing-system-header.h"
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/macro_rescan2.c
// RUN: %clang_cc1 %s -E | grep 'a: 2\*f(9)' // RUN: %clang_cc1 %s -E | grep 'b: 2\*9\*g' #define f(a) a*g #define g f a: f(2)(9) #undef f #undef g #define f(a) a*g #define g(a) f(a) b: f(2)(9)
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/expr_invalid_tok.c
// RUN: not %clang_cc1 -E %s 2>&1 | grep 'invalid token at start of a preprocessor expression' // RUN: not %clang_cc1 -E %s 2>&1 | grep 'token is not a valid binary operator in a preprocessor subexpression' // RUN: not %clang_cc1 -E %s 2>&1 | grep ':14: error: expected end of line in preprocessor expression' // PR2220 #if 1 * * 2 #endif #if 4 [ 2 #endif // PR2284 - The constant-expr production does not including comma. #if 1 ? 2 : 0, 1 #endif
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/macro_paste_simple.c
// RUN: %clang_cc1 %s -E | FileCheck %s #define FOO bar ## baz ## 123 // CHECK: A: barbaz123 A: FOO // PR9981 #define M1(A) A #define M2(X) X B: M1(M2(##)) // CHECK: B: ##
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/macro_space.c
// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s #define FOO1() #define FOO2(x)x #define FOO3(x) x #define FOO4(x)x x #define FOO5(x) x x #define FOO6(x) [x] #define FOO7(x) [ x] #define FOO8(x) [x ] #define TEST(FOO,x) FOO <FOO()> < FOO()> <FOO ()> <FOO( )> <FOO() > <FOO()x> <FOO() x> < FOO()x> TEST(FOO1,) // CHECK: FOO1 <> < > <> <> < > <> < > < > TEST(FOO2,) // CHECK: FOO2 <> < > <> <> < > <> < > < > TEST(FOO3,) // CHECK: FOO3 <> < > <> <> < > <> < > < > TEST(FOO4,) // CHECK: FOO4 < > < > < > < > < > < > < > < > TEST(FOO5,) // CHECK: FOO5 < > < > < > < > < > < > < > < > TEST(FOO6,) // CHECK: FOO6 <[]> < []> <[]> <[]> <[] > <[]> <[] > < []> TEST(FOO7,) // CHECK: FOO7 <[ ]> < [ ]> <[ ]> <[ ]> <[ ] > <[ ]> <[ ] > < [ ]> TEST(FOO8,) // CHECK: FOO8 <[ ]> < [ ]> <[ ]> <[ ]> <[ ] > <[ ]> <[ ] > < [ ]>
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/mi_opt.h
#if !defined foo MACRO #define foo int x = 2; #endif
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/pragma_sysheader.h
#pragma GCC system_header typedef int x; typedef int x;
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/print_line_include.h
int x;
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/import_self.c
// RUN: %clang_cc1 -E -I%S %s | grep BODY_OF_FILE | wc -l | grep 1 // This #import should have no effect, as we're importing the current file. #import <import_self.c> BODY_OF_FILE
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/predefined-arch-macros.c
// Begin X86/GCC/Linux tests ---------------- // // RUN: %clang -march=i386 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_I386_M32 // CHECK_I386_M32: #define __i386 1 // CHECK_I386_M32: #define __i386__ 1 // CHECK_I386_M32: #define __tune_i386__ 1 // CHECK_I386_M32: #define i386 1 // RUN: not %clang -march=i386 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_I386_M64 // CHECK_I386_M64: error: // // RUN: %clang -march=i486 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_I486_M32 // CHECK_I486_M32: #define __i386 1 // CHECK_I486_M32: #define __i386__ 1 // CHECK_I486_M32: #define __i486 1 // CHECK_I486_M32: #define __i486__ 1 // CHECK_I486_M32: #define __tune_i486__ 1 // CHECK_I486_M32: #define i386 1 // RUN: not %clang -march=i486 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_I486_M64 // CHECK_I486_M64: error: // // RUN: %clang -march=i586 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_I586_M32 // CHECK_I586_M32: #define __i386 1 // CHECK_I586_M32: #define __i386__ 1 // CHECK_I586_M32: #define __i586 1 // CHECK_I586_M32: #define __i586__ 1 // CHECK_I586_M32: #define __pentium 1 // CHECK_I586_M32: #define __pentium__ 1 // CHECK_I586_M32: #define __tune_i586__ 1 // CHECK_I586_M32: #define __tune_pentium__ 1 // CHECK_I586_M32: #define i386 1 // RUN: not %clang -march=i586 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_I586_M64 // CHECK_I586_M64: error: // // RUN: %clang -march=pentium -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM_M32 // CHECK_PENTIUM_M32: #define __i386 1 // CHECK_PENTIUM_M32: #define __i386__ 1 // CHECK_PENTIUM_M32: #define __i586 1 // CHECK_PENTIUM_M32: #define __i586__ 1 // CHECK_PENTIUM_M32: #define __pentium 1 // CHECK_PENTIUM_M32: #define __pentium__ 1 // CHECK_PENTIUM_M32: #define __tune_i586__ 1 // CHECK_PENTIUM_M32: #define __tune_pentium__ 1 // CHECK_PENTIUM_M32: #define i386 1 // RUN: not %clang -march=pentium -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM_M64 // CHECK_PENTIUM_M64: error: // // RUN: %clang -march=pentium-mmx -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM_MMX_M32 // CHECK_PENTIUM_MMX_M32: #define __MMX__ 1 // CHECK_PENTIUM_MMX_M32: #define __i386 1 // CHECK_PENTIUM_MMX_M32: #define __i386__ 1 // CHECK_PENTIUM_MMX_M32: #define __i586 1 // CHECK_PENTIUM_MMX_M32: #define __i586__ 1 // CHECK_PENTIUM_MMX_M32: #define __pentium 1 // CHECK_PENTIUM_MMX_M32: #define __pentium__ 1 // CHECK_PENTIUM_MMX_M32: #define __pentium_mmx__ 1 // CHECK_PENTIUM_MMX_M32: #define __tune_i586__ 1 // CHECK_PENTIUM_MMX_M32: #define __tune_pentium__ 1 // CHECK_PENTIUM_MMX_M32: #define __tune_pentium_mmx__ 1 // CHECK_PENTIUM_MMX_M32: #define i386 1 // RUN: not %clang -march=pentium-mmx -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM_MMX_M64 // CHECK_PENTIUM_MMX_M64: error: // // RUN: %clang -march=winchip-c6 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_WINCHIP_C6_M32 // CHECK_WINCHIP_C6_M32: #define __MMX__ 1 // CHECK_WINCHIP_C6_M32: #define __i386 1 // CHECK_WINCHIP_C6_M32: #define __i386__ 1 // CHECK_WINCHIP_C6_M32: #define __i486 1 // CHECK_WINCHIP_C6_M32: #define __i486__ 1 // CHECK_WINCHIP_C6_M32: #define __tune_i486__ 1 // CHECK_WINCHIP_C6_M32: #define i386 1 // RUN: not %clang -march=winchip-c6 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_WINCHIP_C6_M64 // CHECK_WINCHIP_C6_M64: error: // // RUN: %clang -march=winchip2 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_WINCHIP2_M32 // CHECK_WINCHIP2_M32: #define __3dNOW__ 1 // CHECK_WINCHIP2_M32: #define __MMX__ 1 // CHECK_WINCHIP2_M32: #define __i386 1 // CHECK_WINCHIP2_M32: #define __i386__ 1 // CHECK_WINCHIP2_M32: #define __i486 1 // CHECK_WINCHIP2_M32: #define __i486__ 1 // CHECK_WINCHIP2_M32: #define __tune_i486__ 1 // CHECK_WINCHIP2_M32: #define i386 1 // RUN: not %clang -march=winchip2 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_WINCHIP2_M64 // CHECK_WINCHIP2_M64: error: // // RUN: %clang -march=c3 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_C3_M32 // CHECK_C3_M32: #define __3dNOW__ 1 // CHECK_C3_M32: #define __MMX__ 1 // CHECK_C3_M32: #define __i386 1 // CHECK_C3_M32: #define __i386__ 1 // CHECK_C3_M32: #define __i486 1 // CHECK_C3_M32: #define __i486__ 1 // CHECK_C3_M32: #define __tune_i486__ 1 // CHECK_C3_M32: #define i386 1 // RUN: not %clang -march=c3 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_C3_M64 // CHECK_C3_M64: error: // // RUN: %clang -march=c3-2 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_C3_2_M32 // CHECK_C3_2_M32: #define __MMX__ 1 // CHECK_C3_2_M32: #define __SSE__ 1 // CHECK_C3_2_M32: #define __i386 1 // CHECK_C3_2_M32: #define __i386__ 1 // CHECK_C3_2_M32: #define __i686 1 // CHECK_C3_2_M32: #define __i686__ 1 // CHECK_C3_2_M32: #define __pentiumpro 1 // CHECK_C3_2_M32: #define __pentiumpro__ 1 // CHECK_C3_2_M32: #define __tune_i686__ 1 // CHECK_C3_2_M32: #define __tune_pentium2__ 1 // CHECK_C3_2_M32: #define __tune_pentiumpro__ 1 // CHECK_C3_2_M32: #define i386 1 // RUN: not %clang -march=c3-2 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_C3_2_M64 // CHECK_C3_2_M64: error: // // RUN: %clang -march=i686 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_I686_M32 // CHECK_I686_M32: #define __i386 1 // CHECK_I686_M32: #define __i386__ 1 // CHECK_I686_M32: #define __i686 1 // CHECK_I686_M32: #define __i686__ 1 // CHECK_I686_M32: #define __pentiumpro 1 // CHECK_I686_M32: #define __pentiumpro__ 1 // CHECK_I686_M32: #define i386 1 // RUN: not %clang -march=i686 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_I686_M64 // CHECK_I686_M64: error: // // RUN: %clang -march=pentiumpro -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUMPRO_M32 // CHECK_PENTIUMPRO_M32: #define __i386 1 // CHECK_PENTIUMPRO_M32: #define __i386__ 1 // CHECK_PENTIUMPRO_M32: #define __i686 1 // CHECK_PENTIUMPRO_M32: #define __i686__ 1 // CHECK_PENTIUMPRO_M32: #define __pentiumpro 1 // CHECK_PENTIUMPRO_M32: #define __pentiumpro__ 1 // CHECK_PENTIUMPRO_M32: #define __tune_i686__ 1 // CHECK_PENTIUMPRO_M32: #define __tune_pentiumpro__ 1 // CHECK_PENTIUMPRO_M32: #define i386 1 // RUN: not %clang -march=pentiumpro -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUMPRO_M64 // CHECK_PENTIUMPRO_M64: error: // // RUN: %clang -march=pentium2 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM2_M32 // CHECK_PENTIUM2_M32: #define __MMX__ 1 // CHECK_PENTIUM2_M32: #define __i386 1 // CHECK_PENTIUM2_M32: #define __i386__ 1 // CHECK_PENTIUM2_M32: #define __i686 1 // CHECK_PENTIUM2_M32: #define __i686__ 1 // CHECK_PENTIUM2_M32: #define __pentiumpro 1 // CHECK_PENTIUM2_M32: #define __pentiumpro__ 1 // CHECK_PENTIUM2_M32: #define __tune_i686__ 1 // CHECK_PENTIUM2_M32: #define __tune_pentium2__ 1 // CHECK_PENTIUM2_M32: #define __tune_pentiumpro__ 1 // CHECK_PENTIUM2_M32: #define i386 1 // RUN: not %clang -march=pentium2 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM2_M64 // CHECK_PENTIUM2_M64: error: // // RUN: %clang -march=pentium3 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM3_M32 // CHECK_PENTIUM3_M32: #define __MMX__ 1 // CHECK_PENTIUM3_M32: #define __SSE__ 1 // CHECK_PENTIUM3_M32: #define __i386 1 // CHECK_PENTIUM3_M32: #define __i386__ 1 // CHECK_PENTIUM3_M32: #define __i686 1 // CHECK_PENTIUM3_M32: #define __i686__ 1 // CHECK_PENTIUM3_M32: #define __pentiumpro 1 // CHECK_PENTIUM3_M32: #define __pentiumpro__ 1 // CHECK_PENTIUM3_M32: #define __tune_i686__ 1 // CHECK_PENTIUM3_M32: #define __tune_pentium2__ 1 // CHECK_PENTIUM3_M32: #define __tune_pentium3__ 1 // CHECK_PENTIUM3_M32: #define __tune_pentiumpro__ 1 // CHECK_PENTIUM3_M32: #define i386 1 // RUN: not %clang -march=pentium3 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM3_M64 // CHECK_PENTIUM3_M64: error: // // RUN: %clang -march=pentium3m -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM3M_M32 // CHECK_PENTIUM3M_M32: #define __MMX__ 1 // CHECK_PENTIUM3M_M32: #define __SSE__ 1 // CHECK_PENTIUM3M_M32: #define __i386 1 // CHECK_PENTIUM3M_M32: #define __i386__ 1 // CHECK_PENTIUM3M_M32: #define __i686 1 // CHECK_PENTIUM3M_M32: #define __i686__ 1 // CHECK_PENTIUM3M_M32: #define __pentiumpro 1 // CHECK_PENTIUM3M_M32: #define __pentiumpro__ 1 // CHECK_PENTIUM3M_M32: #define __tune_i686__ 1 // CHECK_PENTIUM3M_M32: #define __tune_pentiumpro__ 1 // CHECK_PENTIUM3M_M32: #define i386 1 // RUN: not %clang -march=pentium3m -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM3M_M64 // CHECK_PENTIUM3M_M64: error: // // RUN: %clang -march=pentium-m -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM_M_M32 // CHECK_PENTIUM_M_M32: #define __MMX__ 1 // CHECK_PENTIUM_M_M32: #define __SSE2__ 1 // CHECK_PENTIUM_M_M32: #define __SSE__ 1 // CHECK_PENTIUM_M_M32: #define __i386 1 // CHECK_PENTIUM_M_M32: #define __i386__ 1 // CHECK_PENTIUM_M_M32: #define __i686 1 // CHECK_PENTIUM_M_M32: #define __i686__ 1 // CHECK_PENTIUM_M_M32: #define __pentiumpro 1 // CHECK_PENTIUM_M_M32: #define __pentiumpro__ 1 // CHECK_PENTIUM_M_M32: #define __tune_i686__ 1 // CHECK_PENTIUM_M_M32: #define __tune_pentiumpro__ 1 // CHECK_PENTIUM_M_M32: #define i386 1 // RUN: not %clang -march=pentium-m -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM_M_M64 // CHECK_PENTIUM_M_M64: error: // // RUN: %clang -march=pentium4 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM4_M32 // CHECK_PENTIUM4_M32: #define __MMX__ 1 // CHECK_PENTIUM4_M32: #define __SSE2__ 1 // CHECK_PENTIUM4_M32: #define __SSE__ 1 // CHECK_PENTIUM4_M32: #define __i386 1 // CHECK_PENTIUM4_M32: #define __i386__ 1 // CHECK_PENTIUM4_M32: #define __pentium4 1 // CHECK_PENTIUM4_M32: #define __pentium4__ 1 // CHECK_PENTIUM4_M32: #define __tune_pentium4__ 1 // CHECK_PENTIUM4_M32: #define i386 1 // RUN: not %clang -march=pentium4 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM4_M64 // CHECK_PENTIUM4_M64: error: // // RUN: %clang -march=pentium4m -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM4M_M32 // CHECK_PENTIUM4M_M32: #define __MMX__ 1 // CHECK_PENTIUM4M_M32: #define __SSE2__ 1 // CHECK_PENTIUM4M_M32: #define __SSE__ 1 // CHECK_PENTIUM4M_M32: #define __i386 1 // CHECK_PENTIUM4M_M32: #define __i386__ 1 // CHECK_PENTIUM4M_M32: #define __pentium4 1 // CHECK_PENTIUM4M_M32: #define __pentium4__ 1 // CHECK_PENTIUM4M_M32: #define __tune_pentium4__ 1 // CHECK_PENTIUM4M_M32: #define i386 1 // RUN: not %clang -march=pentium4m -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM4M_M64 // CHECK_PENTIUM4M_M64: error: // // RUN: %clang -march=prescott -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PRESCOTT_M32 // CHECK_PRESCOTT_M32: #define __MMX__ 1 // CHECK_PRESCOTT_M32: #define __SSE2__ 1 // CHECK_PRESCOTT_M32: #define __SSE3__ 1 // CHECK_PRESCOTT_M32: #define __SSE__ 1 // CHECK_PRESCOTT_M32: #define __i386 1 // CHECK_PRESCOTT_M32: #define __i386__ 1 // CHECK_PRESCOTT_M32: #define __nocona 1 // CHECK_PRESCOTT_M32: #define __nocona__ 1 // CHECK_PRESCOTT_M32: #define __tune_nocona__ 1 // CHECK_PRESCOTT_M32: #define i386 1 // RUN: not %clang -march=prescott -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PRESCOTT_M64 // CHECK_PRESCOTT_M64: error: // // RUN: %clang -march=nocona -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_NOCONA_M32 // CHECK_NOCONA_M32: #define __MMX__ 1 // CHECK_NOCONA_M32: #define __SSE2__ 1 // CHECK_NOCONA_M32: #define __SSE3__ 1 // CHECK_NOCONA_M32: #define __SSE__ 1 // CHECK_NOCONA_M32: #define __i386 1 // CHECK_NOCONA_M32: #define __i386__ 1 // CHECK_NOCONA_M32: #define __nocona 1 // CHECK_NOCONA_M32: #define __nocona__ 1 // CHECK_NOCONA_M32: #define __tune_nocona__ 1 // CHECK_NOCONA_M32: #define i386 1 // RUN: %clang -march=nocona -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_NOCONA_M64 // CHECK_NOCONA_M64: #define __MMX__ 1 // CHECK_NOCONA_M64: #define __SSE2_MATH__ 1 // CHECK_NOCONA_M64: #define __SSE2__ 1 // CHECK_NOCONA_M64: #define __SSE3__ 1 // CHECK_NOCONA_M64: #define __SSE_MATH__ 1 // CHECK_NOCONA_M64: #define __SSE__ 1 // CHECK_NOCONA_M64: #define __amd64 1 // CHECK_NOCONA_M64: #define __amd64__ 1 // CHECK_NOCONA_M64: #define __nocona 1 // CHECK_NOCONA_M64: #define __nocona__ 1 // CHECK_NOCONA_M64: #define __tune_nocona__ 1 // CHECK_NOCONA_M64: #define __x86_64 1 // CHECK_NOCONA_M64: #define __x86_64__ 1 // // RUN: %clang -march=core2 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_CORE2_M32 // CHECK_CORE2_M32: #define __MMX__ 1 // CHECK_CORE2_M32: #define __SSE2__ 1 // CHECK_CORE2_M32: #define __SSE3__ 1 // CHECK_CORE2_M32: #define __SSE__ 1 // CHECK_CORE2_M32: #define __SSSE3__ 1 // CHECK_CORE2_M32: #define __core2 1 // CHECK_CORE2_M32: #define __core2__ 1 // CHECK_CORE2_M32: #define __i386 1 // CHECK_CORE2_M32: #define __i386__ 1 // CHECK_CORE2_M32: #define __tune_core2__ 1 // CHECK_CORE2_M32: #define i386 1 // RUN: %clang -march=core2 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_CORE2_M64 // CHECK_CORE2_M64: #define __MMX__ 1 // CHECK_CORE2_M64: #define __SSE2_MATH__ 1 // CHECK_CORE2_M64: #define __SSE2__ 1 // CHECK_CORE2_M64: #define __SSE3__ 1 // CHECK_CORE2_M64: #define __SSE_MATH__ 1 // CHECK_CORE2_M64: #define __SSE__ 1 // CHECK_CORE2_M64: #define __SSSE3__ 1 // CHECK_CORE2_M64: #define __amd64 1 // CHECK_CORE2_M64: #define __amd64__ 1 // CHECK_CORE2_M64: #define __core2 1 // CHECK_CORE2_M64: #define __core2__ 1 // CHECK_CORE2_M64: #define __tune_core2__ 1 // CHECK_CORE2_M64: #define __x86_64 1 // CHECK_CORE2_M64: #define __x86_64__ 1 // // RUN: %clang -march=corei7 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_COREI7_M32 // CHECK_COREI7_M32: #define __MMX__ 1 // CHECK_COREI7_M32: #define __POPCNT__ 1 // CHECK_COREI7_M32: #define __SSE2__ 1 // CHECK_COREI7_M32: #define __SSE3__ 1 // CHECK_COREI7_M32: #define __SSE4_1__ 1 // CHECK_COREI7_M32: #define __SSE4_2__ 1 // CHECK_COREI7_M32: #define __SSE__ 1 // CHECK_COREI7_M32: #define __SSSE3__ 1 // CHECK_COREI7_M32: #define __corei7 1 // CHECK_COREI7_M32: #define __corei7__ 1 // CHECK_COREI7_M32: #define __i386 1 // CHECK_COREI7_M32: #define __i386__ 1 // CHECK_COREI7_M32: #define __tune_corei7__ 1 // CHECK_COREI7_M32: #define i386 1 // RUN: %clang -march=corei7 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_COREI7_M64 // CHECK_COREI7_M64: #define __MMX__ 1 // CHECK_COREI7_M64: #define __POPCNT__ 1 // CHECK_COREI7_M64: #define __SSE2_MATH__ 1 // CHECK_COREI7_M64: #define __SSE2__ 1 // CHECK_COREI7_M64: #define __SSE3__ 1 // CHECK_COREI7_M64: #define __SSE4_1__ 1 // CHECK_COREI7_M64: #define __SSE4_2__ 1 // CHECK_COREI7_M64: #define __SSE_MATH__ 1 // CHECK_COREI7_M64: #define __SSE__ 1 // CHECK_COREI7_M64: #define __SSSE3__ 1 // CHECK_COREI7_M64: #define __amd64 1 // CHECK_COREI7_M64: #define __amd64__ 1 // CHECK_COREI7_M64: #define __corei7 1 // CHECK_COREI7_M64: #define __corei7__ 1 // CHECK_COREI7_M64: #define __tune_corei7__ 1 // CHECK_COREI7_M64: #define __x86_64 1 // CHECK_COREI7_M64: #define __x86_64__ 1 // // RUN: %clang -march=corei7-avx -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_COREI7_AVX_M32 // CHECK_COREI7_AVX_M32: #define __AES__ 1 // CHECK_COREI7_AVX_M32: #define __AVX__ 1 // CHECK_COREI7_AVX_M32: #define __MMX__ 1 // CHECK_COREI7_AVX_M32: #define __PCLMUL__ 1 // CHECK_COREI7_AVX_M32-NOT: __RDRND__ // CHECK_COREI7_AVX_M32: #define __POPCNT__ 1 // CHECK_COREI7_AVX_M32: #define __SSE2__ 1 // CHECK_COREI7_AVX_M32: #define __SSE3__ 1 // CHECK_COREI7_AVX_M32: #define __SSE4_1__ 1 // CHECK_COREI7_AVX_M32: #define __SSE4_2__ 1 // CHECK_COREI7_AVX_M32: #define __SSE__ 1 // CHECK_COREI7_AVX_M32: #define __SSSE3__ 1 // CHECK_COREI7_AVX_M32: #define __corei7 1 // CHECK_COREI7_AVX_M32: #define __corei7__ 1 // CHECK_COREI7_AVX_M32: #define __i386 1 // CHECK_COREI7_AVX_M32: #define __i386__ 1 // CHECK_COREI7_AVX_M32: #define __tune_corei7__ 1 // CHECK_COREI7_AVX_M32: #define i386 1 // RUN: %clang -march=corei7-avx -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_COREI7_AVX_M64 // CHECK_COREI7_AVX_M64: #define __AES__ 1 // CHECK_COREI7_AVX_M64: #define __AVX__ 1 // CHECK_COREI7_AVX_M64: #define __MMX__ 1 // CHECK_COREI7_AVX_M64: #define __PCLMUL__ 1 // CHECK_COREI7_AVX_M64-NOT: __RDRND__ // CHECK_COREI7_AVX_M64: #define __POPCNT__ 1 // CHECK_COREI7_AVX_M64: #define __SSE2_MATH__ 1 // CHECK_COREI7_AVX_M64: #define __SSE2__ 1 // CHECK_COREI7_AVX_M64: #define __SSE3__ 1 // CHECK_COREI7_AVX_M64: #define __SSE4_1__ 1 // CHECK_COREI7_AVX_M64: #define __SSE4_2__ 1 // CHECK_COREI7_AVX_M64: #define __SSE_MATH__ 1 // CHECK_COREI7_AVX_M64: #define __SSE__ 1 // CHECK_COREI7_AVX_M64: #define __SSSE3__ 1 // CHECK_COREI7_AVX_M64: #define __amd64 1 // CHECK_COREI7_AVX_M64: #define __amd64__ 1 // CHECK_COREI7_AVX_M64: #define __corei7 1 // CHECK_COREI7_AVX_M64: #define __corei7__ 1 // CHECK_COREI7_AVX_M64: #define __tune_corei7__ 1 // CHECK_COREI7_AVX_M64: #define __x86_64 1 // CHECK_COREI7_AVX_M64: #define __x86_64__ 1 // // RUN: %clang -march=core-avx-i -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_CORE_AVX_I_M32 // CHECK_CORE_AVX_I_M32: #define __AES__ 1 // CHECK_CORE_AVX_I_M32: #define __AVX__ 1 // CHECK_CORE_AVX_I_M32: #define __F16C__ 1 // CHECK_CORE_AVX_I_M32: #define __MMX__ 1 // CHECK_CORE_AVX_I_M32: #define __PCLMUL__ 1 // CHECK_CORE_AVX_I_M32: #define __RDRND__ 1 // CHECK_CORE_AVX_I_M32: #define __SSE2__ 1 // CHECK_CORE_AVX_I_M32: #define __SSE3__ 1 // CHECK_CORE_AVX_I_M32: #define __SSE4_1__ 1 // CHECK_CORE_AVX_I_M32: #define __SSE4_2__ 1 // CHECK_CORE_AVX_I_M32: #define __SSE__ 1 // CHECK_CORE_AVX_I_M32: #define __SSSE3__ 1 // CHECK_CORE_AVX_I_M32: #define __corei7 1 // CHECK_CORE_AVX_I_M32: #define __corei7__ 1 // CHECK_CORE_AVX_I_M32: #define __i386 1 // CHECK_CORE_AVX_I_M32: #define __i386__ 1 // CHECK_CORE_AVX_I_M32: #define __tune_corei7__ 1 // CHECK_CORE_AVX_I_M32: #define i386 1 // RUN: %clang -march=core-avx-i -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_CORE_AVX_I_M64 // CHECK_CORE_AVX_I_M64: #define __AES__ 1 // CHECK_CORE_AVX_I_M64: #define __AVX__ 1 // CHECK_CORE_AVX_I_M64: #define __F16C__ 1 // CHECK_CORE_AVX_I_M64: #define __MMX__ 1 // CHECK_CORE_AVX_I_M64: #define __PCLMUL__ 1 // CHECK_CORE_AVX_I_M64: #define __RDRND__ 1 // CHECK_CORE_AVX_I_M64: #define __SSE2_MATH__ 1 // CHECK_CORE_AVX_I_M64: #define __SSE2__ 1 // CHECK_CORE_AVX_I_M64: #define __SSE3__ 1 // CHECK_CORE_AVX_I_M64: #define __SSE4_1__ 1 // CHECK_CORE_AVX_I_M64: #define __SSE4_2__ 1 // CHECK_CORE_AVX_I_M64: #define __SSE_MATH__ 1 // CHECK_CORE_AVX_I_M64: #define __SSE__ 1 // CHECK_CORE_AVX_I_M64: #define __SSSE3__ 1 // CHECK_CORE_AVX_I_M64: #define __amd64 1 // CHECK_CORE_AVX_I_M64: #define __amd64__ 1 // CHECK_CORE_AVX_I_M64: #define __corei7 1 // CHECK_CORE_AVX_I_M64: #define __corei7__ 1 // CHECK_CORE_AVX_I_M64: #define __tune_corei7__ 1 // CHECK_CORE_AVX_I_M64: #define __x86_64 1 // CHECK_CORE_AVX_I_M64: #define __x86_64__ 1 // // RUN: %clang -march=core-avx2 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_CORE_AVX2_M32 // CHECK_CORE_AVX2_M32: #define __AES__ 1 // CHECK_CORE_AVX2_M32: #define __AVX2__ 1 // CHECK_CORE_AVX2_M32: #define __AVX__ 1 // CHECK_CORE_AVX2_M32: #define __BMI2__ 1 // CHECK_CORE_AVX2_M32: #define __BMI__ 1 // CHECK_CORE_AVX2_M32: #define __F16C__ 1 // CHECK_CORE_AVX2_M32: #define __FMA__ 1 // CHECK_CORE_AVX2_M32: #define __LZCNT__ 1 // CHECK_CORE_AVX2_M32: #define __MMX__ 1 // CHECK_CORE_AVX2_M32: #define __PCLMUL__ 1 // CHECK_CORE_AVX2_M32: #define __POPCNT__ 1 // CHECK_CORE_AVX2_M32: #define __RDRND__ 1 // CHECK_CORE_AVX2_M32: #define __RTM__ 1 // CHECK_CORE_AVX2_M32: #define __SSE2__ 1 // CHECK_CORE_AVX2_M32: #define __SSE3__ 1 // CHECK_CORE_AVX2_M32: #define __SSE4_1__ 1 // CHECK_CORE_AVX2_M32: #define __SSE4_2__ 1 // CHECK_CORE_AVX2_M32: #define __SSE__ 1 // CHECK_CORE_AVX2_M32: #define __SSSE3__ 1 // CHECK_CORE_AVX2_M32: #define __corei7 1 // CHECK_CORE_AVX2_M32: #define __corei7__ 1 // CHECK_CORE_AVX2_M32: #define __i386 1 // CHECK_CORE_AVX2_M32: #define __i386__ 1 // CHECK_CORE_AVX2_M32: #define __tune_corei7__ 1 // CHECK_CORE_AVX2_M32: #define i386 1 // RUN: %clang -march=core-avx2 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_CORE_AVX2_M64 // CHECK_CORE_AVX2_M64: #define __AES__ 1 // CHECK_CORE_AVX2_M64: #define __AVX2__ 1 // CHECK_CORE_AVX2_M64: #define __AVX__ 1 // CHECK_CORE_AVX2_M64: #define __BMI2__ 1 // CHECK_CORE_AVX2_M64: #define __BMI__ 1 // CHECK_CORE_AVX2_M64: #define __F16C__ 1 // CHECK_CORE_AVX2_M64: #define __FMA__ 1 // CHECK_CORE_AVX2_M64: #define __LZCNT__ 1 // CHECK_CORE_AVX2_M64: #define __MMX__ 1 // CHECK_CORE_AVX2_M64: #define __PCLMUL__ 1 // CHECK_CORE_AVX2_M64: #define __POPCNT__ 1 // CHECK_CORE_AVX2_M64: #define __RDRND__ 1 // CHECK_CORE_AVX2_M64: #define __RTM__ 1 // CHECK_CORE_AVX2_M64: #define __SSE2_MATH__ 1 // CHECK_CORE_AVX2_M64: #define __SSE2__ 1 // CHECK_CORE_AVX2_M64: #define __SSE3__ 1 // CHECK_CORE_AVX2_M64: #define __SSE4_1__ 1 // CHECK_CORE_AVX2_M64: #define __SSE4_2__ 1 // CHECK_CORE_AVX2_M64: #define __SSE_MATH__ 1 // CHECK_CORE_AVX2_M64: #define __SSE__ 1 // CHECK_CORE_AVX2_M64: #define __SSSE3__ 1 // CHECK_CORE_AVX2_M64: #define __amd64 1 // CHECK_CORE_AVX2_M64: #define __amd64__ 1 // CHECK_CORE_AVX2_M64: #define __corei7 1 // CHECK_CORE_AVX2_M64: #define __corei7__ 1 // CHECK_CORE_AVX2_M64: #define __tune_corei7__ 1 // CHECK_CORE_AVX2_M64: #define __x86_64 1 // CHECK_CORE_AVX2_M64: #define __x86_64__ 1 // // RUN: %clang -march=broadwell -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_BROADWELL_M32 // CHECK_BROADWELL_M32: #define __ADX__ 1 // CHECK_BROADWELL_M32: #define __AES__ 1 // CHECK_BROADWELL_M32: #define __AVX2__ 1 // CHECK_BROADWELL_M32: #define __AVX__ 1 // CHECK_BROADWELL_M32: #define __BMI2__ 1 // CHECK_BROADWELL_M32: #define __BMI__ 1 // CHECK_BROADWELL_M32: #define __F16C__ 1 // CHECK_BROADWELL_M32: #define __FMA__ 1 // CHECK_BROADWELL_M32: #define __LZCNT__ 1 // CHECK_BROADWELL_M32: #define __MMX__ 1 // CHECK_BROADWELL_M32: #define __PCLMUL__ 1 // CHECK_BROADWELL_M32: #define __POPCNT__ 1 // CHECK_BROADWELL_M32: #define __RDRND__ 1 // CHECK_BROADWELL_M32: #define __RDSEED__ 1 // CHECK_BROADWELL_M32: #define __RTM__ 1 // CHECK_BROADWELL_M32: #define __SSE2__ 1 // CHECK_BROADWELL_M32: #define __SSE3__ 1 // CHECK_BROADWELL_M32: #define __SSE4_1__ 1 // CHECK_BROADWELL_M32: #define __SSE4_2__ 1 // CHECK_BROADWELL_M32: #define __SSE__ 1 // CHECK_BROADWELL_M32: #define __SSSE3__ 1 // CHECK_BROADWELL_M32: #define __corei7 1 // CHECK_BROADWELL_M32: #define __corei7__ 1 // CHECK_BROADWELL_M32: #define __i386 1 // CHECK_BROADWELL_M32: #define __i386__ 1 // CHECK_BROADWELL_M32: #define __tune_corei7__ 1 // CHECK_BROADWELL_M32: #define i386 1 // RUN: %clang -march=broadwell -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_BROADWELL_M64 // CHECK_BROADWELL_M64: #define __ADX__ 1 // CHECK_BROADWELL_M64: #define __AES__ 1 // CHECK_BROADWELL_M64: #define __AVX2__ 1 // CHECK_BROADWELL_M64: #define __AVX__ 1 // CHECK_BROADWELL_M64: #define __BMI2__ 1 // CHECK_BROADWELL_M64: #define __BMI__ 1 // CHECK_BROADWELL_M64: #define __F16C__ 1 // CHECK_BROADWELL_M64: #define __FMA__ 1 // CHECK_BROADWELL_M64: #define __LZCNT__ 1 // CHECK_BROADWELL_M64: #define __MMX__ 1 // CHECK_BROADWELL_M64: #define __PCLMUL__ 1 // CHECK_BROADWELL_M64: #define __POPCNT__ 1 // CHECK_BROADWELL_M64: #define __RDRND__ 1 // CHECK_BROADWELL_M64: #define __RDSEED__ 1 // CHECK_BROADWELL_M64: #define __RTM__ 1 // CHECK_BROADWELL_M64: #define __SSE2_MATH__ 1 // CHECK_BROADWELL_M64: #define __SSE2__ 1 // CHECK_BROADWELL_M64: #define __SSE3__ 1 // CHECK_BROADWELL_M64: #define __SSE4_1__ 1 // CHECK_BROADWELL_M64: #define __SSE4_2__ 1 // CHECK_BROADWELL_M64: #define __SSE_MATH__ 1 // CHECK_BROADWELL_M64: #define __SSE__ 1 // CHECK_BROADWELL_M64: #define __SSSE3__ 1 // CHECK_BROADWELL_M64: #define __amd64 1 // CHECK_BROADWELL_M64: #define __amd64__ 1 // CHECK_BROADWELL_M64: #define __corei7 1 // CHECK_BROADWELL_M64: #define __corei7__ 1 // CHECK_BROADWELL_M64: #define __tune_corei7__ 1 // CHECK_BROADWELL_M64: #define __x86_64 1 // CHECK_BROADWELL_M64: #define __x86_64__ 1 // // RUN: %clang -march=knl -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_KNL_M32 // CHECK_KNL_M32: #define __AES__ 1 // CHECK_KNL_M32: #define __AVX2__ 1 // CHECK_KNL_M32: #define __AVX512CD__ 1 // CHECK_KNL_M32: #define __AVX512ER__ 1 // CHECK_KNL_M32: #define __AVX512F__ 1 // CHECK_KNL_M32: #define __AVX512PF__ 1 // CHECK_KNL_M32: #define __AVX__ 1 // CHECK_KNL_M32: #define __BMI2__ 1 // CHECK_KNL_M32: #define __BMI__ 1 // CHECK_KNL_M32: #define __F16C__ 1 // CHECK_KNL_M32: #define __FMA__ 1 // CHECK_KNL_M32: #define __LZCNT__ 1 // CHECK_KNL_M32: #define __MMX__ 1 // CHECK_KNL_M32: #define __PCLMUL__ 1 // CHECK_KNL_M32: #define __POPCNT__ 1 // CHECK_KNL_M32: #define __RDRND__ 1 // CHECK_KNL_M32: #define __RTM__ 1 // CHECK_KNL_M32: #define __SSE2__ 1 // CHECK_KNL_M32: #define __SSE3__ 1 // CHECK_KNL_M32: #define __SSE4_1__ 1 // CHECK_KNL_M32: #define __SSE4_2__ 1 // CHECK_KNL_M32: #define __SSE__ 1 // CHECK_KNL_M32: #define __SSSE3__ 1 // CHECK_KNL_M32: #define __i386 1 // CHECK_KNL_M32: #define __i386__ 1 // CHECK_KNL_M32: #define __knl 1 // CHECK_KNL_M32: #define __knl__ 1 // CHECK_KNL_M32: #define __tune_knl__ 1 // CHECK_KNL_M32: #define i386 1 // RUN: %clang -march=knl -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_KNL_M64 // CHECK_KNL_M64: #define __AES__ 1 // CHECK_KNL_M64: #define __AVX2__ 1 // CHECK_KNL_M64: #define __AVX512CD__ 1 // CHECK_KNL_M64: #define __AVX512ER__ 1 // CHECK_KNL_M64: #define __AVX512F__ 1 // CHECK_KNL_M64: #define __AVX512PF__ 1 // CHECK_KNL_M64: #define __AVX__ 1 // CHECK_KNL_M64: #define __BMI2__ 1 // CHECK_KNL_M64: #define __BMI__ 1 // CHECK_KNL_M64: #define __F16C__ 1 // CHECK_KNL_M64: #define __FMA__ 1 // CHECK_KNL_M64: #define __LZCNT__ 1 // CHECK_KNL_M64: #define __MMX__ 1 // CHECK_KNL_M64: #define __PCLMUL__ 1 // CHECK_KNL_M64: #define __POPCNT__ 1 // CHECK_KNL_M64: #define __RDRND__ 1 // CHECK_KNL_M64: #define __RTM__ 1 // CHECK_KNL_M64: #define __SSE2_MATH__ 1 // CHECK_KNL_M64: #define __SSE2__ 1 // CHECK_KNL_M64: #define __SSE3__ 1 // CHECK_KNL_M64: #define __SSE4_1__ 1 // CHECK_KNL_M64: #define __SSE4_2__ 1 // CHECK_KNL_M64: #define __SSE_MATH__ 1 // CHECK_KNL_M64: #define __SSE__ 1 // CHECK_KNL_M64: #define __SSSE3__ 1 // CHECK_KNL_M64: #define __amd64 1 // CHECK_KNL_M64: #define __amd64__ 1 // CHECK_KNL_M64: #define __knl 1 // CHECK_KNL_M64: #define __knl__ 1 // CHECK_KNL_M64: #define __tune_knl__ 1 // CHECK_KNL_M64: #define __x86_64 1 // CHECK_KNL_M64: #define __x86_64__ 1 // // RUN: %clang -march=skx -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_SKX_M32 // CHECK_SKX_M32: #define __AES__ 1 // CHECK_SKX_M32: #define __AVX2__ 1 // CHECK_SKX_M32: #define __AVX512BW__ 1 // CHECK_SKX_M32: #define __AVX512CD__ 1 // CHECK_SKX_M32: #define __AVX512DQ__ 1 // CHECK_SKX_M32: #define __AVX512F__ 1 // CHECK_SKX_M32: #define __AVX512VL__ 1 // CHECK_SKX_M32: #define __AVX__ 1 // CHECK_SKX_M32: #define __BMI2__ 1 // CHECK_SKX_M32: #define __BMI__ 1 // CHECK_SKX_M32: #define __F16C__ 1 // CHECK_SKX_M32: #define __FMA__ 1 // CHECK_SKX_M32: #define __LZCNT__ 1 // CHECK_SKX_M32: #define __MMX__ 1 // CHECK_SKX_M32: #define __PCLMUL__ 1 // CHECK_SKX_M32: #define __POPCNT__ 1 // CHECK_SKX_M32: #define __RDRND__ 1 // CHECK_SKX_M32: #define __RTM__ 1 // CHECK_SKX_M32: #define __SSE2__ 1 // CHECK_SKX_M32: #define __SSE3__ 1 // CHECK_SKX_M32: #define __SSE4_1__ 1 // CHECK_SKX_M32: #define __SSE4_2__ 1 // CHECK_SKX_M32: #define __SSE__ 1 // CHECK_SKX_M32: #define __SSSE3__ 1 // CHECK_SKX_M32: #define __i386 1 // CHECK_SKX_M32: #define __i386__ 1 // CHECK_SKX_M32: #define __skx 1 // CHECK_SKX_M32: #define __skx__ 1 // CHECK_SKX_M32: #define __tune_skx__ 1 // CHECK_SKX_M32: #define i386 1 // RUN: %clang -march=skx -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_SKX_M64 // CHECK_SKX_M64: #define __AES__ 1 // CHECK_SKX_M64: #define __AVX2__ 1 // CHECK_SKX_M64: #define __AVX512BW__ 1 // CHECK_SKX_M64: #define __AVX512CD__ 1 // CHECK_SKX_M64: #define __AVX512DQ__ 1 // CHECK_SKX_M64: #define __AVX512F__ 1 // CHECK_SKX_M64: #define __AVX512VL__ 1 // CHECK_SKX_M64: #define __AVX__ 1 // CHECK_SKX_M64: #define __BMI2__ 1 // CHECK_SKX_M64: #define __BMI__ 1 // CHECK_SKX_M64: #define __F16C__ 1 // CHECK_SKX_M64: #define __FMA__ 1 // CHECK_SKX_M64: #define __LZCNT__ 1 // CHECK_SKX_M64: #define __MMX__ 1 // CHECK_SKX_M64: #define __PCLMUL__ 1 // CHECK_SKX_M64: #define __POPCNT__ 1 // CHECK_SKX_M64: #define __RDRND__ 1 // CHECK_SKX_M64: #define __RTM__ 1 // CHECK_SKX_M64: #define __SSE2_MATH__ 1 // CHECK_SKX_M64: #define __SSE2__ 1 // CHECK_SKX_M64: #define __SSE3__ 1 // CHECK_SKX_M64: #define __SSE4_1__ 1 // CHECK_SKX_M64: #define __SSE4_2__ 1 // CHECK_SKX_M64: #define __SSE_MATH__ 1 // CHECK_SKX_M64: #define __SSE__ 1 // CHECK_SKX_M64: #define __SSSE3__ 1 // CHECK_SKX_M64: #define __amd64 1 // CHECK_SKX_M64: #define __amd64__ 1 // CHECK_SKX_M64: #define __skx 1 // CHECK_SKX_M64: #define __skx__ 1 // CHECK_SKX_M64: #define __tune_skx__ 1 // CHECK_SKX_M64: #define __x86_64 1 // CHECK_SKX_M64: #define __x86_64__ 1 // // RUN: %clang -march=atom -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATOM_M32 // CHECK_ATOM_M32: #define __MMX__ 1 // CHECK_ATOM_M32: #define __SSE2__ 1 // CHECK_ATOM_M32: #define __SSE3__ 1 // CHECK_ATOM_M32: #define __SSE__ 1 // CHECK_ATOM_M32: #define __SSSE3__ 1 // CHECK_ATOM_M32: #define __atom 1 // CHECK_ATOM_M32: #define __atom__ 1 // CHECK_ATOM_M32: #define __i386 1 // CHECK_ATOM_M32: #define __i386__ 1 // CHECK_ATOM_M32: #define __tune_atom__ 1 // CHECK_ATOM_M32: #define i386 1 // RUN: %clang -march=atom -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATOM_M64 // CHECK_ATOM_M64: #define __MMX__ 1 // CHECK_ATOM_M64: #define __SSE2_MATH__ 1 // CHECK_ATOM_M64: #define __SSE2__ 1 // CHECK_ATOM_M64: #define __SSE3__ 1 // CHECK_ATOM_M64: #define __SSE_MATH__ 1 // CHECK_ATOM_M64: #define __SSE__ 1 // CHECK_ATOM_M64: #define __SSSE3__ 1 // CHECK_ATOM_M64: #define __amd64 1 // CHECK_ATOM_M64: #define __amd64__ 1 // CHECK_ATOM_M64: #define __atom 1 // CHECK_ATOM_M64: #define __atom__ 1 // CHECK_ATOM_M64: #define __tune_atom__ 1 // CHECK_ATOM_M64: #define __x86_64 1 // CHECK_ATOM_M64: #define __x86_64__ 1 // // RUN: %clang -march=slm -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_SLM_M32 // CHECK_SLM_M32: #define __MMX__ 1 // CHECK_SLM_M32: #define __SSE2__ 1 // CHECK_SLM_M32: #define __SSE3__ 1 // CHECK_SLM_M32: #define __SSE4_1__ 1 // CHECK_SLM_M32: #define __SSE4_2__ 1 // CHECK_SLM_M32: #define __SSE__ 1 // CHECK_SLM_M32: #define __SSSE3__ 1 // CHECK_SLM_M32: #define __i386 1 // CHECK_SLM_M32: #define __i386__ 1 // CHECK_SLM_M32: #define __slm 1 // CHECK_SLM_M32: #define __slm__ 1 // CHECK_SLM_M32: #define __tune_slm__ 1 // CHECK_SLM_M32: #define i386 1 // RUN: %clang -march=slm -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_SLM_M64 // CHECK_SLM_M64: #define __MMX__ 1 // CHECK_SLM_M64: #define __SSE2_MATH__ 1 // CHECK_SLM_M64: #define __SSE2__ 1 // CHECK_SLM_M64: #define __SSE3__ 1 // CHECK_SLM_M64: #define __SSE4_1__ 1 // CHECK_SLM_M64: #define __SSE4_2__ 1 // CHECK_SLM_M64: #define __SSE_MATH__ 1 // CHECK_SLM_M64: #define __SSE__ 1 // CHECK_SLM_M64: #define __SSSE3__ 1 // CHECK_SLM_M64: #define __amd64 1 // CHECK_SLM_M64: #define __amd64__ 1 // CHECK_SLM_M64: #define __slm 1 // CHECK_SLM_M64: #define __slm__ 1 // CHECK_SLM_M64: #define __tune_slm__ 1 // CHECK_SLM_M64: #define __x86_64 1 // CHECK_SLM_M64: #define __x86_64__ 1 // // RUN: %clang -march=geode -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_GEODE_M32 // CHECK_GEODE_M32: #define __3dNOW_A__ 1 // CHECK_GEODE_M32: #define __3dNOW__ 1 // CHECK_GEODE_M32: #define __MMX__ 1 // CHECK_GEODE_M32: #define __geode 1 // CHECK_GEODE_M32: #define __geode__ 1 // CHECK_GEODE_M32: #define __i386 1 // CHECK_GEODE_M32: #define __i386__ 1 // CHECK_GEODE_M32: #define __tune_geode__ 1 // CHECK_GEODE_M32: #define i386 1 // RUN: not %clang -march=geode -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_GEODE_M64 // CHECK_GEODE_M64: error: // // RUN: %clang -march=k6 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K6_M32 // CHECK_K6_M32: #define __MMX__ 1 // CHECK_K6_M32: #define __i386 1 // CHECK_K6_M32: #define __i386__ 1 // CHECK_K6_M32: #define __k6 1 // CHECK_K6_M32: #define __k6__ 1 // CHECK_K6_M32: #define __tune_k6__ 1 // CHECK_K6_M32: #define i386 1 // RUN: not %clang -march=k6 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K6_M64 // CHECK_K6_M64: error: // // RUN: %clang -march=k6-2 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K6_2_M32 // CHECK_K6_2_M32: #define __3dNOW__ 1 // CHECK_K6_2_M32: #define __MMX__ 1 // CHECK_K6_2_M32: #define __i386 1 // CHECK_K6_2_M32: #define __i386__ 1 // CHECK_K6_2_M32: #define __k6 1 // CHECK_K6_2_M32: #define __k6_2__ 1 // CHECK_K6_2_M32: #define __k6__ 1 // CHECK_K6_2_M32: #define __tune_k6_2__ 1 // CHECK_K6_2_M32: #define __tune_k6__ 1 // CHECK_K6_2_M32: #define i386 1 // RUN: not %clang -march=k6-2 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K6_2_M64 // CHECK_K6_2_M64: error: // // RUN: %clang -march=k6-3 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K6_3_M32 // CHECK_K6_3_M32: #define __3dNOW__ 1 // CHECK_K6_3_M32: #define __MMX__ 1 // CHECK_K6_3_M32: #define __i386 1 // CHECK_K6_3_M32: #define __i386__ 1 // CHECK_K6_3_M32: #define __k6 1 // CHECK_K6_3_M32: #define __k6_3__ 1 // CHECK_K6_3_M32: #define __k6__ 1 // CHECK_K6_3_M32: #define __tune_k6_3__ 1 // CHECK_K6_3_M32: #define __tune_k6__ 1 // CHECK_K6_3_M32: #define i386 1 // RUN: not %clang -march=k6-3 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K6_3_M64 // CHECK_K6_3_M64: error: // // RUN: %clang -march=athlon -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_M32 // CHECK_ATHLON_M32: #define __3dNOW_A__ 1 // CHECK_ATHLON_M32: #define __3dNOW__ 1 // CHECK_ATHLON_M32: #define __MMX__ 1 // CHECK_ATHLON_M32: #define __athlon 1 // CHECK_ATHLON_M32: #define __athlon__ 1 // CHECK_ATHLON_M32: #define __i386 1 // CHECK_ATHLON_M32: #define __i386__ 1 // CHECK_ATHLON_M32: #define __tune_athlon__ 1 // CHECK_ATHLON_M32: #define i386 1 // RUN: not %clang -march=athlon -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_M64 // CHECK_ATHLON_M64: error: // // RUN: %clang -march=athlon-tbird -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_TBIRD_M32 // CHECK_ATHLON_TBIRD_M32: #define __3dNOW_A__ 1 // CHECK_ATHLON_TBIRD_M32: #define __3dNOW__ 1 // CHECK_ATHLON_TBIRD_M32: #define __MMX__ 1 // CHECK_ATHLON_TBIRD_M32: #define __athlon 1 // CHECK_ATHLON_TBIRD_M32: #define __athlon__ 1 // CHECK_ATHLON_TBIRD_M32: #define __i386 1 // CHECK_ATHLON_TBIRD_M32: #define __i386__ 1 // CHECK_ATHLON_TBIRD_M32: #define __tune_athlon__ 1 // CHECK_ATHLON_TBIRD_M32: #define i386 1 // RUN: not %clang -march=athlon-tbird -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_TBIRD_M64 // CHECK_ATHLON_TBIRD_M64: error: // // RUN: %clang -march=athlon-4 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_4_M32 // CHECK_ATHLON_4_M32: #define __3dNOW_A__ 1 // CHECK_ATHLON_4_M32: #define __3dNOW__ 1 // CHECK_ATHLON_4_M32: #define __MMX__ 1 // CHECK_ATHLON_4_M32: #define __SSE__ 1 // CHECK_ATHLON_4_M32: #define __athlon 1 // CHECK_ATHLON_4_M32: #define __athlon__ 1 // CHECK_ATHLON_4_M32: #define __athlon_sse__ 1 // CHECK_ATHLON_4_M32: #define __i386 1 // CHECK_ATHLON_4_M32: #define __i386__ 1 // CHECK_ATHLON_4_M32: #define __tune_athlon__ 1 // CHECK_ATHLON_4_M32: #define __tune_athlon_sse__ 1 // CHECK_ATHLON_4_M32: #define i386 1 // RUN: not %clang -march=athlon-4 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_4_M64 // CHECK_ATHLON_4_M64: error: // // RUN: %clang -march=athlon-xp -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_XP_M32 // CHECK_ATHLON_XP_M32: #define __3dNOW_A__ 1 // CHECK_ATHLON_XP_M32: #define __3dNOW__ 1 // CHECK_ATHLON_XP_M32: #define __MMX__ 1 // CHECK_ATHLON_XP_M32: #define __SSE__ 1 // CHECK_ATHLON_XP_M32: #define __athlon 1 // CHECK_ATHLON_XP_M32: #define __athlon__ 1 // CHECK_ATHLON_XP_M32: #define __athlon_sse__ 1 // CHECK_ATHLON_XP_M32: #define __i386 1 // CHECK_ATHLON_XP_M32: #define __i386__ 1 // CHECK_ATHLON_XP_M32: #define __tune_athlon__ 1 // CHECK_ATHLON_XP_M32: #define __tune_athlon_sse__ 1 // CHECK_ATHLON_XP_M32: #define i386 1 // RUN: not %clang -march=athlon-xp -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_XP_M64 // CHECK_ATHLON_XP_M64: error: // // RUN: %clang -march=athlon-mp -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_MP_M32 // CHECK_ATHLON_MP_M32: #define __3dNOW_A__ 1 // CHECK_ATHLON_MP_M32: #define __3dNOW__ 1 // CHECK_ATHLON_MP_M32: #define __MMX__ 1 // CHECK_ATHLON_MP_M32: #define __SSE__ 1 // CHECK_ATHLON_MP_M32: #define __athlon 1 // CHECK_ATHLON_MP_M32: #define __athlon__ 1 // CHECK_ATHLON_MP_M32: #define __athlon_sse__ 1 // CHECK_ATHLON_MP_M32: #define __i386 1 // CHECK_ATHLON_MP_M32: #define __i386__ 1 // CHECK_ATHLON_MP_M32: #define __tune_athlon__ 1 // CHECK_ATHLON_MP_M32: #define __tune_athlon_sse__ 1 // CHECK_ATHLON_MP_M32: #define i386 1 // RUN: not %clang -march=athlon-mp -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_MP_M64 // CHECK_ATHLON_MP_M64: error: // // RUN: %clang -march=x86-64 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_X86_64_M32 // CHECK_X86_64_M32: #define __MMX__ 1 // CHECK_X86_64_M32: #define __SSE2__ 1 // CHECK_X86_64_M32: #define __SSE__ 1 // CHECK_X86_64_M32: #define __i386 1 // CHECK_X86_64_M32: #define __i386__ 1 // CHECK_X86_64_M32: #define __k8 1 // CHECK_X86_64_M32: #define __k8__ 1 // CHECK_X86_64_M32: #define i386 1 // RUN: %clang -march=x86-64 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_X86_64_M64 // CHECK_X86_64_M64: #define __MMX__ 1 // CHECK_X86_64_M64: #define __SSE2_MATH__ 1 // CHECK_X86_64_M64: #define __SSE2__ 1 // CHECK_X86_64_M64: #define __SSE_MATH__ 1 // CHECK_X86_64_M64: #define __SSE__ 1 // CHECK_X86_64_M64: #define __amd64 1 // CHECK_X86_64_M64: #define __amd64__ 1 // CHECK_X86_64_M64: #define __k8 1 // CHECK_X86_64_M64: #define __k8__ 1 // CHECK_X86_64_M64: #define __x86_64 1 // CHECK_X86_64_M64: #define __x86_64__ 1 // // RUN: %clang -march=k8 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K8_M32 // CHECK_K8_M32: #define __3dNOW_A__ 1 // CHECK_K8_M32: #define __3dNOW__ 1 // CHECK_K8_M32: #define __MMX__ 1 // CHECK_K8_M32: #define __SSE2__ 1 // CHECK_K8_M32: #define __SSE__ 1 // CHECK_K8_M32: #define __i386 1 // CHECK_K8_M32: #define __i386__ 1 // CHECK_K8_M32: #define __k8 1 // CHECK_K8_M32: #define __k8__ 1 // CHECK_K8_M32: #define __tune_k8__ 1 // CHECK_K8_M32: #define i386 1 // RUN: %clang -march=k8 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K8_M64 // CHECK_K8_M64: #define __3dNOW_A__ 1 // CHECK_K8_M64: #define __3dNOW__ 1 // CHECK_K8_M64: #define __MMX__ 1 // CHECK_K8_M64: #define __SSE2_MATH__ 1 // CHECK_K8_M64: #define __SSE2__ 1 // CHECK_K8_M64: #define __SSE_MATH__ 1 // CHECK_K8_M64: #define __SSE__ 1 // CHECK_K8_M64: #define __amd64 1 // CHECK_K8_M64: #define __amd64__ 1 // CHECK_K8_M64: #define __k8 1 // CHECK_K8_M64: #define __k8__ 1 // CHECK_K8_M64: #define __tune_k8__ 1 // CHECK_K8_M64: #define __x86_64 1 // CHECK_K8_M64: #define __x86_64__ 1 // // RUN: %clang -march=k8-sse3 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K8_SSE3_M32 // CHECK_K8_SSE3_M32: #define __3dNOW_A__ 1 // CHECK_K8_SSE3_M32: #define __3dNOW__ 1 // CHECK_K8_SSE3_M32: #define __MMX__ 1 // CHECK_K8_SSE3_M32: #define __SSE2__ 1 // CHECK_K8_SSE3_M32: #define __SSE3__ 1 // CHECK_K8_SSE3_M32: #define __SSE__ 1 // CHECK_K8_SSE3_M32: #define __i386 1 // CHECK_K8_SSE3_M32: #define __i386__ 1 // CHECK_K8_SSE3_M32: #define __k8 1 // CHECK_K8_SSE3_M32: #define __k8__ 1 // CHECK_K8_SSE3_M32: #define __tune_k8__ 1 // CHECK_K8_SSE3_M32: #define i386 1 // RUN: %clang -march=k8-sse3 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K8_SSE3_M64 // CHECK_K8_SSE3_M64: #define __3dNOW_A__ 1 // CHECK_K8_SSE3_M64: #define __3dNOW__ 1 // CHECK_K8_SSE3_M64: #define __MMX__ 1 // CHECK_K8_SSE3_M64: #define __SSE2_MATH__ 1 // CHECK_K8_SSE3_M64: #define __SSE2__ 1 // CHECK_K8_SSE3_M64: #define __SSE3__ 1 // CHECK_K8_SSE3_M64: #define __SSE_MATH__ 1 // CHECK_K8_SSE3_M64: #define __SSE__ 1 // CHECK_K8_SSE3_M64: #define __amd64 1 // CHECK_K8_SSE3_M64: #define __amd64__ 1 // CHECK_K8_SSE3_M64: #define __k8 1 // CHECK_K8_SSE3_M64: #define __k8__ 1 // CHECK_K8_SSE3_M64: #define __tune_k8__ 1 // CHECK_K8_SSE3_M64: #define __x86_64 1 // CHECK_K8_SSE3_M64: #define __x86_64__ 1 // // RUN: %clang -march=opteron -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_OPTERON_M32 // CHECK_OPTERON_M32: #define __3dNOW_A__ 1 // CHECK_OPTERON_M32: #define __3dNOW__ 1 // CHECK_OPTERON_M32: #define __MMX__ 1 // CHECK_OPTERON_M32: #define __SSE2__ 1 // CHECK_OPTERON_M32: #define __SSE__ 1 // CHECK_OPTERON_M32: #define __i386 1 // CHECK_OPTERON_M32: #define __i386__ 1 // CHECK_OPTERON_M32: #define __k8 1 // CHECK_OPTERON_M32: #define __k8__ 1 // CHECK_OPTERON_M32: #define __tune_k8__ 1 // CHECK_OPTERON_M32: #define i386 1 // RUN: %clang -march=opteron -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_OPTERON_M64 // CHECK_OPTERON_M64: #define __3dNOW_A__ 1 // CHECK_OPTERON_M64: #define __3dNOW__ 1 // CHECK_OPTERON_M64: #define __MMX__ 1 // CHECK_OPTERON_M64: #define __SSE2_MATH__ 1 // CHECK_OPTERON_M64: #define __SSE2__ 1 // CHECK_OPTERON_M64: #define __SSE_MATH__ 1 // CHECK_OPTERON_M64: #define __SSE__ 1 // CHECK_OPTERON_M64: #define __amd64 1 // CHECK_OPTERON_M64: #define __amd64__ 1 // CHECK_OPTERON_M64: #define __k8 1 // CHECK_OPTERON_M64: #define __k8__ 1 // CHECK_OPTERON_M64: #define __tune_k8__ 1 // CHECK_OPTERON_M64: #define __x86_64 1 // CHECK_OPTERON_M64: #define __x86_64__ 1 // // RUN: %clang -march=opteron-sse3 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_OPTERON_SSE3_M32 // CHECK_OPTERON_SSE3_M32: #define __3dNOW_A__ 1 // CHECK_OPTERON_SSE3_M32: #define __3dNOW__ 1 // CHECK_OPTERON_SSE3_M32: #define __MMX__ 1 // CHECK_OPTERON_SSE3_M32: #define __SSE2__ 1 // CHECK_OPTERON_SSE3_M32: #define __SSE3__ 1 // CHECK_OPTERON_SSE3_M32: #define __SSE__ 1 // CHECK_OPTERON_SSE3_M32: #define __i386 1 // CHECK_OPTERON_SSE3_M32: #define __i386__ 1 // CHECK_OPTERON_SSE3_M32: #define __k8 1 // CHECK_OPTERON_SSE3_M32: #define __k8__ 1 // CHECK_OPTERON_SSE3_M32: #define __tune_k8__ 1 // CHECK_OPTERON_SSE3_M32: #define i386 1 // RUN: %clang -march=opteron-sse3 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_OPTERON_SSE3_M64 // CHECK_OPTERON_SSE3_M64: #define __3dNOW_A__ 1 // CHECK_OPTERON_SSE3_M64: #define __3dNOW__ 1 // CHECK_OPTERON_SSE3_M64: #define __MMX__ 1 // CHECK_OPTERON_SSE3_M64: #define __SSE2_MATH__ 1 // CHECK_OPTERON_SSE3_M64: #define __SSE2__ 1 // CHECK_OPTERON_SSE3_M64: #define __SSE3__ 1 // CHECK_OPTERON_SSE3_M64: #define __SSE_MATH__ 1 // CHECK_OPTERON_SSE3_M64: #define __SSE__ 1 // CHECK_OPTERON_SSE3_M64: #define __amd64 1 // CHECK_OPTERON_SSE3_M64: #define __amd64__ 1 // CHECK_OPTERON_SSE3_M64: #define __k8 1 // CHECK_OPTERON_SSE3_M64: #define __k8__ 1 // CHECK_OPTERON_SSE3_M64: #define __tune_k8__ 1 // CHECK_OPTERON_SSE3_M64: #define __x86_64 1 // CHECK_OPTERON_SSE3_M64: #define __x86_64__ 1 // // RUN: %clang -march=athlon64 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON64_M32 // CHECK_ATHLON64_M32: #define __3dNOW_A__ 1 // CHECK_ATHLON64_M32: #define __3dNOW__ 1 // CHECK_ATHLON64_M32: #define __MMX__ 1 // CHECK_ATHLON64_M32: #define __SSE2__ 1 // CHECK_ATHLON64_M32: #define __SSE__ 1 // CHECK_ATHLON64_M32: #define __i386 1 // CHECK_ATHLON64_M32: #define __i386__ 1 // CHECK_ATHLON64_M32: #define __k8 1 // CHECK_ATHLON64_M32: #define __k8__ 1 // CHECK_ATHLON64_M32: #define __tune_k8__ 1 // CHECK_ATHLON64_M32: #define i386 1 // RUN: %clang -march=athlon64 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON64_M64 // CHECK_ATHLON64_M64: #define __3dNOW_A__ 1 // CHECK_ATHLON64_M64: #define __3dNOW__ 1 // CHECK_ATHLON64_M64: #define __MMX__ 1 // CHECK_ATHLON64_M64: #define __SSE2_MATH__ 1 // CHECK_ATHLON64_M64: #define __SSE2__ 1 // CHECK_ATHLON64_M64: #define __SSE_MATH__ 1 // CHECK_ATHLON64_M64: #define __SSE__ 1 // CHECK_ATHLON64_M64: #define __amd64 1 // CHECK_ATHLON64_M64: #define __amd64__ 1 // CHECK_ATHLON64_M64: #define __k8 1 // CHECK_ATHLON64_M64: #define __k8__ 1 // CHECK_ATHLON64_M64: #define __tune_k8__ 1 // CHECK_ATHLON64_M64: #define __x86_64 1 // CHECK_ATHLON64_M64: #define __x86_64__ 1 // // RUN: %clang -march=athlon64-sse3 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON64_SSE3_M32 // CHECK_ATHLON64_SSE3_M32: #define __3dNOW_A__ 1 // CHECK_ATHLON64_SSE3_M32: #define __3dNOW__ 1 // CHECK_ATHLON64_SSE3_M32: #define __MMX__ 1 // CHECK_ATHLON64_SSE3_M32: #define __SSE2__ 1 // CHECK_ATHLON64_SSE3_M32: #define __SSE3__ 1 // CHECK_ATHLON64_SSE3_M32: #define __SSE__ 1 // CHECK_ATHLON64_SSE3_M32: #define __i386 1 // CHECK_ATHLON64_SSE3_M32: #define __i386__ 1 // CHECK_ATHLON64_SSE3_M32: #define __k8 1 // CHECK_ATHLON64_SSE3_M32: #define __k8__ 1 // CHECK_ATHLON64_SSE3_M32: #define __tune_k8__ 1 // CHECK_ATHLON64_SSE3_M32: #define i386 1 // RUN: %clang -march=athlon64-sse3 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON64_SSE3_M64 // CHECK_ATHLON64_SSE3_M64: #define __3dNOW_A__ 1 // CHECK_ATHLON64_SSE3_M64: #define __3dNOW__ 1 // CHECK_ATHLON64_SSE3_M64: #define __MMX__ 1 // CHECK_ATHLON64_SSE3_M64: #define __SSE2_MATH__ 1 // CHECK_ATHLON64_SSE3_M64: #define __SSE2__ 1 // CHECK_ATHLON64_SSE3_M64: #define __SSE3__ 1 // CHECK_ATHLON64_SSE3_M64: #define __SSE_MATH__ 1 // CHECK_ATHLON64_SSE3_M64: #define __SSE__ 1 // CHECK_ATHLON64_SSE3_M64: #define __amd64 1 // CHECK_ATHLON64_SSE3_M64: #define __amd64__ 1 // CHECK_ATHLON64_SSE3_M64: #define __k8 1 // CHECK_ATHLON64_SSE3_M64: #define __k8__ 1 // CHECK_ATHLON64_SSE3_M64: #define __tune_k8__ 1 // CHECK_ATHLON64_SSE3_M64: #define __x86_64 1 // CHECK_ATHLON64_SSE3_M64: #define __x86_64__ 1 // // RUN: %clang -march=athlon-fx -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_FX_M32 // CHECK_ATHLON_FX_M32: #define __3dNOW_A__ 1 // CHECK_ATHLON_FX_M32: #define __3dNOW__ 1 // CHECK_ATHLON_FX_M32: #define __MMX__ 1 // CHECK_ATHLON_FX_M32: #define __SSE2__ 1 // CHECK_ATHLON_FX_M32: #define __SSE__ 1 // CHECK_ATHLON_FX_M32: #define __i386 1 // CHECK_ATHLON_FX_M32: #define __i386__ 1 // CHECK_ATHLON_FX_M32: #define __k8 1 // CHECK_ATHLON_FX_M32: #define __k8__ 1 // CHECK_ATHLON_FX_M32: #define __tune_k8__ 1 // CHECK_ATHLON_FX_M32: #define i386 1 // RUN: %clang -march=athlon-fx -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_FX_M64 // CHECK_ATHLON_FX_M64: #define __3dNOW_A__ 1 // CHECK_ATHLON_FX_M64: #define __3dNOW__ 1 // CHECK_ATHLON_FX_M64: #define __MMX__ 1 // CHECK_ATHLON_FX_M64: #define __SSE2_MATH__ 1 // CHECK_ATHLON_FX_M64: #define __SSE2__ 1 // CHECK_ATHLON_FX_M64: #define __SSE_MATH__ 1 // CHECK_ATHLON_FX_M64: #define __SSE__ 1 // CHECK_ATHLON_FX_M64: #define __amd64 1 // CHECK_ATHLON_FX_M64: #define __amd64__ 1 // CHECK_ATHLON_FX_M64: #define __k8 1 // CHECK_ATHLON_FX_M64: #define __k8__ 1 // CHECK_ATHLON_FX_M64: #define __tune_k8__ 1 // CHECK_ATHLON_FX_M64: #define __x86_64 1 // CHECK_ATHLON_FX_M64: #define __x86_64__ 1 // RUN: %clang -march=amdfam10 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_AMDFAM10_M32 // CHECK_AMDFAM10_M32: #define __3dNOW_A__ 1 // CHECK_AMDFAM10_M32: #define __3dNOW__ 1 // CHECK_AMDFAM10_M32: #define __LZCNT__ 1 // CHECK_AMDFAM10_M32: #define __MMX__ 1 // CHECK_AMDFAM10_M32: #define __POPCNT__ 1 // CHECK_AMDFAM10_M32: #define __SSE2_MATH__ 1 // CHECK_AMDFAM10_M32: #define __SSE2__ 1 // CHECK_AMDFAM10_M32: #define __SSE3__ 1 // CHECK_AMDFAM10_M32: #define __SSE4A__ 1 // CHECK_AMDFAM10_M32: #define __SSE_MATH__ 1 // CHECK_AMDFAM10_M32: #define __SSE__ 1 // CHECK_AMDFAM10_M32: #define __amdfam10 1 // CHECK_AMDFAM10_M32: #define __amdfam10__ 1 // CHECK_AMDFAM10_M32: #define __i386 1 // CHECK_AMDFAM10_M32: #define __i386__ 1 // CHECK_AMDFAM10_M32: #define __tune_amdfam10__ 1 // RUN: %clang -march=amdfam10 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_AMDFAM10_M64 // CHECK_AMDFAM10_M64: #define __3dNOW_A__ 1 // CHECK_AMDFAM10_M64: #define __3dNOW__ 1 // CHECK_AMDFAM10_M64: #define __LZCNT__ 1 // CHECK_AMDFAM10_M64: #define __MMX__ 1 // CHECK_AMDFAM10_M64: #define __POPCNT__ 1 // CHECK_AMDFAM10_M64: #define __SSE2_MATH__ 1 // CHECK_AMDFAM10_M64: #define __SSE2__ 1 // CHECK_AMDFAM10_M64: #define __SSE3__ 1 // CHECK_AMDFAM10_M64: #define __SSE4A__ 1 // CHECK_AMDFAM10_M64: #define __SSE_MATH__ 1 // CHECK_AMDFAM10_M64: #define __SSE__ 1 // CHECK_AMDFAM10_M64: #define __amd64 1 // CHECK_AMDFAM10_M64: #define __amd64__ 1 // CHECK_AMDFAM10_M64: #define __amdfam10 1 // CHECK_AMDFAM10_M64: #define __amdfam10__ 1 // CHECK_AMDFAM10_M64: #define __tune_amdfam10__ 1 // CHECK_AMDFAM10_M64: #define __x86_64 1 // CHECK_AMDFAM10_M64: #define __x86_64__ 1 // RUN: %clang -march=btver1 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_BTVER1_M32 // CHECK_BTVER1_M32-NOT: #define __3dNOW_A__ 1 // CHECK_BTVER1_M32-NOT: #define __3dNOW__ 1 // CHECK_BTVER1_M32: #define __LZCNT__ 1 // CHECK_BTVER1_M32: #define __MMX__ 1 // CHECK_BTVER1_M32: #define __POPCNT__ 1 // CHECK_BTVER1_M32: #define __PRFCHW__ 1 // CHECK_BTVER1_M32: #define __SSE2_MATH__ 1 // CHECK_BTVER1_M32: #define __SSE2__ 1 // CHECK_BTVER1_M32: #define __SSE3__ 1 // CHECK_BTVER1_M32: #define __SSE4A__ 1 // CHECK_BTVER1_M32: #define __SSE_MATH__ 1 // CHECK_BTVER1_M32: #define __SSE__ 1 // CHECK_BTVER1_M32: #define __SSSE3__ 1 // CHECK_BTVER1_M32: #define __btver1 1 // CHECK_BTVER1_M32: #define __btver1__ 1 // CHECK_BTVER1_M32: #define __i386 1 // CHECK_BTVER1_M32: #define __i386__ 1 // CHECK_BTVER1_M32: #define __tune_btver1__ 1 // RUN: %clang -march=btver1 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_BTVER1_M64 // CHECK_BTVER1_M64-NOT: #define __3dNOW_A__ 1 // CHECK_BTVER1_M64-NOT: #define __3dNOW__ 1 // CHECK_BTVER1_M64: #define __LZCNT__ 1 // CHECK_BTVER1_M64: #define __MMX__ 1 // CHECK_BTVER1_M64: #define __POPCNT__ 1 // CHECK_BTVER1_M64: #define __PRFCHW__ 1 // CHECK_BTVER1_M64: #define __SSE2_MATH__ 1 // CHECK_BTVER1_M64: #define __SSE2__ 1 // CHECK_BTVER1_M64: #define __SSE3__ 1 // CHECK_BTVER1_M64: #define __SSE4A__ 1 // CHECK_BTVER1_M64: #define __SSE_MATH__ 1 // CHECK_BTVER1_M64: #define __SSE__ 1 // CHECK_BTVER1_M64: #define __SSSE3__ 1 // CHECK_BTVER1_M64: #define __amd64 1 // CHECK_BTVER1_M64: #define __amd64__ 1 // CHECK_BTVER1_M64: #define __btver1 1 // CHECK_BTVER1_M64: #define __btver1__ 1 // CHECK_BTVER1_M64: #define __tune_btver1__ 1 // CHECK_BTVER1_M64: #define __x86_64 1 // CHECK_BTVER1_M64: #define __x86_64__ 1 // RUN: %clang -march=btver2 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_BTVER2_M32 // CHECK_BTVER2_M32-NOT: #define __3dNOW_A__ 1 // CHECK_BTVER2_M32-NOT: #define __3dNOW__ 1 // CHECK_BTVER2_M32: #define __AES__ 1 // CHECK_BTVER2_M32: #define __AVX__ 1 // CHECK_BTVER2_M32: #define __BMI__ 1 // CHECK_BTVER2_M32: #define __F16C__ 1 // CHECK_BTVER2_M32: #define __LZCNT__ 1 // CHECK_BTVER2_M32: #define __MMX__ 1 // CHECK_BTVER2_M32: #define __PCLMUL__ 1 // CHECK_BTVER2_M32: #define __POPCNT__ 1 // CHECK_BTVER2_M32: #define __PRFCHW__ 1 // CHECK_BTVER2_M32: #define __SSE2_MATH__ 1 // CHECK_BTVER2_M32: #define __SSE2__ 1 // CHECK_BTVER2_M32: #define __SSE3__ 1 // CHECK_BTVER2_M32: #define __SSE4A__ 1 // CHECK_BTVER2_M32: #define __SSE_MATH__ 1 // CHECK_BTVER2_M32: #define __SSE__ 1 // CHECK_BTVER2_M32: #define __SSSE3__ 1 // CHECK_BTVER2_M32: #define __btver2 1 // CHECK_BTVER2_M32: #define __btver2__ 1 // CHECK_BTVER2_M32: #define __i386 1 // CHECK_BTVER2_M32: #define __i386__ 1 // CHECK_BTVER2_M32: #define __tune_btver2__ 1 // RUN: %clang -march=btver2 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_BTVER2_M64 // CHECK_BTVER2_M64-NOT: #define __3dNOW_A__ 1 // CHECK_BTVER2_M64-NOT: #define __3dNOW__ 1 // CHECK_BTVER2_M64: #define __AES__ 1 // CHECK_BTVER2_M64: #define __AVX__ 1 // CHECK_BTVER2_M64: #define __BMI__ 1 // CHECK_BTVER2_M64: #define __F16C__ 1 // CHECK_BTVER2_M64: #define __LZCNT__ 1 // CHECK_BTVER2_M64: #define __MMX__ 1 // CHECK_BTVER2_M64: #define __PCLMUL__ 1 // CHECK_BTVER2_M64: #define __POPCNT__ 1 // CHECK_BTVER2_M64: #define __PRFCHW__ 1 // CHECK_BTVER2_M64: #define __SSE2_MATH__ 1 // CHECK_BTVER2_M64: #define __SSE2__ 1 // CHECK_BTVER2_M64: #define __SSE3__ 1 // CHECK_BTVER2_M64: #define __SSE4A__ 1 // CHECK_BTVER2_M64: #define __SSE_MATH__ 1 // CHECK_BTVER2_M64: #define __SSE__ 1 // CHECK_BTVER2_M64: #define __SSSE3__ 1 // CHECK_BTVER2_M64: #define __amd64 1 // CHECK_BTVER2_M64: #define __amd64__ 1 // CHECK_BTVER2_M64: #define __btver2 1 // CHECK_BTVER2_M64: #define __btver2__ 1 // CHECK_BTVER2_M64: #define __tune_btver2__ 1 // CHECK_BTVER2_M64: #define __x86_64 1 // CHECK_BTVER2_M64: #define __x86_64__ 1 // RUN: %clang -march=bdver1 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_BDVER1_M32 // CHECK_BDVER1_M32-NOT: #define __3dNOW_A__ 1 // CHECK_BDVER1_M32-NOT: #define __3dNOW__ 1 // CHECK_BDVER1_M32: #define __AES__ 1 // CHECK_BDVER1_M32: #define __AVX__ 1 // CHECK_BDVER1_M32: #define __FMA4__ 1 // CHECK_BDVER1_M32: #define __LZCNT__ 1 // CHECK_BDVER1_M32: #define __MMX__ 1 // CHECK_BDVER1_M32: #define __PCLMUL__ 1 // CHECK_BDVER1_M32: #define __POPCNT__ 1 // CHECK_BDVER1_M32: #define __PRFCHW__ 1 // CHECK_BDVER1_M32: #define __SSE2_MATH__ 1 // CHECK_BDVER1_M32: #define __SSE2__ 1 // CHECK_BDVER1_M32: #define __SSE3__ 1 // CHECK_BDVER1_M32: #define __SSE4A__ 1 // CHECK_BDVER1_M32: #define __SSE4_1__ 1 // CHECK_BDVER1_M32: #define __SSE4_2__ 1 // CHECK_BDVER1_M32: #define __SSE_MATH__ 1 // CHECK_BDVER1_M32: #define __SSE__ 1 // CHECK_BDVER1_M32: #define __SSSE3__ 1 // CHECK_BDVER1_M32: #define __XOP__ 1 // CHECK_BDVER1_M32: #define __bdver1 1 // CHECK_BDVER1_M32: #define __bdver1__ 1 // CHECK_BDVER1_M32: #define __i386 1 // CHECK_BDVER1_M32: #define __i386__ 1 // CHECK_BDVER1_M32: #define __tune_bdver1__ 1 // RUN: %clang -march=bdver1 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_BDVER1_M64 // CHECK_BDVER1_M64-NOT: #define __3dNOW_A__ 1 // CHECK_BDVER1_M64-NOT: #define __3dNOW__ 1 // CHECK_BDVER1_M64: #define __AES__ 1 // CHECK_BDVER1_M64: #define __AVX__ 1 // CHECK_BDVER1_M64: #define __FMA4__ 1 // CHECK_BDVER1_M64: #define __LZCNT__ 1 // CHECK_BDVER1_M64: #define __MMX__ 1 // CHECK_BDVER1_M64: #define __PCLMUL__ 1 // CHECK_BDVER1_M64: #define __POPCNT__ 1 // CHECK_BDVER1_M64: #define __PRFCHW__ 1 // CHECK_BDVER1_M64: #define __SSE2_MATH__ 1 // CHECK_BDVER1_M64: #define __SSE2__ 1 // CHECK_BDVER1_M64: #define __SSE3__ 1 // CHECK_BDVER1_M64: #define __SSE4A__ 1 // CHECK_BDVER1_M64: #define __SSE4_1__ 1 // CHECK_BDVER1_M64: #define __SSE4_2__ 1 // CHECK_BDVER1_M64: #define __SSE_MATH__ 1 // CHECK_BDVER1_M64: #define __SSE__ 1 // CHECK_BDVER1_M64: #define __SSSE3__ 1 // CHECK_BDVER1_M64: #define __XOP__ 1 // CHECK_BDVER1_M64: #define __amd64 1 // CHECK_BDVER1_M64: #define __amd64__ 1 // CHECK_BDVER1_M64: #define __bdver1 1 // CHECK_BDVER1_M64: #define __bdver1__ 1 // CHECK_BDVER1_M64: #define __tune_bdver1__ 1 // CHECK_BDVER1_M64: #define __x86_64 1 // CHECK_BDVER1_M64: #define __x86_64__ 1 // RUN: %clang -march=bdver2 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_BDVER2_M32 // CHECK_BDVER2_M32-NOT: #define __3dNOW_A__ 1 // CHECK_BDVER2_M32-NOT: #define __3dNOW__ 1 // CHECK_BDVER2_M32: #define __AES__ 1 // CHECK_BDVER2_M32: #define __AVX__ 1 // CHECK_BDVER2_M32: #define __BMI__ 1 // CHECK_BDVER2_M32: #define __F16C__ 1 // CHECK_BDVER2_M32: #define __FMA4__ 1 // CHECK_BDVER2_M32: #define __FMA__ 1 // CHECK_BDVER2_M32: #define __LZCNT__ 1 // CHECK_BDVER2_M32: #define __MMX__ 1 // CHECK_BDVER2_M32: #define __PCLMUL__ 1 // CHECK_BDVER2_M32: #define __POPCNT__ 1 // CHECK_BDVER2_M32: #define __PRFCHW__ 1 // CHECK_BDVER2_M32: #define __SSE2_MATH__ 1 // CHECK_BDVER2_M32: #define __SSE2__ 1 // CHECK_BDVER2_M32: #define __SSE3__ 1 // CHECK_BDVER2_M32: #define __SSE4A__ 1 // CHECK_BDVER2_M32: #define __SSE4_1__ 1 // CHECK_BDVER2_M32: #define __SSE4_2__ 1 // CHECK_BDVER2_M32: #define __SSE_MATH__ 1 // CHECK_BDVER2_M32: #define __SSE__ 1 // CHECK_BDVER2_M32: #define __SSSE3__ 1 // CHECK_BDVER2_M32: #define __TBM__ 1 // CHECK_BDVER2_M32: #define __XOP__ 1 // CHECK_BDVER2_M32: #define __bdver2 1 // CHECK_BDVER2_M32: #define __bdver2__ 1 // CHECK_BDVER2_M32: #define __i386 1 // CHECK_BDVER2_M32: #define __i386__ 1 // CHECK_BDVER2_M32: #define __tune_bdver2__ 1 // RUN: %clang -march=bdver2 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_BDVER2_M64 // CHECK_BDVER2_M64-NOT: #define __3dNOW_A__ 1 // CHECK_BDVER2_M64-NOT: #define __3dNOW__ 1 // CHECK_BDVER2_M64: #define __AES__ 1 // CHECK_BDVER2_M64: #define __AVX__ 1 // CHECK_BDVER2_M64: #define __BMI__ 1 // CHECK_BDVER2_M64: #define __F16C__ 1 // CHECK_BDVER2_M64: #define __FMA4__ 1 // CHECK_BDVER2_M64: #define __FMA__ 1 // CHECK_BDVER2_M64: #define __LZCNT__ 1 // CHECK_BDVER2_M64: #define __MMX__ 1 // CHECK_BDVER2_M64: #define __PCLMUL__ 1 // CHECK_BDVER2_M64: #define __POPCNT__ 1 // CHECK_BDVER2_M64: #define __PRFCHW__ 1 // CHECK_BDVER2_M64: #define __SSE2_MATH__ 1 // CHECK_BDVER2_M64: #define __SSE2__ 1 // CHECK_BDVER2_M64: #define __SSE3__ 1 // CHECK_BDVER2_M64: #define __SSE4A__ 1 // CHECK_BDVER2_M64: #define __SSE4_1__ 1 // CHECK_BDVER2_M64: #define __SSE4_2__ 1 // CHECK_BDVER2_M64: #define __SSE_MATH__ 1 // CHECK_BDVER2_M64: #define __SSE__ 1 // CHECK_BDVER2_M64: #define __SSSE3__ 1 // CHECK_BDVER2_M64: #define __TBM__ 1 // CHECK_BDVER2_M64: #define __XOP__ 1 // CHECK_BDVER2_M64: #define __amd64 1 // CHECK_BDVER2_M64: #define __amd64__ 1 // CHECK_BDVER2_M64: #define __bdver2 1 // CHECK_BDVER2_M64: #define __bdver2__ 1 // CHECK_BDVER2_M64: #define __tune_bdver2__ 1 // CHECK_BDVER2_M64: #define __x86_64 1 // CHECK_BDVER2_M64: #define __x86_64__ 1 // RUN: %clang -march=bdver3 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_BDVER3_M32 // CHECK_BDVER3_M32-NOT: #define __3dNOW_A__ 1 // CHECK_BDVER3_M32-NOT: #define __3dNOW__ 1 // CHECK_BDVER3_M32: #define __AES__ 1 // CHECK_BDVER3_M32: #define __AVX__ 1 // CHECK_BDVER3_M32: #define __BMI__ 1 // CHECK_BDVER3_M32: #define __F16C__ 1 // CHECK_BDVER3_M32: #define __FMA4__ 1 // CHECK_BDVER3_M32: #define __FMA__ 1 // CHECK_BDVER3_M32: #define __FSGSBASE__ 1 // CHECK_BDVER3_M32: #define __LZCNT__ 1 // CHECK_BDVER3_M32: #define __MMX__ 1 // CHECK_BDVER3_M32: #define __PCLMUL__ 1 // CHECK_BDVER3_M32: #define __POPCNT__ 1 // CHECK_BDVER3_M32: #define __PRFCHW__ 1 // CHECK_BDVER3_M32: #define __SSE2_MATH__ 1 // CHECK_BDVER3_M32: #define __SSE2__ 1 // CHECK_BDVER3_M32: #define __SSE3__ 1 // CHECK_BDVER3_M32: #define __SSE4A__ 1 // CHECK_BDVER3_M32: #define __SSE4_1__ 1 // CHECK_BDVER3_M32: #define __SSE4_2__ 1 // CHECK_BDVER3_M32: #define __SSE_MATH__ 1 // CHECK_BDVER3_M32: #define __SSE__ 1 // CHECK_BDVER3_M32: #define __SSSE3__ 1 // CHECK_BDVER3_M32: #define __TBM__ 1 // CHECK_BDVER3_M32: #define __XOP__ 1 // CHECK_BDVER3_M32: #define __bdver3 1 // CHECK_BDVER3_M32: #define __bdver3__ 1 // CHECK_BDVER3_M32: #define __i386 1 // CHECK_BDVER3_M32: #define __i386__ 1 // CHECK_BDVER3_M32: #define __tune_bdver3__ 1 // RUN: %clang -march=bdver3 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_BDVER3_M64 // CHECK_BDVER3_M64-NOT: #define __3dNOW_A__ 1 // CHECK_BDVER3_M64-NOT: #define __3dNOW__ 1 // CHECK_BDVER3_M64: #define __AES__ 1 // CHECK_BDVER3_M64: #define __AVX__ 1 // CHECK_BDVER3_M64: #define __BMI__ 1 // CHECK_BDVER3_M64: #define __F16C__ 1 // CHECK_BDVER3_M64: #define __FMA4__ 1 // CHECK_BDVER3_M64: #define __FMA__ 1 // CHECK_BDVER3_M64: #define __FSGSBASE__ 1 // CHECK_BDVER3_M64: #define __LZCNT__ 1 // CHECK_BDVER3_M64: #define __MMX__ 1 // CHECK_BDVER3_M64: #define __PCLMUL__ 1 // CHECK_BDVER3_M64: #define __POPCNT__ 1 // CHECK_BDVER3_M64: #define __PRFCHW__ 1 // CHECK_BDVER3_M64: #define __SSE2_MATH__ 1 // CHECK_BDVER3_M64: #define __SSE2__ 1 // CHECK_BDVER3_M64: #define __SSE3__ 1 // CHECK_BDVER3_M64: #define __SSE4A__ 1 // CHECK_BDVER3_M64: #define __SSE4_1__ 1 // CHECK_BDVER3_M64: #define __SSE4_2__ 1 // CHECK_BDVER3_M64: #define __SSE_MATH__ 1 // CHECK_BDVER3_M64: #define __SSE__ 1 // CHECK_BDVER3_M64: #define __SSSE3__ 1 // CHECK_BDVER3_M64: #define __TBM__ 1 // CHECK_BDVER3_M64: #define __XOP__ 1 // CHECK_BDVER3_M64: #define __amd64 1 // CHECK_BDVER3_M64: #define __amd64__ 1 // CHECK_BDVER3_M64: #define __bdver3 1 // CHECK_BDVER3_M64: #define __bdver3__ 1 // CHECK_BDVER3_M64: #define __tune_bdver3__ 1 // CHECK_BDVER3_M64: #define __x86_64 1 // CHECK_BDVER3_M64: #define __x86_64__ 1 // RUN: %clang -march=bdver4 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_BDVER4_M32 // CHECK_BDVER4_M32-NOT: #define __3dNOW_A__ 1 // CHECK_BDVER4_M32-NOT: #define __3dNOW__ 1 // CHECK_BDVER4_M32: #define __AES__ 1 // CHECK_BDVER4_M32: #define __AVX2__ 1 // CHECK_BDVER4_M32: #define __AVX__ 1 // CHECK_BDVER4_M32: #define __BMI2__ 1 // CHECK_BDVER4_M32: #define __BMI__ 1 // CHECK_BDVER4_M32: #define __F16C__ 1 // CHECK_BDVER4_M32: #define __FMA4__ 1 // CHECK_BDVER4_M32: #define __FMA__ 1 // CHECK_BDVER4_M32: #define __FSGSBASE__ 1 // CHECK_BDVER4_M32: #define __LZCNT__ 1 // CHECK_BDVER4_M32: #define __MMX__ 1 // CHECK_BDVER4_M32: #define __PCLMUL__ 1 // CHECK_BDVER4_M32: #define __POPCNT__ 1 // CHECK_BDVER4_M32: #define __PRFCHW__ 1 // CHECK_BDVER4_M32: #define __SSE2_MATH__ 1 // CHECK_BDVER4_M32: #define __SSE2__ 1 // CHECK_BDVER4_M32: #define __SSE3__ 1 // CHECK_BDVER4_M32: #define __SSE4A__ 1 // CHECK_BDVER4_M32: #define __SSE4_1__ 1 // CHECK_BDVER4_M32: #define __SSE4_2__ 1 // CHECK_BDVER4_M32: #define __SSE_MATH__ 1 // CHECK_BDVER4_M32: #define __SSE__ 1 // CHECK_BDVER4_M32: #define __SSSE3__ 1 // CHECK_BDVER4_M32: #define __TBM__ 1 // CHECK_BDVER4_M32: #define __XOP__ 1 // CHECK_BDVER4_M32: #define __bdver4 1 // CHECK_BDVER4_M32: #define __bdver4__ 1 // CHECK_BDVER4_M32: #define __i386 1 // CHECK_BDVER4_M32: #define __i386__ 1 // CHECK_BDVER4_M32: #define __tune_bdver4__ 1 // RUN: %clang -march=bdver4 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_BDVER4_M64 // CHECK_BDVER4_M64-NOT: #define __3dNOW_A__ 1 // CHECK_BDVER4_M64-NOT: #define __3dNOW__ 1 // CHECK_BDVER4_M64: #define __AES__ 1 // CHECK_BDVER4_M64: #define __AVX2__ 1 // CHECK_BDVER4_M64: #define __AVX__ 1 // CHECK_BDVER4_M64: #define __BMI2__ 1 // CHECK_BDVER4_M64: #define __BMI__ 1 // CHECK_BDVER4_M64: #define __F16C__ 1 // CHECK_BDVER4_M64: #define __FMA4__ 1 // CHECK_BDVER4_M64: #define __FMA__ 1 // CHECK_BDVER4_M64: #define __FSGSBASE__ 1 // CHECK_BDVER4_M64: #define __LZCNT__ 1 // CHECK_BDVER4_M64: #define __MMX__ 1 // CHECK_BDVER4_M64: #define __PCLMUL__ 1 // CHECK_BDVER4_M64: #define __POPCNT__ 1 // CHECK_BDVER4_M64: #define __PRFCHW__ 1 // CHECK_BDVER4_M64: #define __SSE2_MATH__ 1 // CHECK_BDVER4_M64: #define __SSE2__ 1 // CHECK_BDVER4_M64: #define __SSE3__ 1 // CHECK_BDVER4_M64: #define __SSE4A__ 1 // CHECK_BDVER4_M64: #define __SSE4_1__ 1 // CHECK_BDVER4_M64: #define __SSE4_2__ 1 // CHECK_BDVER4_M64: #define __SSE_MATH__ 1 // CHECK_BDVER4_M64: #define __SSE__ 1 // CHECK_BDVER4_M64: #define __SSSE3__ 1 // CHECK_BDVER4_M64: #define __TBM__ 1 // CHECK_BDVER4_M64: #define __XOP__ 1 // CHECK_BDVER4_M64: #define __amd64 1 // CHECK_BDVER4_M64: #define __amd64__ 1 // CHECK_BDVER4_M64: #define __bdver4 1 // CHECK_BDVER4_M64: #define __bdver4__ 1 // CHECK_BDVER4_M64: #define __tune_bdver4__ 1 // CHECK_BDVER4_M64: #define __x86_64 1 // CHECK_BDVER4_M64: #define __x86_64__ 1 // // End X86/GCC/Linux tests ------------------ // Begin PPC/GCC/Linux tests ---------------- // RUN: %clang -mvsx -E -dM %s -o - 2>&1 \ // RUN: -target powerpc64-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PPC_VSX_M64 // // CHECK_PPC_VSX_M64: #define __VSX__ // // RUN: %clang -mpower8-vector -E -dM %s -o - 2>&1 \ // RUN: -target powerpc64-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PPC_POWER8_VECTOR_M64 // // CHECK_PPC_POWER8_VECTOR_M64: #define __POWER8_VECTOR__ // // RUN: %clang -mcrypto -E -dM %s -o - 2>&1 \ // RUN: -target powerpc64-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PPC_CRYPTO_M64 // // CHECK_PPC_CRYPTO_M64: #define __CRYPTO__ // // RUN: %clang -mcpu=pwr8 -E -dM %s -o - 2>&1 \ // RUN: -target powerpc64-unknown-unknown \ // RUN: | FileCheck %s -check-prefix=CHECK_PPC_GCC_ATOMICS // RUN: %clang -E -dM %s -o - 2>&1 \ // RUN: -target powerpc64le-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PPC_GCC_ATOMICS // // CHECK_PPC_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 // CHECK_PPC_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 // CHECK_PPC_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 // CHECK_PPC_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 // // End PPC/GCC/Linux tests ------------------ // Begin Sparc/GCC/Linux tests ---------------- // // RUN: %clang -E -dM %s -o - 2>&1 \ // RUN: -target sparc-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_SPARC // // CHECK_SPARC: #define __BIG_ENDIAN__ 1 // CHECK_SPARC: #define __sparc 1 // CHECK_SPARC: #define __sparc__ 1 // CHECK_SPARC: #define __sparcv8 1 // // RUN: %clang -E -dM %s -o - 2>&1 \ // RUN: -target sparcel-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_SPARCEL // // CHECK_SPARCEL: #define __LITTLE_ENDIAN__ 1 // CHECK_SPARCEL: #define __sparc 1 // CHECK_SPARCEL: #define __sparc__ 1 // CHECK_SPARCEL: #define __sparcv8 1 // // RUN: %clang -E -dM %s -o - 2>&1 \ // RUN: -target sparcv9-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_SPARCV9 // // CHECK_SPARCV9: #define __BIG_ENDIAN__ 1 // CHECK_SPARCV9: #define __sparc 1 // CHECK_SPARCV9: #define __sparc64__ 1 // CHECK_SPARCV9: #define __sparc__ 1 // CHECK_SPARCV9: #define __sparc_v9__ 1 // CHECK_SPARCV9: #define __sparcv9 1 // CHECK_SPARCV9: #define __sparcv9__ 1 // Begin SystemZ/GCC/Linux tests ---------------- // // RUN: %clang -march=z10 -E -dM %s -o - 2>&1 \ // RUN: -target s390x-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_SYSTEMZ_Z10 // // CHECK_SYSTEMZ_Z10: #define __LONG_DOUBLE_128__ 1 // CHECK_SYSTEMZ_Z10: #define __s390__ 1 // CHECK_SYSTEMZ_Z10: #define __s390x__ 1 // CHECK_SYSTEMZ_Z10: #define __zarch__ 1 // // RUN: %clang -march=zEC12 -E -dM %s -o - 2>&1 \ // RUN: -target s390x-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_SYSTEMZ_ZEC12 // // CHECK_SYSTEMZ_ZEC12: #define __HTM__ 1 // CHECK_SYSTEMZ_ZEC12: #define __LONG_DOUBLE_128__ 1 // CHECK_SYSTEMZ_ZEC12: #define __s390__ 1 // CHECK_SYSTEMZ_ZEC12: #define __s390x__ 1 // CHECK_SYSTEMZ_ZEC12: #define __zarch__ 1 // // RUN: %clang -mhtm -E -dM %s -o - 2>&1 \ // RUN: -target s390x-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_SYSTEMZ_HTM // // CHECK_SYSTEMZ_HTM: #define __HTM__ 1 // // RUN: %clang -fzvector -E -dM %s -o - 2>&1 \ // RUN: -target s390x-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_SYSTEMZ_ZVECTOR // RUN: %clang -mzvector -E -dM %s -o - 2>&1 \ // RUN: -target s390x-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_SYSTEMZ_ZVECTOR // // CHECK_SYSTEMZ_ZVECTOR: #define __VEC__ 10301
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/macro_expand.c
// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s #define X() Y #define Y() X A: X()()() // CHECK: {{^}}A: Y{{$}} // PR3927 #define f(x) h(x #define for(x) h(x #define h(x) x() B: f(f)) C: for(for)) // CHECK: {{^}}B: f(){{$}} // CHECK: {{^}}C: for(){{$}} // rdar://6880648 #define f(x,y...) y f()
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/user_defined_system_framework.c
// RUN: %clang_cc1 -fsyntax-only -F %S/Inputs -Wsign-conversion -verify %s // expected-no-diagnostics // Check that TestFramework is treated as a system header. #include <TestFramework/TestFramework.h> int f1() { return test_framework_func(1) + another_test_framework_func(2); }
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/headermap-rel2.c
// This uses a headermap with this entry: // someheader.h -> Product/someheader.h // RUN: %clang_cc1 -v -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isystem %S/Inputs/headermap-rel2/system/usr/include -I %S/Inputs/headermap-rel2 -H // RUN: %clang_cc1 -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isystem %S/Inputs/headermap-rel2/system/usr/include -I %S/Inputs/headermap-rel2 -H 2> %t.out // RUN: FileCheck %s -input-file %t.out // CHECK: Product/someheader.h // CHECK: system/usr/include{{[/\\]+}}someheader.h // CHECK: system/usr/include{{[/\\]+}}someheader.h #include "someheader.h" #include <someheader.h> #include <someheader.h>
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/cxx_and.cpp
// RUN: %clang_cc1 -DA -DB -E %s | grep 'int a = 37 == 37' // RUN: %clang_cc1 -DA -E %s | grep 'int a = 927 == 927' // RUN: %clang_cc1 -DB -E %s | grep 'int a = 927 == 927' // RUN: %clang_cc1 -E %s | grep 'int a = 927 == 927' #if defined(A) and defined(B) #define X 37 #else #define X 927 #endif #if defined(A) && defined(B) #define Y 37 #else #define Y 927 #endif int a = X == Y;
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/first-line-indent.c
foo // RUN: %clang_cc1 -E %s | FileCheck -strict-whitespace %s bar // CHECK: {{^ }}foo // CHECK: {{^ }}bar
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/pragma_diagnostic.c
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-undef %s // rdar://2362963 #if FOO // ok. #endif #pragma GCC diagnostic warning "-Wundef" #if FOO // expected-warning {{'FOO' is not defined}} #endif #pragma GCC diagnostic ignored "-Wun" "def" #if FOO // ok. #endif #pragma GCC diagnostic error "-Wundef" #if FOO // expected-error {{'FOO' is not defined}} #endif #define foo error #pragma GCC diagnostic foo "-Wundef" // expected-warning {{pragma diagnostic expected 'error', 'warning', 'ignored', 'fatal', 'push', or 'pop'}} #pragma GCC diagnostic error 42 // expected-error {{expected string literal in pragma diagnostic}} #pragma GCC diagnostic error "-Wundef" 42 // expected-warning {{unexpected token in pragma diagnostic}} #pragma GCC diagnostic error "invalid-name" // expected-warning {{pragma diagnostic expected option name (e.g. "-Wundef")}} #pragma GCC diagnostic error "-Winvalid-name" // expected-warning {{unknown warning group '-Winvalid-name', ignored}}
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/overflow.c
// RUN: %clang_cc1 -Eonly %s -verify -triple i686-pc-linux-gnu // Multiply signed overflow #if 0x7FFFFFFFFFFFFFFF*2 // expected-warning {{overflow}} #endif // Multiply unsigned overflow #if 0xFFFFFFFFFFFFFFFF*2 #endif // Add signed overflow #if 0x7FFFFFFFFFFFFFFF+1 // expected-warning {{overflow}} #endif // Add unsigned overflow #if 0xFFFFFFFFFFFFFFFF+1 #endif // Subtract signed overflow #if 0x7FFFFFFFFFFFFFFF- -1 // expected-warning {{overflow}} #endif // Subtract unsigned overflow #if 0xFFFFFFFFFFFFFFFF- -1 // expected-warning {{converted from negative value}} #endif
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/file_to_include.h
#warning file successfully included
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/macro_rparen_scan.c
// RUN: %clang_cc1 -E %s | grep '^3 ;$' /* Right paren scanning, hard case. Should expand to 3. */ #define i(x) 3 #define a i(yz #define b ) a b ) ;
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/pragma_poison.c
// RUN: %clang_cc1 %s -Eonly -verify #pragma GCC poison rindex rindex(some_string, 'h'); // expected-error {{attempt to use a poisoned identifier}} #define BAR _Pragma ("GCC poison XYZW") XYZW /*NO ERROR*/ XYZW // ok BAR XYZW // expected-error {{attempt to use a poisoned identifier}} // Pragma poison shouldn't warn from macro expansions defined before the token // is poisoned. #define strrchr rindex2 #pragma GCC poison rindex2 // Can poison multiple times. #pragma GCC poison rindex2 strrchr(some_string, 'h'); // ok.
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/macro_disable.c
// RUN: %clang_cc1 %s -E | FileCheck -strict-whitespace %s // Check for C99 6.10.3.4p2. #define f(a) f(x * (a)) #define x 2 #define z z[0] f(f(z)); // CHECK: f(2 * (f(2 * (z[0])))); #define A A B C #define B B C A #define C C A B A // CHECK: A B C A B A C A B C A // PR1820 #define i(x) h(x #define h(x) x(void) extern int i(i)); // CHECK: int i(void) #define M_0(x) M_ ## x #define M_1(x) x + M_0(0) #define M_2(x) x + M_1(1) #define M_3(x) x + M_2(2) #define M_4(x) x + M_3(3) #define M_5(x) x + M_4(4) a: M_0(1)(2)(3)(4)(5); b: M_0(5)(4)(3)(2)(1); // CHECK: a: 2 + M_0(3)(4)(5); // CHECK: b: 4 + 4 + 3 + 2 + 1 + M_0(3)(2)(1); #define n(v) v #define l m #define m l a c: n(m) X // CHECK: c: m a X
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/predefined-macros.c
// This test verifies that the correct macros are predefined. // // RUN: %clang_cc1 %s -E -dM -triple i686-pc-win32 -fms-extensions -fms-compatibility \ // RUN: -fms-compatibility-version=13.00 -o - | FileCheck %s --check-prefix=CHECK-MS // CHECK-MS: #define _INTEGRAL_MAX_BITS 64 // CHECK-MS: #define _MSC_EXTENSIONS 1 // CHECK-MS: #define _MSC_VER 1300 // CHECK-MS: #define _M_IX86 600 // CHECK-MS: #define _M_IX86_FP // CHECK-MS: #define _WIN32 1 // CHECK-MS-NOT: #define __STRICT_ANSI__ // CHECK-MS-NOT: GCC // CHECK-MS-NOT: GNU // CHECK-MS-NOT: GXX // // RUN: %clang_cc1 %s -E -dM -triple x86_64-pc-win32 -fms-extensions -fms-compatibility \ // RUN: -fms-compatibility-version=13.00 -o - | FileCheck %s --check-prefix=CHECK-MS64 // CHECK-MS64: #define _INTEGRAL_MAX_BITS 64 // CHECK-MS64: #define _MSC_EXTENSIONS 1 // CHECK-MS64: #define _MSC_VER 1300 // CHECK-MS64: #define _M_AMD64 1 // CHECK-MS64: #define _M_X64 1 // CHECK-MS64: #define _WIN64 1 // CHECK-MS64-NOT: #define __STRICT_ANSI__ // CHECK-MS64-NOT: GCC // CHECK-MS64-NOT: GNU // CHECK-MS64-NOT: GXX // // RUN: %clang_cc1 %s -E -dM -triple i686-pc-win32 -fms-compatibility \ // RUN: -o - | FileCheck %s --check-prefix=CHECK-MS-STDINT // CHECK-MS-STDINT:#define __INT16_MAX__ 32767 // CHECK-MS-STDINT:#define __INT32_MAX__ 2147483647 // CHECK-MS-STDINT:#define __INT64_MAX__ 9223372036854775807LL // CHECK-MS-STDINT:#define __INT8_MAX__ 127 // CHECK-MS-STDINT:#define __INTPTR_MAX__ 2147483647 // CHECK-MS-STDINT:#define __INT_FAST16_MAX__ 32767 // CHECK-MS-STDINT:#define __INT_FAST16_TYPE__ short // CHECK-MS-STDINT:#define __INT_FAST32_MAX__ 2147483647 // CHECK-MS-STDINT:#define __INT_FAST32_TYPE__ int // CHECK-MS-STDINT:#define __INT_FAST64_MAX__ 9223372036854775807LL // CHECK-MS-STDINT:#define __INT_FAST64_TYPE__ long long int // CHECK-MS-STDINT:#define __INT_FAST8_MAX__ 127 // CHECK-MS-STDINT:#define __INT_FAST8_TYPE__ signed char // CHECK-MS-STDINT:#define __INT_LEAST16_MAX__ 32767 // CHECK-MS-STDINT:#define __INT_LEAST16_TYPE__ short // CHECK-MS-STDINT:#define __INT_LEAST32_MAX__ 2147483647 // CHECK-MS-STDINT:#define __INT_LEAST32_TYPE__ int // CHECK-MS-STDINT:#define __INT_LEAST64_MAX__ 9223372036854775807LL // CHECK-MS-STDINT:#define __INT_LEAST64_TYPE__ long long int // CHECK-MS-STDINT:#define __INT_LEAST8_MAX__ 127 // CHECK-MS-STDINT:#define __INT_LEAST8_TYPE__ signed char // CHECK-MS-STDINT-NOT:#define __UINT16_C_SUFFIX__ U // CHECK-MS-STDINT:#define __UINT16_MAX__ 65535 // CHECK-MS-STDINT:#define __UINT16_TYPE__ unsigned short // CHECK-MS-STDINT:#define __UINT32_C_SUFFIX__ U // CHECK-MS-STDINT:#define __UINT32_MAX__ 4294967295U // CHECK-MS-STDINT:#define __UINT32_TYPE__ unsigned int // CHECK-MS-STDINT:#define __UINT64_C_SUFFIX__ ULL // CHECK-MS-STDINT:#define __UINT64_MAX__ 18446744073709551615ULL // CHECK-MS-STDINT:#define __UINT64_TYPE__ long long unsigned int // CHECK-MS-STDINT-NOT:#define __UINT8_C_SUFFIX__ U // CHECK-MS-STDINT:#define __UINT8_MAX__ 255 // CHECK-MS-STDINT:#define __UINT8_TYPE__ unsigned char // CHECK-MS-STDINT:#define __UINTMAX_MAX__ 18446744073709551615ULL // CHECK-MS-STDINT:#define __UINTPTR_MAX__ 4294967295U // CHECK-MS-STDINT:#define __UINTPTR_TYPE__ unsigned int // CHECK-MS-STDINT:#define __UINTPTR_WIDTH__ 32 // CHECK-MS-STDINT:#define __UINT_FAST16_MAX__ 65535 // CHECK-MS-STDINT:#define __UINT_FAST16_TYPE__ unsigned short // CHECK-MS-STDINT:#define __UINT_FAST32_MAX__ 4294967295U // CHECK-MS-STDINT:#define __UINT_FAST32_TYPE__ unsigned int // CHECK-MS-STDINT:#define __UINT_FAST64_MAX__ 18446744073709551615ULL // CHECK-MS-STDINT:#define __UINT_FAST64_TYPE__ long long unsigned int // CHECK-MS-STDINT:#define __UINT_FAST8_MAX__ 255 // CHECK-MS-STDINT:#define __UINT_FAST8_TYPE__ unsigned char // CHECK-MS-STDINT:#define __UINT_LEAST16_MAX__ 65535 // CHECK-MS-STDINT:#define __UINT_LEAST16_TYPE__ unsigned short // CHECK-MS-STDINT:#define __UINT_LEAST32_MAX__ 4294967295U // CHECK-MS-STDINT:#define __UINT_LEAST32_TYPE__ unsigned int // CHECK-MS-STDINT:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL // CHECK-MS-STDINT:#define __UINT_LEAST64_TYPE__ long long unsigned int // CHECK-MS-STDINT:#define __UINT_LEAST8_MAX__ 255 // CHECK-MS-STDINT:#define __UINT_LEAST8_TYPE__ unsigned char // // RUN: %clang_cc1 %s -E -dM -ffast-math -o - \ // RUN: | FileCheck %s --check-prefix=CHECK-FAST-MATH // CHECK-FAST-MATH: #define __FAST_MATH__ // CHECK-FAST-MATH: #define __FINITE_MATH_ONLY__ 1 // // RUN: %clang_cc1 %s -E -dM -ffinite-math-only -o - \ // RUN: | FileCheck %s --check-prefix=CHECK-FINITE-MATH-ONLY // CHECK-FINITE-MATH-ONLY: #define __FINITE_MATH_ONLY__ 1 // // RUN: %clang %s -E -dM -fno-finite-math-only -o - \ // RUN: | FileCheck %s --check-prefix=CHECK-NO-FINITE-MATH-ONLY // CHECK-NO-FINITE-MATH-ONLY: #define __FINITE_MATH_ONLY__ 0 // // RUN: %clang_cc1 %s -E -dM -o - \ // RUN: | FileCheck %s --check-prefix=CHECK-FINITE-MATH-FLAG-UNDEFINED // CHECK-FINITE-MATH-FLAG-UNDEFINED: #define __FINITE_MATH_ONLY__ 0 // // RUN: %clang_cc1 %s -E -dM -o - -triple i686 -target-cpu i386 \ // RUN: | FileCheck %s --check-prefix=CHECK-SYNC_CAS_I386 // CHECK-SYNC_CAS_I386-NOT: __GCC_HAVE_SYNC_COMPARE_AND_SWAP // // RUN: %clang_cc1 %s -E -dM -o - -triple i686 -target-cpu i486 \ // RUN: | FileCheck %s --check-prefix=CHECK-SYNC_CAS_I486 // CHECK-SYNC_CAS_I486: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 // CHECK-SYNC_CAS_I486: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 // CHECK-SYNC_CAS_I486: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 // CHECK-SYNC_CAS_I486-NOT: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 // // RUN: %clang_cc1 %s -E -dM -o - -triple i686 -target-cpu i586 \ // RUN: | FileCheck %s --check-prefix=CHECK-SYNC_CAS_I586 // CHECK-SYNC_CAS_I586: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 // CHECK-SYNC_CAS_I586: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 // CHECK-SYNC_CAS_I586: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 // CHECK-SYNC_CAS_I586: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 // // RUN: %clang_cc1 %s -E -dM -o - -triple armv6 -target-cpu arm1136j-s \ // RUN: | FileCheck %s --check-prefix=CHECK-SYNC_CAS_ARM // CHECK-SYNC_CAS_ARM: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 // CHECK-SYNC_CAS_ARM: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 // CHECK-SYNC_CAS_ARM: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 // CHECK-SYNC_CAS_ARM: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 // // RUN: %clang_cc1 %s -E -dM -o - -triple armv7 -target-cpu cortex-a8 \ // RUN: | FileCheck %s --check-prefix=CHECK-SYNC_CAS_ARMv7 // CHECK-SYNC_CAS_ARMv7: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 // CHECK-SYNC_CAS_ARMv7: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 // CHECK-SYNC_CAS_ARMv7: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 // CHECK-SYNC_CAS_ARMv7: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 // // RUN: %clang_cc1 %s -E -dM -o - -triple armv6 -target-cpu cortex-m0 \ // RUN: | FileCheck %s --check-prefix=CHECK-SYNC_CAS_ARMv6 // CHECK-SYNC_CAS_ARMv6-NOT: __GCC_HAVE_SYNC_COMPARE_AND_SWAP
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/missing-system-header.h
#pragma clang system_header #include "not exist" // expected-error {{file not found}}
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/cxx_oper_keyword.cpp
// RUN: %clang_cc1 %s -E -verify -DOPERATOR_NAMES // RUN: %clang_cc1 %s -E -verify -fno-operator-names #ifndef OPERATOR_NAMES //expected-error@+3 {{token is not a valid binary operator in a preprocessor subexpression}} #endif // Valid because 'and' is a spelling of '&&' #if defined foo and bar #endif // Not valid in C++ unless -fno-operator-names is passed: #ifdef OPERATOR_NAMES //expected-error@+2 {{C++ operator 'and' (aka '&&') used as a macro name}} #endif #define and foo #ifdef OPERATOR_NAMES //expected-error@+2 {{C++ operator 'xor' (aka '^') used as a macro name}} #endif #if defined xor #endif // For error recovery we continue as though the identifier was a macro name regardless of -fno-operator-names. #ifdef OPERATOR_NAMES //expected-error@+3 {{C++ operator 'and' (aka '&&') used as a macro name}} #endif //expected-warning@+2 {{and is defined}} #ifdef and #warning and is defined #endif
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/mmx.c
// RUN: %clang -march=i386 -m32 -E -dM %s -msse -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=SSE_AND_MMX // RUN: %clang -march=i386 -m32 -E -dM %s -msse -mno-mmx -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=SSE_NO_MMX // RUN: %clang -march=i386 -m32 -E -dM %s -mno-mmx -msse -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=SSE_NO_MMX // SSE_AND_MMX: #define __MMX__ // SSE_AND_MMX: #define __SSE__ // SSE_NO_MMX-NOT: __MMX__ // SSE_NO_MMX: __SSE__ // SSE_NO_MMX-NOT: __MMX__
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/macro-reserved-cxx11.cpp
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -pedantic -verify %s #define for 0 // expected-warning {{keyword is hidden by macro definition}} #define final 1 // expected-warning {{keyword is hidden by macro definition}} #define override // expected-warning {{keyword is hidden by macro definition}} int x;
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/woa-wchar_t.c
// RUN: %clang_cc1 -dM -triple armv7-windows -E %s | FileCheck %s // RUN: %clang_cc1 -dM -fno-signed-char -triple armv7-windows -E %s | FileCheck %s // CHECK: #define __WCHAR_TYPE__ unsigned short
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/output_paste_avoid.cpp
// RUN: %clang_cc1 -E -std=c++11 %s -o - | FileCheck -strict-whitespace %s #define y(a) ..a A: y(.) // This should print as ".. ." to avoid turning into ... // CHECK: A: .. . #define X 0 .. 1 B: X // CHECK: B: 0 .. 1 #define DOT . C: ..DOT // CHECK: C: .. . #define PLUS + #define EMPTY #define f(x) =x= D: +PLUS -EMPTY- PLUS+ f(=) // CHECK: D: + + - - + + = = = #define test(x) L#x E: test(str) // Should expand to L "str" not L"str" // CHECK: E: L "str" // Should avoid producing >>=. #define equal = F: >>equal // CHECK: F: >> = // Make sure we don't introduce spaces in the guid because we try to avoid // pasting '-' to a numeric constant. #define TYPEDEF(guid) typedef [uuid(guid)] TYPEDEF(66504301-BE0F-101A-8BBB-00AA00300CAB) long OLE_COLOR; // CHECK: typedef [uuid(66504301-BE0F-101A-8BBB-00AA00300CAB)] long OLE_COLOR; // Be careful with UD-suffixes. #define StrSuffix() "abc"_suffix #define IntSuffix() 123_suffix UD: StrSuffix()ident UD: IntSuffix()ident // CHECK: UD: "abc"_suffix ident // CHECK: UD: 123_suffix ident
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/c99-6_10_3_4_p7.c
// Example from C99 6.10.3.4p7 // RUN: %clang_cc1 -E %s | FileCheck -strict-whitespace %s #define t(x,y,z) x ## y ## z int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,), t(10,,), t(,11,), t(,,12), t(,,) }; // CHECK: int j[] = { 123, 45, 67, 89, // CHECK: 10, 11, 12, };
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/stdint.c
// RUN: %clang_cc1 -E -ffreestanding -triple=arm-none-none %s | FileCheck -check-prefix ARM %s // // ARM:typedef long long int int64_t; // ARM:typedef long long unsigned int uint64_t; // ARM:typedef int64_t int_least64_t; // ARM:typedef uint64_t uint_least64_t; // ARM:typedef int64_t int_fast64_t; // ARM:typedef uint64_t uint_fast64_t; // // ARM:typedef int int32_t; // ARM:typedef unsigned int uint32_t; // ARM:typedef int32_t int_least32_t; // ARM:typedef uint32_t uint_least32_t; // ARM:typedef int32_t int_fast32_t; // ARM:typedef uint32_t uint_fast32_t; // // ARM:typedef short int16_t; // ARM:typedef unsigned short uint16_t; // ARM:typedef int16_t int_least16_t; // ARM:typedef uint16_t uint_least16_t; // ARM:typedef int16_t int_fast16_t; // ARM:typedef uint16_t uint_fast16_t; // // ARM:typedef signed char int8_t; // ARM:typedef unsigned char uint8_t; // ARM:typedef int8_t int_least8_t; // ARM:typedef uint8_t uint_least8_t; // ARM:typedef int8_t int_fast8_t; // ARM:typedef uint8_t uint_fast8_t; // // ARM:typedef int32_t intptr_t; // ARM:typedef uint32_t uintptr_t; // // ARM:typedef long long int intmax_t; // ARM:typedef long long unsigned int uintmax_t; // // ARM:INT8_MAX_ 127 // ARM:INT8_MIN_ (-127 -1) // ARM:UINT8_MAX_ 255 // ARM:INT_LEAST8_MIN_ (-127 -1) // ARM:INT_LEAST8_MAX_ 127 // ARM:UINT_LEAST8_MAX_ 255 // ARM:INT_FAST8_MIN_ (-127 -1) // ARM:INT_FAST8_MAX_ 127 // ARM:UINT_FAST8_MAX_ 255 // // ARM:INT16_MAX_ 32767 // ARM:INT16_MIN_ (-32767 -1) // ARM:UINT16_MAX_ 65535 // ARM:INT_LEAST16_MIN_ (-32767 -1) // ARM:INT_LEAST16_MAX_ 32767 // ARM:UINT_LEAST16_MAX_ 65535 // ARM:INT_FAST16_MIN_ (-32767 -1) // ARM:INT_FAST16_MAX_ 32767 // ARM:UINT_FAST16_MAX_ 65535 // // ARM:INT32_MAX_ 2147483647 // ARM:INT32_MIN_ (-2147483647 -1) // ARM:UINT32_MAX_ 4294967295U // ARM:INT_LEAST32_MIN_ (-2147483647 -1) // ARM:INT_LEAST32_MAX_ 2147483647 // ARM:UINT_LEAST32_MAX_ 4294967295U // ARM:INT_FAST32_MIN_ (-2147483647 -1) // ARM:INT_FAST32_MAX_ 2147483647 // ARM:UINT_FAST32_MAX_ 4294967295U // // ARM:INT64_MAX_ 9223372036854775807LL // ARM:INT64_MIN_ (-9223372036854775807LL -1) // ARM:UINT64_MAX_ 18446744073709551615ULL // ARM:INT_LEAST64_MIN_ (-9223372036854775807LL -1) // ARM:INT_LEAST64_MAX_ 9223372036854775807LL // ARM:UINT_LEAST64_MAX_ 18446744073709551615ULL // ARM:INT_FAST64_MIN_ (-9223372036854775807LL -1) // ARM:INT_FAST64_MAX_ 9223372036854775807LL // ARM:UINT_FAST64_MAX_ 18446744073709551615ULL // // ARM:INTPTR_MIN_ (-2147483647 -1) // ARM:INTPTR_MAX_ 2147483647 // ARM:UINTPTR_MAX_ 4294967295U // ARM:PTRDIFF_MIN_ (-2147483647 -1) // ARM:PTRDIFF_MAX_ 2147483647 // ARM:SIZE_MAX_ 4294967295U // // ARM:INTMAX_MIN_ (-9223372036854775807LL -1) // ARM:INTMAX_MAX_ 9223372036854775807LL // ARM:UINTMAX_MAX_ 18446744073709551615ULL // // ARM:SIG_ATOMIC_MIN_ (-2147483647 -1) // ARM:SIG_ATOMIC_MAX_ 2147483647 // ARM:WINT_MIN_ (-2147483647 -1) // ARM:WINT_MAX_ 2147483647 // // ARM:WCHAR_MAX_ 4294967295U // ARM:WCHAR_MIN_ 0U // // ARM:INT8_C_(0) 0 // ARM:UINT8_C_(0) 0U // ARM:INT16_C_(0) 0 // ARM:UINT16_C_(0) 0U // ARM:INT32_C_(0) 0 // ARM:UINT32_C_(0) 0U // ARM:INT64_C_(0) 0LL // ARM:UINT64_C_(0) 0ULL // // ARM:INTMAX_C_(0) 0LL // ARM:UINTMAX_C_(0) 0ULL // // // RUN: %clang_cc1 -E -ffreestanding -triple=i386-none-none %s | FileCheck -check-prefix I386 %s // // I386:typedef long long int int64_t; // I386:typedef long long unsigned int uint64_t; // I386:typedef int64_t int_least64_t; // I386:typedef uint64_t uint_least64_t; // I386:typedef int64_t int_fast64_t; // I386:typedef uint64_t uint_fast64_t; // // I386:typedef int int32_t; // I386:typedef unsigned int uint32_t; // I386:typedef int32_t int_least32_t; // I386:typedef uint32_t uint_least32_t; // I386:typedef int32_t int_fast32_t; // I386:typedef uint32_t uint_fast32_t; // // I386:typedef short int16_t; // I386:typedef unsigned short uint16_t; // I386:typedef int16_t int_least16_t; // I386:typedef uint16_t uint_least16_t; // I386:typedef int16_t int_fast16_t; // I386:typedef uint16_t uint_fast16_t; // // I386:typedef signed char int8_t; // I386:typedef unsigned char uint8_t; // I386:typedef int8_t int_least8_t; // I386:typedef uint8_t uint_least8_t; // I386:typedef int8_t int_fast8_t; // I386:typedef uint8_t uint_fast8_t; // // I386:typedef int32_t intptr_t; // I386:typedef uint32_t uintptr_t; // // I386:typedef long long int intmax_t; // I386:typedef long long unsigned int uintmax_t; // // I386:INT8_MAX_ 127 // I386:INT8_MIN_ (-127 -1) // I386:UINT8_MAX_ 255 // I386:INT_LEAST8_MIN_ (-127 -1) // I386:INT_LEAST8_MAX_ 127 // I386:UINT_LEAST8_MAX_ 255 // I386:INT_FAST8_MIN_ (-127 -1) // I386:INT_FAST8_MAX_ 127 // I386:UINT_FAST8_MAX_ 255 // // I386:INT16_MAX_ 32767 // I386:INT16_MIN_ (-32767 -1) // I386:UINT16_MAX_ 65535 // I386:INT_LEAST16_MIN_ (-32767 -1) // I386:INT_LEAST16_MAX_ 32767 // I386:UINT_LEAST16_MAX_ 65535 // I386:INT_FAST16_MIN_ (-32767 -1) // I386:INT_FAST16_MAX_ 32767 // I386:UINT_FAST16_MAX_ 65535 // // I386:INT32_MAX_ 2147483647 // I386:INT32_MIN_ (-2147483647 -1) // I386:UINT32_MAX_ 4294967295U // I386:INT_LEAST32_MIN_ (-2147483647 -1) // I386:INT_LEAST32_MAX_ 2147483647 // I386:UINT_LEAST32_MAX_ 4294967295U // I386:INT_FAST32_MIN_ (-2147483647 -1) // I386:INT_FAST32_MAX_ 2147483647 // I386:UINT_FAST32_MAX_ 4294967295U // // I386:INT64_MAX_ 9223372036854775807LL // I386:INT64_MIN_ (-9223372036854775807LL -1) // I386:UINT64_MAX_ 18446744073709551615ULL // I386:INT_LEAST64_MIN_ (-9223372036854775807LL -1) // I386:INT_LEAST64_MAX_ 9223372036854775807LL // I386:UINT_LEAST64_MAX_ 18446744073709551615ULL // I386:INT_FAST64_MIN_ (-9223372036854775807LL -1) // I386:INT_FAST64_MAX_ 9223372036854775807LL // I386:UINT_FAST64_MAX_ 18446744073709551615ULL // // I386:INTPTR_MIN_ (-2147483647 -1) // I386:INTPTR_MAX_ 2147483647 // I386:UINTPTR_MAX_ 4294967295U // I386:PTRDIFF_MIN_ (-2147483647 -1) // I386:PTRDIFF_MAX_ 2147483647 // I386:SIZE_MAX_ 4294967295U // // I386:INTMAX_MIN_ (-9223372036854775807LL -1) // I386:INTMAX_MAX_ 9223372036854775807LL // I386:UINTMAX_MAX_ 18446744073709551615ULL // // I386:SIG_ATOMIC_MIN_ (-2147483647 -1) // I386:SIG_ATOMIC_MAX_ 2147483647 // I386:WINT_MIN_ (-2147483647 -1) // I386:WINT_MAX_ 2147483647 // // I386:WCHAR_MAX_ 2147483647 // I386:WCHAR_MIN_ (-2147483647 -1) // // I386:INT8_C_(0) 0 // I386:UINT8_C_(0) 0U // I386:INT16_C_(0) 0 // I386:UINT16_C_(0) 0U // I386:INT32_C_(0) 0 // I386:UINT32_C_(0) 0U // I386:INT64_C_(0) 0LL // I386:UINT64_C_(0) 0ULL // // I386:INTMAX_C_(0) 0LL // I386:UINTMAX_C_(0) 0ULL // // RUN: %clang_cc1 -E -ffreestanding -triple=mips-none-none %s | FileCheck -check-prefix MIPS %s // // MIPS:typedef long long int int64_t; // MIPS:typedef long long unsigned int uint64_t; // MIPS:typedef int64_t int_least64_t; // MIPS:typedef uint64_t uint_least64_t; // MIPS:typedef int64_t int_fast64_t; // MIPS:typedef uint64_t uint_fast64_t; // // MIPS:typedef int int32_t; // MIPS:typedef unsigned int uint32_t; // MIPS:typedef int32_t int_least32_t; // MIPS:typedef uint32_t uint_least32_t; // MIPS:typedef int32_t int_fast32_t; // MIPS:typedef uint32_t uint_fast32_t; // // MIPS:typedef short int16_t; // MIPS:typedef unsigned short uint16_t; // MIPS:typedef int16_t int_least16_t; // MIPS:typedef uint16_t uint_least16_t; // MIPS:typedef int16_t int_fast16_t; // MIPS:typedef uint16_t uint_fast16_t; // // MIPS:typedef signed char int8_t; // MIPS:typedef unsigned char uint8_t; // MIPS:typedef int8_t int_least8_t; // MIPS:typedef uint8_t uint_least8_t; // MIPS:typedef int8_t int_fast8_t; // MIPS:typedef uint8_t uint_fast8_t; // // MIPS:typedef int32_t intptr_t; // MIPS:typedef uint32_t uintptr_t; // // MIPS:typedef long long int intmax_t; // MIPS:typedef long long unsigned int uintmax_t; // // MIPS:INT8_MAX_ 127 // MIPS:INT8_MIN_ (-127 -1) // MIPS:UINT8_MAX_ 255 // MIPS:INT_LEAST8_MIN_ (-127 -1) // MIPS:INT_LEAST8_MAX_ 127 // MIPS:UINT_LEAST8_MAX_ 255 // MIPS:INT_FAST8_MIN_ (-127 -1) // MIPS:INT_FAST8_MAX_ 127 // MIPS:UINT_FAST8_MAX_ 255 // // MIPS:INT16_MAX_ 32767 // MIPS:INT16_MIN_ (-32767 -1) // MIPS:UINT16_MAX_ 65535 // MIPS:INT_LEAST16_MIN_ (-32767 -1) // MIPS:INT_LEAST16_MAX_ 32767 // MIPS:UINT_LEAST16_MAX_ 65535 // MIPS:INT_FAST16_MIN_ (-32767 -1) // MIPS:INT_FAST16_MAX_ 32767 // MIPS:UINT_FAST16_MAX_ 65535 // // MIPS:INT32_MAX_ 2147483647 // MIPS:INT32_MIN_ (-2147483647 -1) // MIPS:UINT32_MAX_ 4294967295U // MIPS:INT_LEAST32_MIN_ (-2147483647 -1) // MIPS:INT_LEAST32_MAX_ 2147483647 // MIPS:UINT_LEAST32_MAX_ 4294967295U // MIPS:INT_FAST32_MIN_ (-2147483647 -1) // MIPS:INT_FAST32_MAX_ 2147483647 // MIPS:UINT_FAST32_MAX_ 4294967295U // // MIPS:INT64_MAX_ 9223372036854775807LL // MIPS:INT64_MIN_ (-9223372036854775807LL -1) // MIPS:UINT64_MAX_ 18446744073709551615ULL // MIPS:INT_LEAST64_MIN_ (-9223372036854775807LL -1) // MIPS:INT_LEAST64_MAX_ 9223372036854775807LL // MIPS:UINT_LEAST64_MAX_ 18446744073709551615ULL // MIPS:INT_FAST64_MIN_ (-9223372036854775807LL -1) // MIPS:INT_FAST64_MAX_ 9223372036854775807LL // MIPS:UINT_FAST64_MAX_ 18446744073709551615ULL // // MIPS:INTPTR_MIN_ (-2147483647 -1) // MIPS:INTPTR_MAX_ 2147483647 // MIPS:UINTPTR_MAX_ 4294967295U // MIPS:PTRDIFF_MIN_ (-2147483647 -1) // MIPS:PTRDIFF_MAX_ 2147483647 // MIPS:SIZE_MAX_ 4294967295U // // MIPS:INTMAX_MIN_ (-9223372036854775807LL -1) // MIPS:INTMAX_MAX_ 9223372036854775807LL // MIPS:UINTMAX_MAX_ 18446744073709551615ULL // // MIPS:SIG_ATOMIC_MIN_ (-2147483647 -1) // MIPS:SIG_ATOMIC_MAX_ 2147483647 // MIPS:WINT_MIN_ (-2147483647 -1) // MIPS:WINT_MAX_ 2147483647 // // MIPS:WCHAR_MAX_ 2147483647 // MIPS:WCHAR_MIN_ (-2147483647 -1) // // MIPS:INT8_C_(0) 0 // MIPS:UINT8_C_(0) 0U // MIPS:INT16_C_(0) 0 // MIPS:UINT16_C_(0) 0U // MIPS:INT32_C_(0) 0 // MIPS:UINT32_C_(0) 0U // MIPS:INT64_C_(0) 0LL // MIPS:UINT64_C_(0) 0ULL // // MIPS:INTMAX_C_(0) 0LL // MIPS:UINTMAX_C_(0) 0ULL // // RUN: %clang_cc1 -E -ffreestanding -triple=mips64-none-none %s | FileCheck -check-prefix MIPS64 %s // // MIPS64:typedef long int int64_t; // MIPS64:typedef long unsigned int uint64_t; // MIPS64:typedef int64_t int_least64_t; // MIPS64:typedef uint64_t uint_least64_t; // MIPS64:typedef int64_t int_fast64_t; // MIPS64:typedef uint64_t uint_fast64_t; // // MIPS64:typedef int int32_t; // MIPS64:typedef unsigned int uint32_t; // MIPS64:typedef int32_t int_least32_t; // MIPS64:typedef uint32_t uint_least32_t; // MIPS64:typedef int32_t int_fast32_t; // MIPS64:typedef uint32_t uint_fast32_t; // // MIPS64:typedef short int16_t; // MIPS64:typedef unsigned short uint16_t; // MIPS64:typedef int16_t int_least16_t; // MIPS64:typedef uint16_t uint_least16_t; // MIPS64:typedef int16_t int_fast16_t; // MIPS64:typedef uint16_t uint_fast16_t; // // MIPS64:typedef signed char int8_t; // MIPS64:typedef unsigned char uint8_t; // MIPS64:typedef int8_t int_least8_t; // MIPS64:typedef uint8_t uint_least8_t; // MIPS64:typedef int8_t int_fast8_t; // MIPS64:typedef uint8_t uint_fast8_t; // // MIPS64:typedef int64_t intptr_t; // MIPS64:typedef uint64_t uintptr_t; // // MIPS64:typedef long int intmax_t; // MIPS64:typedef long unsigned int uintmax_t; // // MIPS64:INT8_MAX_ 127 // MIPS64:INT8_MIN_ (-127 -1) // MIPS64:UINT8_MAX_ 255 // MIPS64:INT_LEAST8_MIN_ (-127 -1) // MIPS64:INT_LEAST8_MAX_ 127 // MIPS64:UINT_LEAST8_MAX_ 255 // MIPS64:INT_FAST8_MIN_ (-127 -1) // MIPS64:INT_FAST8_MAX_ 127 // MIPS64:UINT_FAST8_MAX_ 255 // // MIPS64:INT16_MAX_ 32767 // MIPS64:INT16_MIN_ (-32767 -1) // MIPS64:UINT16_MAX_ 65535 // MIPS64:INT_LEAST16_MIN_ (-32767 -1) // MIPS64:INT_LEAST16_MAX_ 32767 // MIPS64:UINT_LEAST16_MAX_ 65535 // MIPS64:INT_FAST16_MIN_ (-32767 -1) // MIPS64:INT_FAST16_MAX_ 32767 // MIPS64:UINT_FAST16_MAX_ 65535 // // MIPS64:INT32_MAX_ 2147483647 // MIPS64:INT32_MIN_ (-2147483647 -1) // MIPS64:UINT32_MAX_ 4294967295U // MIPS64:INT_LEAST32_MIN_ (-2147483647 -1) // MIPS64:INT_LEAST32_MAX_ 2147483647 // MIPS64:UINT_LEAST32_MAX_ 4294967295U // MIPS64:INT_FAST32_MIN_ (-2147483647 -1) // MIPS64:INT_FAST32_MAX_ 2147483647 // MIPS64:UINT_FAST32_MAX_ 4294967295U // // MIPS64:INT64_MAX_ 9223372036854775807L // MIPS64:INT64_MIN_ (-9223372036854775807L -1) // MIPS64:UINT64_MAX_ 18446744073709551615UL // MIPS64:INT_LEAST64_MIN_ (-9223372036854775807L -1) // MIPS64:INT_LEAST64_MAX_ 9223372036854775807L // MIPS64:UINT_LEAST64_MAX_ 18446744073709551615UL // MIPS64:INT_FAST64_MIN_ (-9223372036854775807L -1) // MIPS64:INT_FAST64_MAX_ 9223372036854775807L // MIPS64:UINT_FAST64_MAX_ 18446744073709551615UL // // MIPS64:INTPTR_MIN_ (-9223372036854775807L -1) // MIPS64:INTPTR_MAX_ 9223372036854775807L // MIPS64:UINTPTR_MAX_ 18446744073709551615UL // MIPS64:PTRDIFF_MIN_ (-9223372036854775807L -1) // MIPS64:PTRDIFF_MAX_ 9223372036854775807L // MIPS64:SIZE_MAX_ 18446744073709551615UL // // MIPS64:INTMAX_MIN_ (-9223372036854775807L -1) // MIPS64:INTMAX_MAX_ 9223372036854775807L // MIPS64:UINTMAX_MAX_ 18446744073709551615UL // // MIPS64:SIG_ATOMIC_MIN_ (-2147483647 -1) // MIPS64:SIG_ATOMIC_MAX_ 2147483647 // MIPS64:WINT_MIN_ (-2147483647 -1) // MIPS64:WINT_MAX_ 2147483647 // // MIPS64:WCHAR_MAX_ 2147483647 // MIPS64:WCHAR_MIN_ (-2147483647 -1) // // MIPS64:INT8_C_(0) 0 // MIPS64:UINT8_C_(0) 0U // MIPS64:INT16_C_(0) 0 // MIPS64:UINT16_C_(0) 0U // MIPS64:INT32_C_(0) 0 // MIPS64:UINT32_C_(0) 0U // MIPS64:INT64_C_(0) 0L // MIPS64:UINT64_C_(0) 0UL // // MIPS64:INTMAX_C_(0) 0L // MIPS64:UINTMAX_C_(0) 0UL // // RUN: %clang_cc1 -E -ffreestanding -triple=msp430-none-none %s | FileCheck -check-prefix MSP430 %s // // MSP430:typedef long int int32_t; // MSP430:typedef long unsigned int uint32_t; // MSP430:typedef int32_t int_least32_t; // MSP430:typedef uint32_t uint_least32_t; // MSP430:typedef int32_t int_fast32_t; // MSP430:typedef uint32_t uint_fast32_t; // // MSP430:typedef short int16_t; // MSP430:typedef unsigned short uint16_t; // MSP430:typedef int16_t int_least16_t; // MSP430:typedef uint16_t uint_least16_t; // MSP430:typedef int16_t int_fast16_t; // MSP430:typedef uint16_t uint_fast16_t; // // MSP430:typedef signed char int8_t; // MSP430:typedef unsigned char uint8_t; // MSP430:typedef int8_t int_least8_t; // MSP430:typedef uint8_t uint_least8_t; // MSP430:typedef int8_t int_fast8_t; // MSP430:typedef uint8_t uint_fast8_t; // // MSP430:typedef int16_t intptr_t; // MSP430:typedef uint16_t uintptr_t; // // MSP430:typedef long long int intmax_t; // MSP430:typedef long long unsigned int uintmax_t; // // MSP430:INT8_MAX_ 127 // MSP430:INT8_MIN_ (-127 -1) // MSP430:UINT8_MAX_ 255 // MSP430:INT_LEAST8_MIN_ (-127 -1) // MSP430:INT_LEAST8_MAX_ 127 // MSP430:UINT_LEAST8_MAX_ 255 // MSP430:INT_FAST8_MIN_ (-127 -1) // MSP430:INT_FAST8_MAX_ 127 // MSP430:UINT_FAST8_MAX_ 255 // // MSP430:INT16_MAX_ 32767 // MSP430:INT16_MIN_ (-32767 -1) // MSP430:UINT16_MAX_ 65535 // MSP430:INT_LEAST16_MIN_ (-32767 -1) // MSP430:INT_LEAST16_MAX_ 32767 // MSP430:UINT_LEAST16_MAX_ 65535 // MSP430:INT_FAST16_MIN_ (-32767 -1) // MSP430:INT_FAST16_MAX_ 32767 // MSP430:UINT_FAST16_MAX_ 65535 // // MSP430:INT32_MAX_ 2147483647L // MSP430:INT32_MIN_ (-2147483647L -1) // MSP430:UINT32_MAX_ 4294967295UL // MSP430:INT_LEAST32_MIN_ (-2147483647L -1) // MSP430:INT_LEAST32_MAX_ 2147483647L // MSP430:UINT_LEAST32_MAX_ 4294967295UL // MSP430:INT_FAST32_MIN_ (-2147483647L -1) // MSP430:INT_FAST32_MAX_ 2147483647L // MSP430:UINT_FAST32_MAX_ 4294967295UL // // MSP430:INT64_MAX_ 9223372036854775807LL // MSP430:INT64_MIN_ (-9223372036854775807LL -1) // MSP430:UINT64_MAX_ 18446744073709551615ULL // MSP430:INT_LEAST64_MIN_ (-9223372036854775807LL -1) // MSP430:INT_LEAST64_MAX_ 9223372036854775807LL // MSP430:UINT_LEAST64_MAX_ 18446744073709551615ULL // MSP430:INT_FAST64_MIN_ (-9223372036854775807LL -1) // MSP430:INT_FAST64_MAX_ 9223372036854775807LL // MSP430:UINT_FAST64_MAX_ 18446744073709551615ULL // // MSP430:INTPTR_MIN_ (-32767 -1) // MSP430:INTPTR_MAX_ 32767 // MSP430:UINTPTR_MAX_ 65535 // MSP430:PTRDIFF_MIN_ (-32767 -1) // MSP430:PTRDIFF_MAX_ 32767 // MSP430:SIZE_MAX_ 65535 // // MSP430:INTMAX_MIN_ (-9223372036854775807LL -1) // MSP430:INTMAX_MAX_ 9223372036854775807LL // MSP430:UINTMAX_MAX_ 18446744073709551615ULL // // MSP430:SIG_ATOMIC_MIN_ (-2147483647L -1) // MSP430:SIG_ATOMIC_MAX_ 2147483647L // MSP430:WINT_MIN_ (-32767 -1) // MSP430:WINT_MAX_ 32767 // // MSP430:WCHAR_MAX_ 32767 // MSP430:WCHAR_MIN_ (-32767 -1) // // MSP430:INT8_C_(0) 0 // MSP430:UINT8_C_(0) 0U // MSP430:INT16_C_(0) 0 // MSP430:UINT16_C_(0) 0U // MSP430:INT32_C_(0) 0L // MSP430:UINT32_C_(0) 0UL // MSP430:INT64_C_(0) 0LL // MSP430:UINT64_C_(0) 0ULL // // MSP430:INTMAX_C_(0) 0L // MSP430:UINTMAX_C_(0) 0UL // // RUN: %clang_cc1 -E -ffreestanding -triple=powerpc64-none-none %s | FileCheck -check-prefix PPC64 %s // // PPC64:typedef long int int64_t; // PPC64:typedef long unsigned int uint64_t; // PPC64:typedef int64_t int_least64_t; // PPC64:typedef uint64_t uint_least64_t; // PPC64:typedef int64_t int_fast64_t; // PPC64:typedef uint64_t uint_fast64_t; // // PPC64:typedef int int32_t; // PPC64:typedef unsigned int uint32_t; // PPC64:typedef int32_t int_least32_t; // PPC64:typedef uint32_t uint_least32_t; // PPC64:typedef int32_t int_fast32_t; // PPC64:typedef uint32_t uint_fast32_t; // // PPC64:typedef short int16_t; // PPC64:typedef unsigned short uint16_t; // PPC64:typedef int16_t int_least16_t; // PPC64:typedef uint16_t uint_least16_t; // PPC64:typedef int16_t int_fast16_t; // PPC64:typedef uint16_t uint_fast16_t; // // PPC64:typedef signed char int8_t; // PPC64:typedef unsigned char uint8_t; // PPC64:typedef int8_t int_least8_t; // PPC64:typedef uint8_t uint_least8_t; // PPC64:typedef int8_t int_fast8_t; // PPC64:typedef uint8_t uint_fast8_t; // // PPC64:typedef int64_t intptr_t; // PPC64:typedef uint64_t uintptr_t; // // PPC64:typedef long int intmax_t; // PPC64:typedef long unsigned int uintmax_t; // // PPC64:INT8_MAX_ 127 // PPC64:INT8_MIN_ (-127 -1) // PPC64:UINT8_MAX_ 255 // PPC64:INT_LEAST8_MIN_ (-127 -1) // PPC64:INT_LEAST8_MAX_ 127 // PPC64:UINT_LEAST8_MAX_ 255 // PPC64:INT_FAST8_MIN_ (-127 -1) // PPC64:INT_FAST8_MAX_ 127 // PPC64:UINT_FAST8_MAX_ 255 // // PPC64:INT16_MAX_ 32767 // PPC64:INT16_MIN_ (-32767 -1) // PPC64:UINT16_MAX_ 65535 // PPC64:INT_LEAST16_MIN_ (-32767 -1) // PPC64:INT_LEAST16_MAX_ 32767 // PPC64:UINT_LEAST16_MAX_ 65535 // PPC64:INT_FAST16_MIN_ (-32767 -1) // PPC64:INT_FAST16_MAX_ 32767 // PPC64:UINT_FAST16_MAX_ 65535 // // PPC64:INT32_MAX_ 2147483647 // PPC64:INT32_MIN_ (-2147483647 -1) // PPC64:UINT32_MAX_ 4294967295U // PPC64:INT_LEAST32_MIN_ (-2147483647 -1) // PPC64:INT_LEAST32_MAX_ 2147483647 // PPC64:UINT_LEAST32_MAX_ 4294967295U // PPC64:INT_FAST32_MIN_ (-2147483647 -1) // PPC64:INT_FAST32_MAX_ 2147483647 // PPC64:UINT_FAST32_MAX_ 4294967295U // // PPC64:INT64_MAX_ 9223372036854775807L // PPC64:INT64_MIN_ (-9223372036854775807L -1) // PPC64:UINT64_MAX_ 18446744073709551615UL // PPC64:INT_LEAST64_MIN_ (-9223372036854775807L -1) // PPC64:INT_LEAST64_MAX_ 9223372036854775807L // PPC64:UINT_LEAST64_MAX_ 18446744073709551615UL // PPC64:INT_FAST64_MIN_ (-9223372036854775807L -1) // PPC64:INT_FAST64_MAX_ 9223372036854775807L // PPC64:UINT_FAST64_MAX_ 18446744073709551615UL // // PPC64:INTPTR_MIN_ (-9223372036854775807L -1) // PPC64:INTPTR_MAX_ 9223372036854775807L // PPC64:UINTPTR_MAX_ 18446744073709551615UL // PPC64:PTRDIFF_MIN_ (-9223372036854775807L -1) // PPC64:PTRDIFF_MAX_ 9223372036854775807L // PPC64:SIZE_MAX_ 18446744073709551615UL // // PPC64:INTMAX_MIN_ (-9223372036854775807L -1) // PPC64:INTMAX_MAX_ 9223372036854775807L // PPC64:UINTMAX_MAX_ 18446744073709551615UL // // PPC64:SIG_ATOMIC_MIN_ (-2147483647 -1) // PPC64:SIG_ATOMIC_MAX_ 2147483647 // PPC64:WINT_MIN_ (-2147483647 -1) // PPC64:WINT_MAX_ 2147483647 // // PPC64:WCHAR_MAX_ 2147483647 // PPC64:WCHAR_MIN_ (-2147483647 -1) // // PPC64:INT8_C_(0) 0 // PPC64:UINT8_C_(0) 0U // PPC64:INT16_C_(0) 0 // PPC64:UINT16_C_(0) 0U // PPC64:INT32_C_(0) 0 // PPC64:UINT32_C_(0) 0U // PPC64:INT64_C_(0) 0L // PPC64:UINT64_C_(0) 0UL // // PPC64:INTMAX_C_(0) 0L // PPC64:UINTMAX_C_(0) 0UL // // RUN: %clang_cc1 -E -ffreestanding -triple=powerpc64-none-netbsd %s | FileCheck -check-prefix PPC64-NETBSD %s // // PPC64-NETBSD:typedef long long int int64_t; // PPC64-NETBSD:typedef long long unsigned int uint64_t; // PPC64-NETBSD:typedef int64_t int_least64_t; // PPC64-NETBSD:typedef uint64_t uint_least64_t; // PPC64-NETBSD:typedef int64_t int_fast64_t; // PPC64-NETBSD:typedef uint64_t uint_fast64_t; // // PPC64-NETBSD:typedef int int32_t; // PPC64-NETBSD:typedef unsigned int uint32_t; // PPC64-NETBSD:typedef int32_t int_least32_t; // PPC64-NETBSD:typedef uint32_t uint_least32_t; // PPC64-NETBSD:typedef int32_t int_fast32_t; // PPC64-NETBSD:typedef uint32_t uint_fast32_t; // // PPC64-NETBSD:typedef short int16_t; // PPC64-NETBSD:typedef unsigned short uint16_t; // PPC64-NETBSD:typedef int16_t int_least16_t; // PPC64-NETBSD:typedef uint16_t uint_least16_t; // PPC64-NETBSD:typedef int16_t int_fast16_t; // PPC64-NETBSD:typedef uint16_t uint_fast16_t; // // PPC64-NETBSD:typedef signed char int8_t; // PPC64-NETBSD:typedef unsigned char uint8_t; // PPC64-NETBSD:typedef int8_t int_least8_t; // PPC64-NETBSD:typedef uint8_t uint_least8_t; // PPC64-NETBSD:typedef int8_t int_fast8_t; // PPC64-NETBSD:typedef uint8_t uint_fast8_t; // // PPC64-NETBSD:typedef int64_t intptr_t; // PPC64-NETBSD:typedef uint64_t uintptr_t; // // PPC64-NETBSD:typedef long long int intmax_t; // PPC64-NETBSD:typedef long long unsigned int uintmax_t; // // PPC64-NETBSD:INT8_MAX_ 127 // PPC64-NETBSD:INT8_MIN_ (-127 -1) // PPC64-NETBSD:UINT8_MAX_ 255 // PPC64-NETBSD:INT_LEAST8_MIN_ (-127 -1) // PPC64-NETBSD:INT_LEAST8_MAX_ 127 // PPC64-NETBSD:UINT_LEAST8_MAX_ 255 // PPC64-NETBSD:INT_FAST8_MIN_ (-127 -1) // PPC64-NETBSD:INT_FAST8_MAX_ 127 // PPC64-NETBSD:UINT_FAST8_MAX_ 255 // // PPC64-NETBSD:INT16_MAX_ 32767 // PPC64-NETBSD:INT16_MIN_ (-32767 -1) // PPC64-NETBSD:UINT16_MAX_ 65535 // PPC64-NETBSD:INT_LEAST16_MIN_ (-32767 -1) // PPC64-NETBSD:INT_LEAST16_MAX_ 32767 // PPC64-NETBSD:UINT_LEAST16_MAX_ 65535 // PPC64-NETBSD:INT_FAST16_MIN_ (-32767 -1) // PPC64-NETBSD:INT_FAST16_MAX_ 32767 // PPC64-NETBSD:UINT_FAST16_MAX_ 65535 // // PPC64-NETBSD:INT32_MAX_ 2147483647 // PPC64-NETBSD:INT32_MIN_ (-2147483647 -1) // PPC64-NETBSD:UINT32_MAX_ 4294967295U // PPC64-NETBSD:INT_LEAST32_MIN_ (-2147483647 -1) // PPC64-NETBSD:INT_LEAST32_MAX_ 2147483647 // PPC64-NETBSD:UINT_LEAST32_MAX_ 4294967295U // PPC64-NETBSD:INT_FAST32_MIN_ (-2147483647 -1) // PPC64-NETBSD:INT_FAST32_MAX_ 2147483647 // PPC64-NETBSD:UINT_FAST32_MAX_ 4294967295U // // PPC64-NETBSD:INT64_MAX_ 9223372036854775807LL // PPC64-NETBSD:INT64_MIN_ (-9223372036854775807LL -1) // PPC64-NETBSD:UINT64_MAX_ 18446744073709551615ULL // PPC64-NETBSD:INT_LEAST64_MIN_ (-9223372036854775807LL -1) // PPC64-NETBSD:INT_LEAST64_MAX_ 9223372036854775807LL // PPC64-NETBSD:UINT_LEAST64_MAX_ 18446744073709551615ULL // PPC64-NETBSD:INT_FAST64_MIN_ (-9223372036854775807LL -1) // PPC64-NETBSD:INT_FAST64_MAX_ 9223372036854775807LL // PPC64-NETBSD:UINT_FAST64_MAX_ 18446744073709551615ULL // // PPC64-NETBSD:INTPTR_MIN_ (-9223372036854775807LL -1) // PPC64-NETBSD:INTPTR_MAX_ 9223372036854775807LL // PPC64-NETBSD:UINTPTR_MAX_ 18446744073709551615ULL // PPC64-NETBSD:PTRDIFF_MIN_ (-9223372036854775807LL -1) // PPC64-NETBSD:PTRDIFF_MAX_ 9223372036854775807LL // PPC64-NETBSD:SIZE_MAX_ 18446744073709551615ULL // // PPC64-NETBSD:INTMAX_MIN_ (-9223372036854775807LL -1) // PPC64-NETBSD:INTMAX_MAX_ 9223372036854775807LL // PPC64-NETBSD:UINTMAX_MAX_ 18446744073709551615ULL // // PPC64-NETBSD:SIG_ATOMIC_MIN_ (-2147483647 -1) // PPC64-NETBSD:SIG_ATOMIC_MAX_ 2147483647 // PPC64-NETBSD:WINT_MIN_ (-2147483647 -1) // PPC64-NETBSD:WINT_MAX_ 2147483647 // // PPC64-NETBSD:WCHAR_MAX_ 2147483647 // PPC64-NETBSD:WCHAR_MIN_ (-2147483647 -1) // // PPC64-NETBSD:INT8_C_(0) 0 // PPC64-NETBSD:UINT8_C_(0) 0U // PPC64-NETBSD:INT16_C_(0) 0 // PPC64-NETBSD:UINT16_C_(0) 0U // PPC64-NETBSD:INT32_C_(0) 0 // PPC64-NETBSD:UINT32_C_(0) 0U // PPC64-NETBSD:INT64_C_(0) 0LL // PPC64-NETBSD:UINT64_C_(0) 0ULL // // PPC64-NETBSD:INTMAX_C_(0) 0LL // PPC64-NETBSD:UINTMAX_C_(0) 0ULL // // RUN: %clang_cc1 -E -ffreestanding -triple=powerpc-none-none %s | FileCheck -check-prefix PPC %s // // // PPC:typedef long long int int64_t; // PPC:typedef long long unsigned int uint64_t; // PPC:typedef int64_t int_least64_t; // PPC:typedef uint64_t uint_least64_t; // PPC:typedef int64_t int_fast64_t; // PPC:typedef uint64_t uint_fast64_t; // // PPC:typedef int int32_t; // PPC:typedef unsigned int uint32_t; // PPC:typedef int32_t int_least32_t; // PPC:typedef uint32_t uint_least32_t; // PPC:typedef int32_t int_fast32_t; // PPC:typedef uint32_t uint_fast32_t; // // PPC:typedef short int16_t; // PPC:typedef unsigned short uint16_t; // PPC:typedef int16_t int_least16_t; // PPC:typedef uint16_t uint_least16_t; // PPC:typedef int16_t int_fast16_t; // PPC:typedef uint16_t uint_fast16_t; // // PPC:typedef signed char int8_t; // PPC:typedef unsigned char uint8_t; // PPC:typedef int8_t int_least8_t; // PPC:typedef uint8_t uint_least8_t; // PPC:typedef int8_t int_fast8_t; // PPC:typedef uint8_t uint_fast8_t; // // PPC:typedef int32_t intptr_t; // PPC:typedef uint32_t uintptr_t; // // PPC:typedef long long int intmax_t; // PPC:typedef long long unsigned int uintmax_t; // // PPC:INT8_MAX_ 127 // PPC:INT8_MIN_ (-127 -1) // PPC:UINT8_MAX_ 255 // PPC:INT_LEAST8_MIN_ (-127 -1) // PPC:INT_LEAST8_MAX_ 127 // PPC:UINT_LEAST8_MAX_ 255 // PPC:INT_FAST8_MIN_ (-127 -1) // PPC:INT_FAST8_MAX_ 127 // PPC:UINT_FAST8_MAX_ 255 // // PPC:INT16_MAX_ 32767 // PPC:INT16_MIN_ (-32767 -1) // PPC:UINT16_MAX_ 65535 // PPC:INT_LEAST16_MIN_ (-32767 -1) // PPC:INT_LEAST16_MAX_ 32767 // PPC:UINT_LEAST16_MAX_ 65535 // PPC:INT_FAST16_MIN_ (-32767 -1) // PPC:INT_FAST16_MAX_ 32767 // PPC:UINT_FAST16_MAX_ 65535 // // PPC:INT32_MAX_ 2147483647 // PPC:INT32_MIN_ (-2147483647 -1) // PPC:UINT32_MAX_ 4294967295U // PPC:INT_LEAST32_MIN_ (-2147483647 -1) // PPC:INT_LEAST32_MAX_ 2147483647 // PPC:UINT_LEAST32_MAX_ 4294967295U // PPC:INT_FAST32_MIN_ (-2147483647 -1) // PPC:INT_FAST32_MAX_ 2147483647 // PPC:UINT_FAST32_MAX_ 4294967295U // // PPC:INT64_MAX_ 9223372036854775807LL // PPC:INT64_MIN_ (-9223372036854775807LL -1) // PPC:UINT64_MAX_ 18446744073709551615ULL // PPC:INT_LEAST64_MIN_ (-9223372036854775807LL -1) // PPC:INT_LEAST64_MAX_ 9223372036854775807LL // PPC:UINT_LEAST64_MAX_ 18446744073709551615ULL // PPC:INT_FAST64_MIN_ (-9223372036854775807LL -1) // PPC:INT_FAST64_MAX_ 9223372036854775807LL // PPC:UINT_FAST64_MAX_ 18446744073709551615ULL // // PPC:INTPTR_MIN_ (-2147483647 -1) // PPC:INTPTR_MAX_ 2147483647 // PPC:UINTPTR_MAX_ 4294967295U // PPC:PTRDIFF_MIN_ (-2147483647 -1) // PPC:PTRDIFF_MAX_ 2147483647 // PPC:SIZE_MAX_ 4294967295U // // PPC:INTMAX_MIN_ (-9223372036854775807LL -1) // PPC:INTMAX_MAX_ 9223372036854775807LL // PPC:UINTMAX_MAX_ 18446744073709551615ULL // // PPC:SIG_ATOMIC_MIN_ (-2147483647 -1) // PPC:SIG_ATOMIC_MAX_ 2147483647 // PPC:WINT_MIN_ (-2147483647 -1) // PPC:WINT_MAX_ 2147483647 // // PPC:WCHAR_MAX_ 2147483647 // PPC:WCHAR_MIN_ (-2147483647 -1) // // PPC:INT8_C_(0) 0 // PPC:UINT8_C_(0) 0U // PPC:INT16_C_(0) 0 // PPC:UINT16_C_(0) 0U // PPC:INT32_C_(0) 0 // PPC:UINT32_C_(0) 0U // PPC:INT64_C_(0) 0LL // PPC:UINT64_C_(0) 0ULL // // PPC:INTMAX_C_(0) 0LL // PPC:UINTMAX_C_(0) 0ULL // // RUN: %clang_cc1 -E -ffreestanding -triple=s390x-none-none %s | FileCheck -check-prefix S390X %s // // S390X:typedef long int int64_t; // S390X:typedef long unsigned int uint64_t; // S390X:typedef int64_t int_least64_t; // S390X:typedef uint64_t uint_least64_t; // S390X:typedef int64_t int_fast64_t; // S390X:typedef uint64_t uint_fast64_t; // // S390X:typedef int int32_t; // S390X:typedef unsigned int uint32_t; // S390X:typedef int32_t int_least32_t; // S390X:typedef uint32_t uint_least32_t; // S390X:typedef int32_t int_fast32_t; // S390X:typedef uint32_t uint_fast32_t; // // S390X:typedef short int16_t; // S390X:typedef unsigned short uint16_t; // S390X:typedef int16_t int_least16_t; // S390X:typedef uint16_t uint_least16_t; // S390X:typedef int16_t int_fast16_t; // S390X:typedef uint16_t uint_fast16_t; // // S390X:typedef signed char int8_t; // S390X:typedef unsigned char uint8_t; // S390X:typedef int8_t int_least8_t; // S390X:typedef uint8_t uint_least8_t; // S390X:typedef int8_t int_fast8_t; // S390X:typedef uint8_t uint_fast8_t; // // S390X:typedef int64_t intptr_t; // S390X:typedef uint64_t uintptr_t; // // S390X:typedef long int intmax_t; // S390X:typedef long unsigned int uintmax_t; // // S390X:INT8_MAX_ 127 // S390X:INT8_MIN_ (-127 -1) // S390X:UINT8_MAX_ 255 // S390X:INT_LEAST8_MIN_ (-127 -1) // S390X:INT_LEAST8_MAX_ 127 // S390X:UINT_LEAST8_MAX_ 255 // S390X:INT_FAST8_MIN_ (-127 -1) // S390X:INT_FAST8_MAX_ 127 // S390X:UINT_FAST8_MAX_ 255 // // S390X:INT16_MAX_ 32767 // S390X:INT16_MIN_ (-32767 -1) // S390X:UINT16_MAX_ 65535 // S390X:INT_LEAST16_MIN_ (-32767 -1) // S390X:INT_LEAST16_MAX_ 32767 // S390X:UINT_LEAST16_MAX_ 65535 // S390X:INT_FAST16_MIN_ (-32767 -1) // S390X:INT_FAST16_MAX_ 32767 // S390X:UINT_FAST16_MAX_ 65535 // // S390X:INT32_MAX_ 2147483647 // S390X:INT32_MIN_ (-2147483647 -1) // S390X:UINT32_MAX_ 4294967295U // S390X:INT_LEAST32_MIN_ (-2147483647 -1) // S390X:INT_LEAST32_MAX_ 2147483647 // S390X:UINT_LEAST32_MAX_ 4294967295U // S390X:INT_FAST32_MIN_ (-2147483647 -1) // S390X:INT_FAST32_MAX_ 2147483647 // S390X:UINT_FAST32_MAX_ 4294967295U // // S390X:INT64_MAX_ 9223372036854775807L // S390X:INT64_MIN_ (-9223372036854775807L -1) // S390X:UINT64_MAX_ 18446744073709551615UL // S390X:INT_LEAST64_MIN_ (-9223372036854775807L -1) // S390X:INT_LEAST64_MAX_ 9223372036854775807L // S390X:UINT_LEAST64_MAX_ 18446744073709551615UL // S390X:INT_FAST64_MIN_ (-9223372036854775807L -1) // S390X:INT_FAST64_MAX_ 9223372036854775807L // S390X:UINT_FAST64_MAX_ 18446744073709551615UL // // S390X:INTPTR_MIN_ (-9223372036854775807L -1) // S390X:INTPTR_MAX_ 9223372036854775807L // S390X:UINTPTR_MAX_ 18446744073709551615UL // S390X:PTRDIFF_MIN_ (-9223372036854775807L -1) // S390X:PTRDIFF_MAX_ 9223372036854775807L // S390X:SIZE_MAX_ 18446744073709551615UL // // S390X:INTMAX_MIN_ (-9223372036854775807L -1) // S390X:INTMAX_MAX_ 9223372036854775807L // S390X:UINTMAX_MAX_ 18446744073709551615UL // // S390X:SIG_ATOMIC_MIN_ (-2147483647 -1) // S390X:SIG_ATOMIC_MAX_ 2147483647 // S390X:WINT_MIN_ (-2147483647 -1) // S390X:WINT_MAX_ 2147483647 // // S390X:WCHAR_MAX_ 2147483647 // S390X:WCHAR_MIN_ (-2147483647 -1) // // S390X:INT8_C_(0) 0 // S390X:UINT8_C_(0) 0U // S390X:INT16_C_(0) 0 // S390X:UINT16_C_(0) 0U // S390X:INT32_C_(0) 0 // S390X:UINT32_C_(0) 0U // S390X:INT64_C_(0) 0L // S390X:UINT64_C_(0) 0UL // // S390X:INTMAX_C_(0) 0L // S390X:UINTMAX_C_(0) 0UL // // RUN: %clang_cc1 -E -ffreestanding -triple=sparc-none-none %s | FileCheck -check-prefix SPARC %s // // SPARC:typedef long long int int64_t; // SPARC:typedef long long unsigned int uint64_t; // SPARC:typedef int64_t int_least64_t; // SPARC:typedef uint64_t uint_least64_t; // SPARC:typedef int64_t int_fast64_t; // SPARC:typedef uint64_t uint_fast64_t; // // SPARC:typedef int int32_t; // SPARC:typedef unsigned int uint32_t; // SPARC:typedef int32_t int_least32_t; // SPARC:typedef uint32_t uint_least32_t; // SPARC:typedef int32_t int_fast32_t; // SPARC:typedef uint32_t uint_fast32_t; // // SPARC:typedef short int16_t; // SPARC:typedef unsigned short uint16_t; // SPARC:typedef int16_t int_least16_t; // SPARC:typedef uint16_t uint_least16_t; // SPARC:typedef int16_t int_fast16_t; // SPARC:typedef uint16_t uint_fast16_t; // // SPARC:typedef signed char int8_t; // SPARC:typedef unsigned char uint8_t; // SPARC:typedef int8_t int_least8_t; // SPARC:typedef uint8_t uint_least8_t; // SPARC:typedef int8_t int_fast8_t; // SPARC:typedef uint8_t uint_fast8_t; // // SPARC:typedef int32_t intptr_t; // SPARC:typedef uint32_t uintptr_t; // // SPARC:typedef long long int intmax_t; // SPARC:typedef long long unsigned int uintmax_t; // // SPARC:INT8_MAX_ 127 // SPARC:INT8_MIN_ (-127 -1) // SPARC:UINT8_MAX_ 255 // SPARC:INT_LEAST8_MIN_ (-127 -1) // SPARC:INT_LEAST8_MAX_ 127 // SPARC:UINT_LEAST8_MAX_ 255 // SPARC:INT_FAST8_MIN_ (-127 -1) // SPARC:INT_FAST8_MAX_ 127 // SPARC:UINT_FAST8_MAX_ 255 // // SPARC:INT16_MAX_ 32767 // SPARC:INT16_MIN_ (-32767 -1) // SPARC:UINT16_MAX_ 65535 // SPARC:INT_LEAST16_MIN_ (-32767 -1) // SPARC:INT_LEAST16_MAX_ 32767 // SPARC:UINT_LEAST16_MAX_ 65535 // SPARC:INT_FAST16_MIN_ (-32767 -1) // SPARC:INT_FAST16_MAX_ 32767 // SPARC:UINT_FAST16_MAX_ 65535 // // SPARC:INT32_MAX_ 2147483647 // SPARC:INT32_MIN_ (-2147483647 -1) // SPARC:UINT32_MAX_ 4294967295U // SPARC:INT_LEAST32_MIN_ (-2147483647 -1) // SPARC:INT_LEAST32_MAX_ 2147483647 // SPARC:UINT_LEAST32_MAX_ 4294967295U // SPARC:INT_FAST32_MIN_ (-2147483647 -1) // SPARC:INT_FAST32_MAX_ 2147483647 // SPARC:UINT_FAST32_MAX_ 4294967295U // // SPARC:INT64_MAX_ 9223372036854775807LL // SPARC:INT64_MIN_ (-9223372036854775807LL -1) // SPARC:UINT64_MAX_ 18446744073709551615ULL // SPARC:INT_LEAST64_MIN_ (-9223372036854775807LL -1) // SPARC:INT_LEAST64_MAX_ 9223372036854775807LL // SPARC:UINT_LEAST64_MAX_ 18446744073709551615ULL // SPARC:INT_FAST64_MIN_ (-9223372036854775807LL -1) // SPARC:INT_FAST64_MAX_ 9223372036854775807LL // SPARC:UINT_FAST64_MAX_ 18446744073709551615ULL // // SPARC:INTPTR_MIN_ (-2147483647 -1) // SPARC:INTPTR_MAX_ 2147483647 // SPARC:UINTPTR_MAX_ 4294967295U // SPARC:PTRDIFF_MIN_ (-2147483647 -1) // SPARC:PTRDIFF_MAX_ 2147483647 // SPARC:SIZE_MAX_ 4294967295U // // SPARC:INTMAX_MIN_ (-9223372036854775807LL -1) // SPARC:INTMAX_MAX_ 9223372036854775807LL // SPARC:UINTMAX_MAX_ 18446744073709551615ULL // // SPARC:SIG_ATOMIC_MIN_ (-2147483647 -1) // SPARC:SIG_ATOMIC_MAX_ 2147483647 // SPARC:WINT_MIN_ (-2147483647 -1) // SPARC:WINT_MAX_ 2147483647 // // SPARC:WCHAR_MAX_ 2147483647 // SPARC:WCHAR_MIN_ (-2147483647 -1) // // SPARC:INT8_C_(0) 0 // SPARC:UINT8_C_(0) 0U // SPARC:INT16_C_(0) 0 // SPARC:UINT16_C_(0) 0U // SPARC:INT32_C_(0) 0 // SPARC:UINT32_C_(0) 0U // SPARC:INT64_C_(0) 0LL // SPARC:UINT64_C_(0) 0ULL // // SPARC:INTMAX_C_(0) 0LL // SPARC:UINTMAX_C_(0) 0ULL // // RUN: %clang_cc1 -E -ffreestanding -triple=tce-none-none %s | FileCheck -check-prefix TCE %s // // TCE:typedef int int32_t; // TCE:typedef unsigned int uint32_t; // TCE:typedef int32_t int_least32_t; // TCE:typedef uint32_t uint_least32_t; // TCE:typedef int32_t int_fast32_t; // TCE:typedef uint32_t uint_fast32_t; // // TCE:typedef short int16_t; // TCE:typedef unsigned short uint16_t; // TCE:typedef int16_t int_least16_t; // TCE:typedef uint16_t uint_least16_t; // TCE:typedef int16_t int_fast16_t; // TCE:typedef uint16_t uint_fast16_t; // // TCE:typedef signed char int8_t; // TCE:typedef unsigned char uint8_t; // TCE:typedef int8_t int_least8_t; // TCE:typedef uint8_t uint_least8_t; // TCE:typedef int8_t int_fast8_t; // TCE:typedef uint8_t uint_fast8_t; // // TCE:typedef int32_t intptr_t; // TCE:typedef uint32_t uintptr_t; // // TCE:typedef long int intmax_t; // TCE:typedef long unsigned int uintmax_t; // // TCE:INT8_MAX_ 127 // TCE:INT8_MIN_ (-127 -1) // TCE:UINT8_MAX_ 255 // TCE:INT_LEAST8_MIN_ (-127 -1) // TCE:INT_LEAST8_MAX_ 127 // TCE:UINT_LEAST8_MAX_ 255 // TCE:INT_FAST8_MIN_ (-127 -1) // TCE:INT_FAST8_MAX_ 127 // TCE:UINT_FAST8_MAX_ 255 // // TCE:INT16_MAX_ 32767 // TCE:INT16_MIN_ (-32767 -1) // TCE:UINT16_MAX_ 65535 // TCE:INT_LEAST16_MIN_ (-32767 -1) // TCE:INT_LEAST16_MAX_ 32767 // TCE:UINT_LEAST16_MAX_ 65535 // TCE:INT_FAST16_MIN_ (-32767 -1) // TCE:INT_FAST16_MAX_ 32767 // TCE:UINT_FAST16_MAX_ 65535 // // TCE:INT32_MAX_ 2147483647 // TCE:INT32_MIN_ (-2147483647 -1) // TCE:UINT32_MAX_ 4294967295U // TCE:INT_LEAST32_MIN_ (-2147483647 -1) // TCE:INT_LEAST32_MAX_ 2147483647 // TCE:UINT_LEAST32_MAX_ 4294967295U // TCE:INT_FAST32_MIN_ (-2147483647 -1) // TCE:INT_FAST32_MAX_ 2147483647 // TCE:UINT_FAST32_MAX_ 4294967295U // // TCE:INT64_MAX_ INT64_MAX // TCE:INT64_MIN_ INT64_MIN // TCE:UINT64_MAX_ UINT64_MAX // TCE:INT_LEAST64_MIN_ INT_LEAST64_MIN // TCE:INT_LEAST64_MAX_ INT_LEAST64_MAX // TCE:UINT_LEAST64_MAX_ UINT_LEAST64_MAX // TCE:INT_FAST64_MIN_ INT_FAST64_MIN // TCE:INT_FAST64_MAX_ INT_FAST64_MAX // TCE:UINT_FAST64_MAX_ UINT_FAST64_MAX // // TCE:INTPTR_MIN_ (-2147483647 -1) // TCE:INTPTR_MAX_ 2147483647 // TCE:UINTPTR_MAX_ 4294967295U // TCE:PTRDIFF_MIN_ (-2147483647 -1) // TCE:PTRDIFF_MAX_ 2147483647 // TCE:SIZE_MAX_ 4294967295U // // TCE:INTMAX_MIN_ (-2147483647 -1) // TCE:INTMAX_MAX_ 2147483647 // TCE:UINTMAX_MAX_ 4294967295U // // TCE:SIG_ATOMIC_MIN_ (-2147483647 -1) // TCE:SIG_ATOMIC_MAX_ 2147483647 // TCE:WINT_MIN_ (-2147483647 -1) // TCE:WINT_MAX_ 2147483647 // // TCE:WCHAR_MAX_ 2147483647 // TCE:WCHAR_MIN_ (-2147483647 -1) // // TCE:INT8_C_(0) 0 // TCE:UINT8_C_(0) 0U // TCE:INT16_C_(0) 0 // TCE:UINT16_C_(0) 0U // TCE:INT32_C_(0) 0 // TCE:UINT32_C_(0) 0U // TCE:INT64_C_(0) INT64_C(0) // TCE:UINT64_C_(0) UINT64_C(0) // // TCE:INTMAX_C_(0) 0 // TCE:UINTMAX_C_(0) 0U // // RUN: %clang_cc1 -E -ffreestanding -triple=x86_64-none-none %s | FileCheck -check-prefix X86_64 %s // // // X86_64:typedef long int int64_t; // X86_64:typedef long unsigned int uint64_t; // X86_64:typedef int64_t int_least64_t; // X86_64:typedef uint64_t uint_least64_t; // X86_64:typedef int64_t int_fast64_t; // X86_64:typedef uint64_t uint_fast64_t; // // X86_64:typedef int int32_t; // X86_64:typedef unsigned int uint32_t; // X86_64:typedef int32_t int_least32_t; // X86_64:typedef uint32_t uint_least32_t; // X86_64:typedef int32_t int_fast32_t; // X86_64:typedef uint32_t uint_fast32_t; // // X86_64:typedef short int16_t; // X86_64:typedef unsigned short uint16_t; // X86_64:typedef int16_t int_least16_t; // X86_64:typedef uint16_t uint_least16_t; // X86_64:typedef int16_t int_fast16_t; // X86_64:typedef uint16_t uint_fast16_t; // // X86_64:typedef signed char int8_t; // X86_64:typedef unsigned char uint8_t; // X86_64:typedef int8_t int_least8_t; // X86_64:typedef uint8_t uint_least8_t; // X86_64:typedef int8_t int_fast8_t; // X86_64:typedef uint8_t uint_fast8_t; // // X86_64:typedef int64_t intptr_t; // X86_64:typedef uint64_t uintptr_t; // // X86_64:typedef long int intmax_t; // X86_64:typedef long unsigned int uintmax_t; // // X86_64:INT8_MAX_ 127 // X86_64:INT8_MIN_ (-127 -1) // X86_64:UINT8_MAX_ 255 // X86_64:INT_LEAST8_MIN_ (-127 -1) // X86_64:INT_LEAST8_MAX_ 127 // X86_64:UINT_LEAST8_MAX_ 255 // X86_64:INT_FAST8_MIN_ (-127 -1) // X86_64:INT_FAST8_MAX_ 127 // X86_64:UINT_FAST8_MAX_ 255 // // X86_64:INT16_MAX_ 32767 // X86_64:INT16_MIN_ (-32767 -1) // X86_64:UINT16_MAX_ 65535 // X86_64:INT_LEAST16_MIN_ (-32767 -1) // X86_64:INT_LEAST16_MAX_ 32767 // X86_64:UINT_LEAST16_MAX_ 65535 // X86_64:INT_FAST16_MIN_ (-32767 -1) // X86_64:INT_FAST16_MAX_ 32767 // X86_64:UINT_FAST16_MAX_ 65535 // // X86_64:INT32_MAX_ 2147483647 // X86_64:INT32_MIN_ (-2147483647 -1) // X86_64:UINT32_MAX_ 4294967295U // X86_64:INT_LEAST32_MIN_ (-2147483647 -1) // X86_64:INT_LEAST32_MAX_ 2147483647 // X86_64:UINT_LEAST32_MAX_ 4294967295U // X86_64:INT_FAST32_MIN_ (-2147483647 -1) // X86_64:INT_FAST32_MAX_ 2147483647 // X86_64:UINT_FAST32_MAX_ 4294967295U // // X86_64:INT64_MAX_ 9223372036854775807L // X86_64:INT64_MIN_ (-9223372036854775807L -1) // X86_64:UINT64_MAX_ 18446744073709551615UL // X86_64:INT_LEAST64_MIN_ (-9223372036854775807L -1) // X86_64:INT_LEAST64_MAX_ 9223372036854775807L // X86_64:UINT_LEAST64_MAX_ 18446744073709551615UL // X86_64:INT_FAST64_MIN_ (-9223372036854775807L -1) // X86_64:INT_FAST64_MAX_ 9223372036854775807L // X86_64:UINT_FAST64_MAX_ 18446744073709551615UL // // X86_64:INTPTR_MIN_ (-9223372036854775807L -1) // X86_64:INTPTR_MAX_ 9223372036854775807L // X86_64:UINTPTR_MAX_ 18446744073709551615UL // X86_64:PTRDIFF_MIN_ (-9223372036854775807L -1) // X86_64:PTRDIFF_MAX_ 9223372036854775807L // X86_64:SIZE_MAX_ 18446744073709551615UL // // X86_64:INTMAX_MIN_ (-9223372036854775807L -1) // X86_64:INTMAX_MAX_ 9223372036854775807L // X86_64:UINTMAX_MAX_ 18446744073709551615UL // // X86_64:SIG_ATOMIC_MIN_ (-2147483647 -1) // X86_64:SIG_ATOMIC_MAX_ 2147483647 // X86_64:WINT_MIN_ (-2147483647 -1) // X86_64:WINT_MAX_ 2147483647 // // X86_64:WCHAR_MAX_ 2147483647 // X86_64:WCHAR_MIN_ (-2147483647 -1) // // X86_64:INT8_C_(0) 0 // X86_64:UINT8_C_(0) 0U // X86_64:INT16_C_(0) 0 // X86_64:UINT16_C_(0) 0U // X86_64:INT32_C_(0) 0 // X86_64:UINT32_C_(0) 0U // X86_64:INT64_C_(0) 0L // X86_64:UINT64_C_(0) 0UL // // X86_64:INTMAX_C_(0) 0L // X86_64:UINTMAX_C_(0) 0UL // // // RUN: %clang_cc1 -E -ffreestanding -triple=x86_64-pc-linux-gnu %s | FileCheck -check-prefix X86_64_LINUX %s // // X86_64_LINUX:WINT_MIN_ 0U // X86_64_LINUX:WINT_MAX_ 4294967295U // // // RUN: %clang_cc1 -E -ffreestanding -triple=i386-mingw32 %s | FileCheck -check-prefix I386_MINGW32 %s // // I386_MINGW32:WCHAR_MAX_ 65535 // I386_MINGW32:WCHAR_MIN_ 0 // // // RUN: %clang_cc1 -E -ffreestanding -triple=xcore-none-none %s | FileCheck -check-prefix XCORE %s // // XCORE:typedef long long int int64_t; // XCORE:typedef long long unsigned int uint64_t; // XCORE:typedef int64_t int_least64_t; // XCORE:typedef uint64_t uint_least64_t; // XCORE:typedef int64_t int_fast64_t; // XCORE:typedef uint64_t uint_fast64_t; // // XCORE:typedef int int32_t; // XCORE:typedef unsigned int uint32_t; // XCORE:typedef int32_t int_least32_t; // XCORE:typedef uint32_t uint_least32_t; // XCORE:typedef int32_t int_fast32_t; // XCORE:typedef uint32_t uint_fast32_t; // // XCORE:typedef short int16_t; // XCORE:typedef unsigned short uint16_t; // XCORE:typedef int16_t int_least16_t; // XCORE:typedef uint16_t uint_least16_t; // XCORE:typedef int16_t int_fast16_t; // XCORE:typedef uint16_t uint_fast16_t; // // XCORE:typedef signed char int8_t; // XCORE:typedef unsigned char uint8_t; // XCORE:typedef int8_t int_least8_t; // XCORE:typedef uint8_t uint_least8_t; // XCORE:typedef int8_t int_fast8_t; // XCORE:typedef uint8_t uint_fast8_t; // // XCORE:typedef int32_t intptr_t; // XCORE:typedef uint32_t uintptr_t; // // XCORE:typedef long long int intmax_t; // XCORE:typedef long long unsigned int uintmax_t; // // XCORE:INT8_MAX_ 127 // XCORE:INT8_MIN_ (-127 -1) // XCORE:UINT8_MAX_ 255 // XCORE:INT_LEAST8_MIN_ (-127 -1) // XCORE:INT_LEAST8_MAX_ 127 // XCORE:UINT_LEAST8_MAX_ 255 // XCORE:INT_FAST8_MIN_ (-127 -1) // XCORE:INT_FAST8_MAX_ 127 // XCORE:UINT_FAST8_MAX_ 255 // // XCORE:INT16_MAX_ 32767 // XCORE:INT16_MIN_ (-32767 -1) // XCORE:UINT16_MAX_ 65535 // XCORE:INT_LEAST16_MIN_ (-32767 -1) // XCORE:INT_LEAST16_MAX_ 32767 // XCORE:UINT_LEAST16_MAX_ 65535 // XCORE:INT_FAST16_MIN_ (-32767 -1) // XCORE:INT_FAST16_MAX_ 32767 // XCORE:UINT_FAST16_MAX_ 65535 // // XCORE:INT32_MAX_ 2147483647 // XCORE:INT32_MIN_ (-2147483647 -1) // XCORE:UINT32_MAX_ 4294967295U // XCORE:INT_LEAST32_MIN_ (-2147483647 -1) // XCORE:INT_LEAST32_MAX_ 2147483647 // XCORE:UINT_LEAST32_MAX_ 4294967295U // XCORE:INT_FAST32_MIN_ (-2147483647 -1) // XCORE:INT_FAST32_MAX_ 2147483647 // XCORE:UINT_FAST32_MAX_ 4294967295U // // XCORE:INT64_MAX_ 9223372036854775807LL // XCORE:INT64_MIN_ (-9223372036854775807LL -1) // XCORE:UINT64_MAX_ 18446744073709551615ULL // XCORE:INT_LEAST64_MIN_ (-9223372036854775807LL -1) // XCORE:INT_LEAST64_MAX_ 9223372036854775807LL // XCORE:UINT_LEAST64_MAX_ 18446744073709551615ULL // XCORE:INT_FAST64_MIN_ (-9223372036854775807LL -1) // XCORE:INT_FAST64_MAX_ 9223372036854775807LL // XCORE:UINT_FAST64_MAX_ 18446744073709551615ULL // // XCORE:INTPTR_MIN_ (-2147483647 -1) // XCORE:INTPTR_MAX_ 2147483647 // XCORE:UINTPTR_MAX_ 4294967295U // XCORE:PTRDIFF_MIN_ (-2147483647 -1) // XCORE:PTRDIFF_MAX_ 2147483647 // XCORE:SIZE_MAX_ 4294967295U // // XCORE:INTMAX_MIN_ (-9223372036854775807LL -1) // XCORE:INTMAX_MAX_ 9223372036854775807LL // XCORE:UINTMAX_MAX_ 18446744073709551615ULL // // XCORE:SIG_ATOMIC_MIN_ (-2147483647 -1) // XCORE:SIG_ATOMIC_MAX_ 2147483647 // XCORE:WINT_MIN_ 0U // XCORE:WINT_MAX_ 4294967295U // // XCORE:WCHAR_MAX_ 255 // XCORE:WCHAR_MIN_ 0 // // XCORE:INT8_C_(0) 0 // XCORE:UINT8_C_(0) 0U // XCORE:INT16_C_(0) 0 // XCORE:UINT16_C_(0) 0U // XCORE:INT32_C_(0) 0 // XCORE:UINT32_C_(0) 0U // XCORE:INT64_C_(0) 0LL // XCORE:UINT64_C_(0) 0ULL // // XCORE:INTMAX_C_(0) 0LL // XCORE:UINTMAX_C_(0) 0ULL // // // stdint.h forms several macro definitions by pasting together identifiers // to form names (eg. int32_t is formed from int ## 32 ## _t). The following // case tests that these joining operations are performed correctly even if // the identifiers used in the operations (int, uint, _t, INT, UINT, _MIN, // _MAX, and _C(v)) are themselves macros. // // RUN: %clang_cc1 -E -ffreestanding -U__UINTMAX_TYPE__ -U__INTMAX_TYPE__ -Dint=a -Duint=b -D_t=c -DINT=d -DUINT=e -D_MIN=f -D_MAX=g '-D_C(v)=h' -triple=i386-none-none %s | FileCheck -check-prefix JOIN %s // JOIN:typedef int32_t intptr_t; // JOIN:typedef uint32_t uintptr_t; // JOIN:typedef __INTMAX_TYPE__ intmax_t; // JOIN:typedef __UINTMAX_TYPE__ uintmax_t; // JOIN:INTPTR_MIN_ (-2147483647 -1) // JOIN:INTPTR_MAX_ 2147483647 // JOIN:UINTPTR_MAX_ 4294967295U // JOIN:PTRDIFF_MIN_ (-2147483647 -1) // JOIN:PTRDIFF_MAX_ 2147483647 // JOIN:SIZE_MAX_ 4294967295U // JOIN:INTMAX_MIN_ (-9223372036854775807LL -1) // JOIN:INTMAX_MAX_ 9223372036854775807LL // JOIN:UINTMAX_MAX_ 18446744073709551615ULL // JOIN:SIG_ATOMIC_MIN_ (-2147483647 -1) // JOIN:SIG_ATOMIC_MAX_ 2147483647 // JOIN:WINT_MIN_ (-2147483647 -1) // JOIN:WINT_MAX_ 2147483647 // JOIN:WCHAR_MAX_ 2147483647 // JOIN:WCHAR_MIN_ (-2147483647 -1) // JOIN:INTMAX_C_(0) 0LL // JOIN:UINTMAX_C_(0) 0ULL #include <stdint.h> INT8_MAX_ INT8_MAX INT8_MIN_ INT8_MIN UINT8_MAX_ UINT8_MAX INT_LEAST8_MIN_ INT_LEAST8_MIN INT_LEAST8_MAX_ INT_LEAST8_MAX UINT_LEAST8_MAX_ UINT_LEAST8_MAX INT_FAST8_MIN_ INT_FAST8_MIN INT_FAST8_MAX_ INT_FAST8_MAX UINT_FAST8_MAX_ UINT_FAST8_MAX INT16_MAX_ INT16_MAX INT16_MIN_ INT16_MIN UINT16_MAX_ UINT16_MAX INT_LEAST16_MIN_ INT_LEAST16_MIN INT_LEAST16_MAX_ INT_LEAST16_MAX UINT_LEAST16_MAX_ UINT_LEAST16_MAX INT_FAST16_MIN_ INT_FAST16_MIN INT_FAST16_MAX_ INT_FAST16_MAX UINT_FAST16_MAX_ UINT_FAST16_MAX INT32_MAX_ INT32_MAX INT32_MIN_ INT32_MIN UINT32_MAX_ UINT32_MAX INT_LEAST32_MIN_ INT_LEAST32_MIN INT_LEAST32_MAX_ INT_LEAST32_MAX UINT_LEAST32_MAX_ UINT_LEAST32_MAX INT_FAST32_MIN_ INT_FAST32_MIN INT_FAST32_MAX_ INT_FAST32_MAX UINT_FAST32_MAX_ UINT_FAST32_MAX INT64_MAX_ INT64_MAX INT64_MIN_ INT64_MIN UINT64_MAX_ UINT64_MAX INT_LEAST64_MIN_ INT_LEAST64_MIN INT_LEAST64_MAX_ INT_LEAST64_MAX UINT_LEAST64_MAX_ UINT_LEAST64_MAX INT_FAST64_MIN_ INT_FAST64_MIN INT_FAST64_MAX_ INT_FAST64_MAX UINT_FAST64_MAX_ UINT_FAST64_MAX INTPTR_MIN_ INTPTR_MIN INTPTR_MAX_ INTPTR_MAX UINTPTR_MAX_ UINTPTR_MAX PTRDIFF_MIN_ PTRDIFF_MIN PTRDIFF_MAX_ PTRDIFF_MAX SIZE_MAX_ SIZE_MAX INTMAX_MIN_ INTMAX_MIN INTMAX_MAX_ INTMAX_MAX UINTMAX_MAX_ UINTMAX_MAX SIG_ATOMIC_MIN_ SIG_ATOMIC_MIN SIG_ATOMIC_MAX_ SIG_ATOMIC_MAX WINT_MIN_ WINT_MIN WINT_MAX_ WINT_MAX WCHAR_MAX_ WCHAR_MAX WCHAR_MIN_ WCHAR_MIN INT8_C_(0) INT8_C(0) UINT8_C_(0) UINT8_C(0) INT16_C_(0) INT16_C(0) UINT16_C_(0) UINT16_C(0) INT32_C_(0) INT32_C(0) UINT32_C_(0) UINT32_C(0) INT64_C_(0) INT64_C(0) UINT64_C_(0) UINT64_C(0) INTMAX_C_(0) INTMAX_C(0) UINTMAX_C_(0) UINTMAX_C(0)
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/expr_multichar.c
// RUN: %clang_cc1 < %s -E -verify -triple i686-pc-linux-gnu // expected-no-diagnostics #if (('1234' >> 24) != '1') #error Bad multichar constant calculation! #endif
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/pragma_diagnostic_output.c
// RUN: %clang_cc1 -E %s | FileCheck %s // CHECK: #pragma GCC diagnostic warning "-Wall" #pragma GCC diagnostic warning "-Wall" // CHECK: #pragma GCC diagnostic ignored "-Wall" #pragma GCC diagnostic ignored "-Wall" // CHECK: #pragma GCC diagnostic error "-Wall" #pragma GCC diagnostic error "-Wall" // CHECK: #pragma GCC diagnostic fatal "-Wall" #pragma GCC diagnostic fatal "-Wall" // CHECK: #pragma GCC diagnostic push #pragma GCC diagnostic push // CHECK: #pragma GCC diagnostic pop #pragma GCC diagnostic pop // CHECK: #pragma clang diagnostic warning "-Wall" #pragma clang diagnostic warning "-Wall" // CHECK: #pragma clang diagnostic ignored "-Wall" #pragma clang diagnostic ignored "-Wall" // CHECK: #pragma clang diagnostic error "-Wall" #pragma clang diagnostic error "-Wall" // CHECK: #pragma clang diagnostic fatal "-Wall" #pragma clang diagnostic fatal "-Wall" // CHECK: #pragma clang diagnostic push #pragma clang diagnostic push // CHECK: #pragma clang diagnostic pop #pragma clang diagnostic pop
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/c99-6_10_3_4_p6.c
// Example from C99 6.10.3.4p6 // RUN: %clang_cc1 -E %s | FileCheck -strict-whitespace %s #define str(s) # s #define xstr(s) str(s) #define debug(s, t) printf("x" # s "= %d, x" # t "= s" \ x ## s, x ## t) #define INCFILE(n) vers ## n #define glue(a, b) a ## b #define xglue(a, b) glue(a, b) #define HIGHLOW "hello" #define LOW LOW ", world" debug(1, 2); fputs(str(strncmp("abc\0d" "abc", '\4') // this goes away == 0) str(: @\n), s); include xstr(INCFILE(2).h) glue(HIGH, LOW); xglue(HIGH, LOW) // CHECK: printf("x" "1" "= %d, x" "2" "= s" x1, x2); // CHECK: fputs("strncmp(\"abc\\0d\" \"abc\", '\\4') == 0" ": @\n", s); // CHECK: include "vers2.h" // CHECK: "hello"; // CHECK: "hello" ", world"
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/macro_arg_directive.h
// Support header for macro_arg_directive.c int n; struct S { int k; }; void g(int);
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/print_line_track.c
/* RUN: %clang_cc1 -E %s | grep 'a 3' * RUN: %clang_cc1 -E %s | grep 'b 16' * RUN: %clang_cc1 -E -P %s | grep 'a 3' * RUN: %clang_cc1 -E -P %s | grep 'b 16' * RUN: %clang_cc1 -E %s | not grep '# 0 ' * RUN: %clang_cc1 -E -P %s | count 4 * PR1848 PR3437 PR7360 */ #define t(x) x t(a 3) t(b __LINE__)
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/warn-macro-unused.c
// RUN: %clang_cc1 %s -Wunused-macros -Dfoo -Dfoo -verify #include "warn-macro-unused.h" # 1 "warn-macro-unused-fake-header.h" 1 #define unused_from_fake_header # 5 "warn-macro-unused.c" 2 #define unused // expected-warning {{macro is not used}} #define unused unused // rdar://9745065 #undef unused_from_header // no warning
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/predefined-nullability.c
// RUN: %clang_cc1 %s -E -dM -triple i386-apple-darwin10 -o - | FileCheck %s --check-prefix=CHECK-DARWIN // RUN: %clang_cc1 %s -E -dM -triple x86_64-unknown-linux -o - | FileCheck %s --check-prefix=CHECK-NONDARWIN // CHECK-DARWIN: #define __nonnull _Nonnull // CHECK-DARWIN: #define __null_unspecified _Null_unspecified // CHECK-DARWIN: #define __nullable _Nullable // CHECK-NONDARWIN-NOT: __nonnull // CHECK-NONDARWIN: #define __clang__ // CHECK-NONDARWIN-NOT: __nonnull
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/dumptokens_phyloc.c
// RUN: %clang_cc1 -dump-tokens %s 2>&1 | grep "Spelling=.*dumptokens_phyloc.c:3:20" #define TESTPHYLOC 10 TESTPHYLOC
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/pr2086.h
#ifndef test #endif #ifdef test #undef test #endif
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/_Pragma-physloc.c
// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s // CHECK: {{^}}#pragma x y z{{$}} // CHECK: {{^}}#pragma a b c{{$}} _Pragma("x y z") _Pragma("a b c")
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/ifdef-recover.c
/* RUN: %clang_cc1 -E -verify %s */ /* expected-error@+1 {{macro name missing}} */ #ifdef #endif /* expected-error@+1 {{macro name must be an identifier}} */ #ifdef ! #endif /* expected-error@+1 {{macro name missing}} */ #if defined #endif /* PR1936 */ /* expected-error@+2 {{unterminated function-like macro invocation}} expected-error@+2 {{expected value in expression}} expected-note@+1 {{macro 'f' defined here}} */ #define f(x) x #if f(2 #endif int x;
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/cxx_not_eq.cpp
// RUN: %clang_cc1 -DA=1 -DB=1 -E %s | grep 'int a = 927 == 927' // RUN: %clang_cc1 -E %s | grep 'int a = 927 == 927' // RUN: %clang_cc1 -DA=1 -DB=2 -E %s | grep 'int a = 37 == 37' #if A not_eq B #define X 37 #else #define X 927 #endif #if A != B #define Y 37 #else #define Y 927 #endif int a = X == Y;
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/warn-disabled-macro-expansion.c
// RUN: %clang_cc1 %s -E -Wdisabled-macro-expansion -verify #define p p #define a b #define b a #define f(a) a #define g(b) a #define h(x) i(x) #define i(y) i(y) #define c(x) x(0) #define y(x) y #define z(x) (z)(x) p // no warning a // expected-warning {{recursive macro}} f(2) g(3) // expected-warning {{recursive macro}} h(0) // expected-warning {{recursive macro}} c(c) // expected-warning {{recursive macro}} y(5) // expected-warning {{recursive macro}} z(z) // ok
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/macro_undef.c
// RUN: %clang_cc1 -dM -undef -Dfoo=1 -E %s | FileCheck %s // CHECK-NOT: #define __clang__ // CHECK: #define foo 1
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/macro_paste_hashhash.c
// RUN: %clang_cc1 -E %s | FileCheck %s #define hash_hash # ## # #define mkstr(a) # a #define in_between(a) mkstr(a) #define join(c, d) in_between(c hash_hash d) // CHECK: "x ## y"; join(x, y); #define FOO(x) A x B // CHECK: A ## B; FOO(##);
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/macro_fn_placemarker.c
// RUN: %clang_cc1 %s -E | grep 'foo(A, )' #define X(Y) foo(A, Y) X()
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/mi_opt2.c
// RUN: %clang_cc1 -E %s | FileCheck %s // PR6282 // This test should not trigger the include guard optimization since // the guard macro is defined on the first include. #define ITERATING 1 #define X 1 #include "mi_opt2.h" #undef X #define X 2 #include "mi_opt2.h" // CHECK: b: 1 // CHECK: b: 2
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/dump-macros-undef.c
// RUN: %clang_cc1 -E -dD %s | FileCheck %s // PR7818 // CHECK: # 1 "{{.+}}.c" #define X 3 // CHECK: #define X 3 #undef X // CHECK: #undef X
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/utf8-allowed-chars.c
// RUN: %clang_cc1 %s -fsyntax-only -std=c99 -verify // RUN: %clang_cc1 %s -fsyntax-only -std=c11 -Wc99-compat -verify // RUN: %clang_cc1 %s -fsyntax-only -x c++ -std=c++03 -Wc++11-compat -verify // RUN: %clang_cc1 %s -fsyntax-only -x c++ -std=c++11 -Wc++98-compat -verify // Note: This file contains Unicode characters; please do not remove them! // Identifier characters extern char aǶ; // C11, C++11 extern char aª; // C99, C11, C++11 extern char a΄; // C++03, C11, C++11 extern char a๐; // C99, C++03, C11, C++11 extern char a﹅; // none extern char x̀; // C11, C++11. Note that this does not have a composed form. // Identifier initial characters extern char ๐; // C++03, C11, C++11 extern char ̀; // disallowed initially in C11/C++11, always in C99/C++03 #if __cplusplus # if __cplusplus >= 201103L // C++11 // expected-warning@9 {{using this character in an identifier is incompatible with C++98}} // expected-warning@10 {{using this character in an identifier is incompatible with C++98}} // expected-error@13 {{non-ASCII characters are not allowed outside of literals and identifiers}} // expected-warning@14 {{using this character in an identifier is incompatible with C++98}} // expected-error@21 {{expected unqualified-id}} # else // C++03 // expected-error@9 {{non-ASCII characters are not allowed outside of literals and identifiers}} // expected-error@10 {{non-ASCII characters are not allowed outside of literals and identifiers}} // expected-error@13 {{non-ASCII characters are not allowed outside of literals and identifiers}} // expected-error@14 {{non-ASCII characters are not allowed outside of literals and identifiers}} // expected-error@21 {{non-ASCII characters are not allowed outside of literals and identifiers}} expected-warning@21 {{declaration does not declare anything}} # endif #else # if __STDC_VERSION__ >= 201112L // C11 // expected-warning@9 {{using this character in an identifier is incompatible with C99}} // expected-warning@11 {{using this character in an identifier is incompatible with C99}} // expected-error@13 {{non-ASCII characters are not allowed outside of literals and identifiers}} // expected-warning@14 {{using this character in an identifier is incompatible with C99}} // expected-warning@20 {{starting an identifier with this character is incompatible with C99}} // expected-error@21 {{expected identifier}} # else // C99 // expected-error@9 {{non-ASCII characters are not allowed outside of literals and identifiers}} // expected-error@11 {{non-ASCII characters are not allowed outside of literals and identifiers}} // expected-error@13 {{non-ASCII characters are not allowed outside of literals and identifiers}} // expected-error@14 {{non-ASCII characters are not allowed outside of literals and identifiers}} // expected-error@20 {{expected identifier}} // expected-error@21 {{non-ASCII characters are not allowed outside of literals and identifiers}} expected-warning@21 {{declaration does not declare anything}} # endif #endif
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/macro_paste_spacing2.c
// RUN: %clang_cc1 %s -E | grep "movl %eax" // PR4132 #define R1E %eax #define epilogue(r1) movl r1 ## E; epilogue(R1)
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/feature_tests.c
// RUN: %clang_cc1 %s -triple=i686-apple-darwin9 -verify -DVERIFY // RUN: %clang_cc1 %s -E -triple=i686-apple-darwin9 #ifndef __has_feature #error Should have __has_feature #endif #if __has_feature(something_we_dont_have) #error Bad #endif #if !__has_builtin(__builtin_huge_val) || \ !__has_builtin(__builtin_shufflevector) || \ !__has_builtin(__builtin_convertvector) || \ !__has_builtin(__builtin_trap) || \ !__has_builtin(__c11_atomic_init) || \ !__has_feature(attribute_analyzer_noreturn) || \ !__has_feature(attribute_overloadable) #error Clang should have these #endif #if __has_builtin(__builtin_insanity) #error Clang should not have this #endif #if !__has_feature(__attribute_deprecated_with_message__) #error Feature name in double underscores does not work #endif // Make sure we have x86 builtins only (forced with target triple). #if !__has_builtin(__builtin_ia32_emms) || \ __has_builtin(__builtin_altivec_abs_v4sf) #error Broken handling of target-specific builtins #endif // Macro expansion does not occur in the parameter to __has_builtin, // __has_feature, etc. (as is also expected behaviour for ordinary // macros), so the following should not expand: #define MY_ALIAS_BUILTIN __c11_atomic_init #define MY_ALIAS_FEATURE attribute_overloadable #if __has_builtin(MY_ALIAS_BUILTIN) || __has_feature(MY_ALIAS_FEATURE) #error Alias expansion not allowed #endif // But deferring should expand: #define HAS_BUILTIN(X) __has_builtin(X) #define HAS_FEATURE(X) __has_feature(X) #if !HAS_BUILTIN(MY_ALIAS_BUILTIN) || !HAS_FEATURE(MY_ALIAS_FEATURE) #error Expansion should have occurred #endif #ifdef VERIFY // expected-error@+2 {{builtin feature check macro requires a parenthesized identifier}} // expected-error@+1 {{expected value in expression}} #if __has_feature('x') #endif #endif
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/pragma_sysheader.c
// RUN: %clang_cc1 -verify -pedantic %s -fsyntax-only // RUN: %clang_cc1 -E %s | FileCheck %s // expected-no-diagnostics // rdar://6899937 #include "pragma_sysheader.h" // PR9861: Verify that line markers are not messed up in -E mode. // CHECK: # 1 "{{.*}}pragma_sysheader.h" 1 // CHECK-NEXT: # 2 "{{.*}}pragma_sysheader.h" 3 // CHECK-NEXT: typedef int x; // CHECK-NEXT: typedef int x; // CHECK-NEXT: # 6 "{{.*}}pragma_sysheader.c" 2
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/woa-defaults.c
// RUN: %clang_cc1 -dM -triple armv7-windows -E %s | FileCheck %s // RUN: %clang_cc1 -dM -fno-signed-char -triple armv7-windows -E %s \ // RUN: | FileCheck %s -check-prefix CHECK-UNSIGNED-CHAR // CHECK: #define _INTEGRAL_MAX_BITS 64 // CHECK: #define _M_ARM 7 // CHECK: #define _M_ARMT _M_ARM // CHECK: #define _M_ARM_FP 31 // CHECK: #define _M_ARM_NT 1 // CHECK: #define _M_THUMB _M_ARM // CHECK: #define _WIN32 1 // CHECK: #define __ARM_PCS 1 // CHECK: #define __ARM_PCS_VFP 1 // CHECK: #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ // CHECK: #define __SIZEOF_DOUBLE__ 8 // CHECK: #define __SIZEOF_FLOAT__ 4 // CHECK: #define __SIZEOF_INT__ 4 // CHECK: #define __SIZEOF_LONG_DOUBLE__ 8 // CHECK: #define __SIZEOF_LONG_LONG__ 8 // CHECK: #define __SIZEOF_LONG__ 4 // CHECK: #define __SIZEOF_POINTER__ 4 // CHECK: #define __SIZEOF_PTRDIFF_T__ 4 // CHECK: #define __SIZEOF_SHORT__ 2 // CHECK: #define __SIZEOF_SIZE_T__ 4 // CHECK: #define __SIZEOF_WCHAR_T__ 2 // CHECK: #define __SIZEOF_WINT_T__ 4 // CHECK-NOT: __THUMB_INTERWORK__ // CHECK-NOT: __ARM_EABI__ // CHECK-NOT: _CHAR_UNSIGNED // CHECK-UNSIGNED-CHAR: #define _CHAR_UNSIGNED 1
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/mi_opt.c
// RUN: not %clang_cc1 -fsyntax-only %s // PR1900 // This test should get a redefinition error from m_iopt.h: the MI opt // shouldn't apply. #define MACRO #include "mi_opt.h" #undef MACRO #define MACRO || 1 #include "mi_opt.h"
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/comment_save.c
// RUN: %clang_cc1 -E -C %s | FileCheck -strict-whitespace %s // foo // CHECK: // foo /* bar */ // CHECK: /* bar */ #if FOO #endif /* baz */ // CHECK: /* baz */ _Pragma("unknown") // after unknown pragma // CHECK: #pragma unknown // CHECK-NEXT: # // CHECK-NEXT: // after unknown pragma _Pragma("comment(\"abc\")") // after known pragma // CHECK: #pragma comment("abc") // CHECK-NEXT: # // CHECK-NEXT: // after known pragma
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/function_macro_file.h
#define f() x f
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/aarch64-target-features.c
// RUN: %clang -target aarch64-none-linux-gnu -x c -E -dM %s -o - | FileCheck %s // RUN: %clang -target arm64-none-linux-gnu -x c -E -dM %s -o - | FileCheck %s // CHECK: __AARCH64EL__ 1 // CHECK: __ARM_64BIT_STATE 1 // CHECK: __ARM_ACLE 200 // CHECK: __ARM_ALIGN_MAX_STACK_PWR 4 // CHECK: __ARM_ARCH 8 // CHECK: __ARM_ARCH_ISA_A64 1 // CHECK: __ARM_ARCH_PROFILE 'A' // CHECK-NOT: __ARM_FEATURE_BIG_ENDIAN // CHECK: __ARM_FEATURE_CLZ 1 // CHECK-NOT: __ARM_FEATURE_CRC32 1 // CHECK-NOT: __ARM_FEATURE_CRYPTO 1 // CHECK: __ARM_FEATURE_DIRECTED_ROUNDING 1 // CHECK: __ARM_FEATURE_DIV 1 // CHECK: __ARM_FEATURE_FMA 1 // CHECK: __ARM_FEATURE_IDIV 1 // CHECK: __ARM_FEATURE_NUMERIC_MAXMIN 1 // CHECK: __ARM_FEATURE_UNALIGNED 1 // CHECK: __ARM_FP 0xe // CHECK: __ARM_FP16_FORMAT_IEEE 1 // CHECK-NOT: __ARM_FP_FAST 1 // CHECK: __ARM_FP_FENV_ROUNDING 1 // CHECK: __ARM_NEON 1 // CHECK: __ARM_NEON_FP 0xe // CHECK: __ARM_PCS_AAPCS64 1 // CHECK-NOT: __ARM_SIZEOF_MINIMAL_ENUM 1 // CHECK-NOT: __ARM_SIZEOF_WCHAR_T 2 // RUN: %clang -target aarch64-none-linux-gnu -march=armv8-a+crypto -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-CRYPTO %s // RUN: %clang -target arm64-none-linux-gnu -march=armv8-a+crypto -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-CRYPTO %s // CHECK-CRYPTO: __ARM_FEATURE_CRYPTO 1 // RUN: %clang -target aarch64-none-linux-gnu -mcrc -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-CRC32 %s // RUN: %clang -target arm64-none-linux-gnu -mcrc -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-CRC32 %s // RUN: %clang -target aarch64-none-linux-gnu -march=armv8-a+crc -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-CRC32 %s // RUN: %clang -target arm64-none-linux-gnu -march=armv8-a+crc -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-CRC32 %s // CHECK-CRC32: __ARM_FEATURE_CRC32 1 // RUN: %clang -target aarch64-none-linux-gnu -ffast-math -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-FASTMATH %s // RUN: %clang -target arm64-none-linux-gnu -ffast-math -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-FASTMATH %s // CHECK-FASTMATH: __ARM_FP_FAST 1 // RUN: %clang -target aarch64-none-linux-gnu -fshort-wchar -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SHORTWCHAR %s // RUN: %clang -target arm64-none-linux-gnu -fshort-wchar -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SHORTWCHAR %s // CHECK-SHORTWCHAR: __ARM_SIZEOF_WCHAR_T 2 // RUN: %clang -target aarch64-none-linux-gnu -fshort-enums -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SHORTENUMS %s // RUN: %clang -target arm64-none-linux-gnu -fshort-enums -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SHORTENUMS %s // CHECK-SHORTENUMS: __ARM_SIZEOF_MINIMAL_ENUM 1 // RUN: %clang -target aarch64-none-linux-gnu -march=armv8-a+simd -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NEON %s // RUN: %clang -target arm64-none-linux-gnu -march=armv8-a+simd -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NEON %s // CHECK-NEON: __ARM_NEON 1 // CHECK-NEON: __ARM_NEON_FP 0xe // RUN: %clang -target aarch64 -march=arm64 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ARCH-NOT-ACCEPT %s // RUN: %clang -target aarch64 -march=aarch64 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ARCH-NOT-ACCEPT %s // CHECK-ARCH-NOT-ACCEPT: error: the clang compiler does not support // RUN: %clang -target aarch64 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-GENERIC %s // RUN: %clang -target aarch64 -march=armv8-a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-GENERIC %s // CHECK-GENERIC: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" // RUN: %clang -target aarch64 -mtune=cyclone -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MTUNE-CYCLONE %s // CHECK-MTUNE-CYCLONE: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+zcm" "-target-feature" "+zcz" // RUN: %clang -target aarch64 -mcpu=cyclone -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-CYCLONE %s // RUN: %clang -target aarch64 -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-A53 %s // RUN: %clang -target aarch64 -mcpu=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-A57 %s // RUN: %clang -target aarch64 -mcpu=cortex-a72 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-A72 %s // CHECK-MCPU-CYCLONE: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto" "-target-feature" "+zcm" "-target-feature" "+zcz" // CHECK-MCPU-A53: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto" // CHECK-MCPU-A57: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto" // CHECK-MCPU-A72: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto" // RUN: %clang -target x86_64-apple-macosx -arch arm64 -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-ARCH-ARM64 %s // CHECK-ARCH-ARM64: "-target-cpu" "cyclone" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto" "-target-feature" "+zcm" "-target-feature" "+zcz" // RUN: %clang -target aarch64 -march=armv8-a+fp+simd+crc+crypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MARCH-1 %s // RUN: %clang -target aarch64 -march=armv8-a+nofp+nosimd+nocrc+nocrypto+fp+simd+crc+crypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MARCH-1 %s // RUN: %clang -target aarch64 -march=armv8-a+nofp+nosimd+nocrc+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MARCH-2 %s // RUN: %clang -target aarch64 -march=armv8-a+fp+simd+crc+crypto+nofp+nosimd+nocrc+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MARCH-2 %s // RUN: %clang -target aarch64 -march=armv8-a+nosimd -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MARCH-3 %s // CHECK-MARCH-1: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+fp-armv8" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto" // CHECK-MARCH-2: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "-fp-armv8" "-target-feature" "-neon" "-target-feature" "-crc" "-target-feature" "-crypto" // CHECK-MARCH-3: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "-neon" // RUN: %clang -target aarch64 -mcpu=cyclone+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-1 %s // RUN: %clang -target aarch64 -mcpu=cyclone+crypto+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-1 %s // RUN: %clang -target aarch64 -mcpu=generic+crc -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-2 %s // RUN: %clang -target aarch64 -mcpu=generic+nocrc+crc -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-2 %s // RUN: %clang -target aarch64 -mcpu=cortex-a53+nosimd -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-3 %s // ================== Check whether -mcpu accepts mixed-case features. // RUN: %clang -target aarch64 -mcpu=cyclone+NOCRYPTO -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-1 %s // RUN: %clang -target aarch64 -mcpu=cyclone+CRYPTO+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-1 %s // RUN: %clang -target aarch64 -mcpu=generic+Crc -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-2 %s // RUN: %clang -target aarch64 -mcpu=GENERIC+nocrc+CRC -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-2 %s // RUN: %clang -target aarch64 -mcpu=cortex-a53+noSIMD -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-3 %s // CHECK-MCPU-1: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "-crypto" "-target-feature" "+zcm" "-target-feature" "+zcz" // CHECK-MCPU-2: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" // CHECK-MCPU-3: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "-neon" // RUN: %clang -target aarch64 -mcpu=cyclone+nocrc+nocrypto -march=armv8-a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-MARCH %s // RUN: %clang -target aarch64 -march=armv8-a -mcpu=cyclone+nocrc+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-MARCH %s // CHECK-MCPU-MARCH: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+zcm" "-target-feature" "+zcz" // RUN: %clang -target aarch64 -mcpu=cortex-a53 -mtune=cyclone -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-MTUNE %s // RUN: %clang -target aarch64 -mtune=cyclone -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-MTUNE %s // CHECK-MCPU-MTUNE: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto" "-target-feature" "+zcm" "-target-feature" "+zcz" // RUN: %clang -target aarch64 -mcpu=generic+neon -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR-NEON %s // RUN: %clang -target aarch64 -mcpu=generic+noneon -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR-NEON %s // RUN: %clang -target aarch64 -march=armv8-a+neon -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR-NEON %s // RUN: %clang -target aarch64 -march=armv8-a+noneon -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR-NEON %s // CHECK-ERROR-NEON: error: [no]neon is not accepted as modifier, please use [no]simd instead // RUN: %clang -target aarch64 -march=armv8.1a+crypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V81A-FEATURE-1 %s // RUN: %clang -target aarch64 -march=armv8.1a+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V81A-FEATURE-2 %s // RUN: %clang -target aarch64 -march=armv8.1a+nosimd -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V81A-FEATURE-3 %s // ================== Check whether -march accepts mixed-case features. // RUN: %clang -target aarch64 -march=ARMV8.1A+CRYPTO -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V81A-FEATURE-1 %s // RUN: %clang -target aarch64 -march=Armv8.1a+NOcrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V81A-FEATURE-2 %s // RUN: %clang -target aarch64 -march=armv8.1a+noSIMD -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V81A-FEATURE-3 %s // CHECK-V81A-FEATURE-1: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+v8.1a" "-target-feature" "+crypto" // CHECK-V81A-FEATURE-2: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+v8.1a" "-target-feature" "-crypto" // CHECK-V81A-FEATURE-3: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8.1a" "-target-feature" "-neon"
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/dependencies-and-pp.c
// Test -MT and -E flags, PR4063 // RUN: %clang -E -o %t.1 %s // RUN: %clang -E -MD -MF %t.d -MT foo -o %t.2 %s // RUN: diff %t.1 %t.2 // RUN: FileCheck -check-prefix=TEST1 %s < %t.d // TEST1: foo: // TEST1: dependencies-and-pp.c // Test -MQ flag without quoting // RUN: %clang -E -MD -MF %t.d -MQ foo -o %t %s // RUN: FileCheck -check-prefix=TEST2 %s < %t.d // TEST2: foo: // Test -MQ flag with quoting // RUN: %clang -E -MD -MF %t.d -MQ '$fo\ooo ooo\ ooo\\ ooo#oo' -o %t %s // RUN: FileCheck -check-prefix=TEST3 %s < %t.d // TEST3: $$fo\ooo\ ooo\\\ ooo\\\\\ ooo\#oo: // Test consecutive -MT flags // RUN: %clang -E -MD -MF %t.d -MT foo -MT bar -MT baz -o %t %s // RUN: diff %t.1 %t // RUN: FileCheck -check-prefix=TEST4 %s < %t.d // TEST4: foo bar baz: // Test consecutive -MT and -MQ flags // RUN: %clang -E -MD -MF %t.d -MT foo -MQ '$(bar)' -MT 'b az' -MQ 'qu ux' -MQ ' space' -o %t %s // RUN: FileCheck -check-prefix=TEST5 %s < %t.d // TEST5: foo $$(bar) b az qu\ ux \ space: // TODO: Test default target without quoting // TODO: Test default target with quoting
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/dump-options.c
// RUN: %clang %s -E -dD | grep __INTMAX_MAX__ // RUN: %clang %s -E -dM | grep __INTMAX_MAX__
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/dump-macros-spacing.c
// RUN: %clang_cc1 -E -dD < %s | grep stdin | grep -v define #define A A /* 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 */ #define B B
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/pragma_microsoft.c
// RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions // RUN: not %clang_cc1 %s -fms-extensions -E | FileCheck %s // REQUIRES: non-ps4-sdk // rdar://6495941 #define FOO 1 #define BAR "2" #pragma comment(linker,"foo=" FOO) // expected-error {{pragma comment requires parenthesized identifier and optional string}} // CHECK: #pragma comment(linker,"foo=" 1) #pragma comment(linker," bar=" BAR) // CHECK: #pragma comment(linker," bar=" "2") #pragma comment( user, "Compiled on " __DATE__ " at " __TIME__ ) // CHECK: {{#pragma comment\( user, \"Compiled on \".*\" at \".*\" \)}} #pragma comment(foo) // expected-error {{unknown kind of pragma comment}} // CHECK: #pragma comment(foo) #pragma comment(compiler,) // expected-error {{expected string literal in pragma comment}} // CHECK: #pragma comment(compiler,) #define foo compiler #pragma comment(foo) // macro expand kind. // CHECK: #pragma comment(compiler) #pragma comment(foo) x // expected-error {{pragma comment requires}} // CHECK: #pragma comment(compiler) x #pragma comment(user, "foo\abar\nbaz\tsome thing") // CHECK: #pragma comment(user, "foo\abar\nbaz\tsome thing") #pragma detect_mismatch("test", "1") // CHECK: #pragma detect_mismatch("test", "1") #pragma detect_mismatch() // expected-error {{expected string literal in pragma detect_mismatch}} // CHECK: #pragma detect_mismatch() #pragma detect_mismatch("test") // expected-error {{pragma detect_mismatch is malformed; it requires two comma-separated string literals}} // CHECK: #pragma detect_mismatch("test") #pragma detect_mismatch("test", 1) // expected-error {{expected string literal in pragma detect_mismatch}} // CHECK: #pragma detect_mismatch("test", 1) #pragma detect_mismatch("test", BAR) // CHECK: #pragma detect_mismatch("test", "2") // __pragma __pragma(comment(linker," bar=" BAR)) // CHECK: #pragma comment(linker," bar=" "2") #define MACRO_WITH__PRAGMA { \ __pragma(warning(push)); \ __pragma(warning(disable: 10000)); \ 1 + (2 > 3) ? 4 : 5; \ __pragma(warning(pop)); \ } void f() { __pragma() // CHECK: #pragma // If we ever actually *support* __pragma(warning(disable: x)), // this warning should go away. MACRO_WITH__PRAGMA // expected-warning {{lower precedence}} \ // expected-note 2 {{place parentheses}} // CHECK: #pragma warning(push) // CHECK: #pragma warning(disable: 10000) // CHECK: ; 1 + (2 > 3) ? 4 : 5; // CHECK: #pragma warning(pop) } // This should include macro_arg_directive even though the include // is looking for test.h This allows us to assign to "n" #pragma include_alias("test.h", "macro_arg_directive.h" ) #include "test.h" void test( void ) { n = 12; } #pragma include_alias(<bar.h>, "bar.h") // expected-warning {{angle-bracketed include <bar.h> cannot be aliased to double-quoted include "bar.h"}} #pragma include_alias("foo.h", <bar.h>) // expected-warning {{double-quoted include "foo.h" cannot be aliased to angle-bracketed include <bar.h>}} #pragma include_alias("test.h") // expected-warning {{pragma include_alias expected ','}} // Make sure that the names match exactly for a replacement, including path information. If // this were to fail, we would get a file not found error #pragma include_alias(".\pp-record.h", "does_not_exist.h") #include "pp-record.h" #pragma include_alias(12) // expected-warning {{pragma include_alias expected include filename}} // It's expected that we can map "bar" and <bar> separately #define test // We can't actually look up stdio.h because we're using cc1 without header paths, but this will ensure // that we get the right bar.h, because the "bar.h" will undef test for us, where <bar.h> won't #pragma include_alias(<bar.h>, <stdio.h>) #pragma include_alias("bar.h", "pr2086.h") // This should #undef test #include "bar.h" #if defined(test) // This should not warn because test should not be defined #pragma include_alias("test.h") #endif // Test to make sure there are no use-after-free problems #define B "pp-record.h" #pragma include_alias("quux.h", B) void g() {} #include "quux.h" // Make sure that empty includes don't work #pragma include_alias("", "foo.h") // expected-error {{empty filename}} #pragma include_alias(<foo.h>, <>) // expected-error {{empty filename}} // Test that we ignore pragma warning. #pragma warning(push) // CHECK: #pragma warning(push) #pragma warning(push, 1) // CHECK: #pragma warning(push, 1) #pragma warning(disable : 4705) // CHECK: #pragma warning(disable: 4705) #pragma warning(disable : 123 456 789 ; error : 321) // CHECK: #pragma warning(disable: 123 456 789) // CHECK: #pragma warning(error: 321) #pragma warning(once : 321) // CHECK: #pragma warning(once: 321) #pragma warning(suppress : 321) // CHECK: #pragma warning(suppress: 321) #pragma warning(default : 321) // CHECK: #pragma warning(default: 321) #pragma warning(pop) // CHECK: #pragma warning(pop) #pragma warning(1: 123) // CHECK: #pragma warning(1: 123) #pragma warning(2: 234 567) // CHECK: #pragma warning(2: 234 567) #pragma warning(3: 123; 4: 678) // CHECK: #pragma warning(3: 123) // CHECK: #pragma warning(4: 678) #pragma warning(5: 123) // expected-warning {{expected 'push', 'pop', 'default', 'disable', 'error', 'once', 'suppress', 1, 2, 3, or 4}} #pragma warning(push, 0) // CHECK: #pragma warning(push, 0) // FIXME: We could probably support pushing warning level 0. #pragma warning(pop) // CHECK: #pragma warning(pop) #pragma warning // expected-warning {{expected '('}} #pragma warning( // expected-warning {{expected 'push', 'pop', 'default', 'disable', 'error', 'once', 'suppress', 1, 2, 3, or 4}} #pragma warning() // expected-warning {{expected 'push', 'pop', 'default', 'disable', 'error', 'once', 'suppress', 1, 2, 3, or 4}} #pragma warning(push 4) // expected-warning {{expected ')'}} // CHECK: #pragma warning(push) #pragma warning(push // expected-warning {{expected ')'}} // CHECK: #pragma warning(push) #pragma warning(push, 5) // expected-warning {{requires a level between 0 and 4}} #pragma warning(pop, 1) // expected-warning {{expected ')'}} // CHECK: #pragma warning(pop) #pragma warning(push, 1) asdf // expected-warning {{extra tokens at end of #pragma warning directive}} // CHECK: #pragma warning(push, 1) #pragma warning(disable 4705) // expected-warning {{expected ':'}} #pragma warning(disable : 0) // expected-warning {{expected a warning number}} #pragma warning(default 321) // expected-warning {{expected ':'}} #pragma warning(asdf : 321) // expected-warning {{expected 'push', 'pop'}} #pragma warning(push, -1) // expected-warning {{requires a level between 0 and 4}}
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/macro_paste_hard.c
// RUN: %clang_cc1 -E %s | grep '1: aaab 2' // RUN: %clang_cc1 -E %s | grep '2: 2 baaa' // RUN: %clang_cc1 -E %s | grep '3: 2 xx' #define a(n) aaa ## n #define b 2 1: a(b b) // aaab 2 2 gets expanded, not b. #undef a #undef b #define a(n) n ## aaa #define b 2 2: a(b b) // 2 baaa 2 gets expanded, not b. #define baaa xx 3: a(b b) // 2 xx
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/print_line_empty_file.c
// RUN: %clang_cc1 -E %s | FileCheck %s #line 21 "" int foo() { return 42; } #line 4 "bug.c" int bar() { return 21; } // CHECK: # 21 "" // CHECK: int foo() { return 42; } // CHECK: # 4 "bug.c" // CHECK: int bar() { return 21; }
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/include-directive3.c
// RUN: %clang_cc1 -include %S/file_to_include.h -E %s -fno-caret-diagnostics 2>&1 >/dev/null | grep 'file successfully included' | count 1 // PR3464
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/macro_fn_varargs_named.c
// RUN: %clang_cc1 -E %s | grep '^a: x$' // RUN: %clang_cc1 -E %s | grep '^b: x y, z,h$' // RUN: %clang_cc1 -E %s | grep '^c: foo(x)$' #define A(b, c...) b c a: A(x) b: A(x, y, z,h) #define B(b, c...) foo(b, ## c) c: B(x)
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/has_attribute.c
// RUN: %clang_cc1 -triple arm-unknown-linux -verify -E %s -o - | FileCheck %s // CHECK: always_inline #if __has_attribute(always_inline) int always_inline(); #endif // CHECK: __always_inline__ #if __has_attribute(__always_inline__) int __always_inline__(); #endif // CHECK: no_dummy_attribute #if !__has_attribute(dummy_attribute) int no_dummy_attribute(); #endif // CHECK: has_has_attribute #ifdef __has_attribute int has_has_attribute(); #endif // CHECK: has_something_we_dont_have #if !__has_attribute(something_we_dont_have) int has_something_we_dont_have(); #endif // rdar://10253857 #if __has_attribute(__const) int fn3() __attribute__ ((__const)); #endif #if __has_attribute(const) static int constFunction() __attribute__((const)); #endif // CHECK: has_no_volatile_attribute #if !__has_attribute(volatile) int has_no_volatile_attribute(); #endif // CHECK: has_arm_interrupt #if __has_attribute(interrupt) int has_arm_interrupt(); #endif // CHECK: does_not_have_dllexport #if !__has_attribute(dllexport) int does_not_have_dllexport(); #endif // CHECK: does_not_have_uuid #if !__has_attribute(uuid) int does_not_have_uuid #endif #if __has_cpp_attribute(selectany) // expected-error {{token is not a valid binary operator in a preprocessor subexpression}} #endif
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/pragma_microsoft.cpp
// RUN: %clang_cc1 %s -fsyntax-only -std=c++11 -verify -fms-extensions #pragma warning(push, 4_D) // expected-warning {{requires a level between 0 and 4}}
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/macro_arg_slocentry_merge.h
#define WINDOW win #define P_(args) args extern void f P_((WINDOW win));
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/line-directive-output.c
// RUN: %clang_cc1 -E %s 2>&1 | FileCheck %s -strict-whitespace // PR6101 int a; // CHECK: # 1 "{{.*}}line-directive-output.c" // Check that we do not emit an enter marker for the main file. // CHECK-NOT: # 1 "{{.*}}line-directive-output.c" 1 // CHECK: int a; // CHECK-NEXT: # 50 "{{.*}}line-directive-output.c" // CHECK-NEXT: int b; #line 50 int b; // CHECK: # 13 "{{.*}}line-directive-output.c" // CHECK-NEXT: int c; # 13 int c; // CHECK-NEXT: # 1 "A.c" #line 1 "A.c" // CHECK-NEXT: # 2 "A.c" #line 2 // CHECK-NEXT: # 1 "B.c" #line 1 "B.c" // CHECK-NEXT: # 1000 "A.c" #line 1000 "A.c" int y; // CHECK: # 1010 "A.c" int z; extern int x; # 3 "temp2.h" 1 extern int y; # 7 "A.c" 2 extern int z; // CHECK: # 25 "A.c" // CHECK: # 50 "C.c" 1 # 50 "C.c" 1 // CHECK-NEXT: # 2000 "A.c" 2 # 2000 "A.c" 2 # 42 "A.c" # 44 "A.c" # 49 "A.c" // CHECK: # 50 "a\n.c" # 50 "a\012.c"
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/macro_expandloc.c
// RUN: %clang_cc1 -E -verify %s #define FOO 1 // The error message should be on the #include line, not the 1. // expected-error@+1 {{expected "FILENAME" or <FILENAME>}} #include FOO #define BAR BAZ // expected-error@+1 {{expected "FILENAME" or <FILENAME>}} #include BAR
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/ucn-pp-identifier.c
// RUN: %clang_cc1 %s -fsyntax-only -std=c99 -pedantic -verify -Wundef // RUN: %clang_cc1 %s -fsyntax-only -x c++ -pedantic -verify -Wundef // RUN: not %clang_cc1 %s -fsyntax-only -std=c99 -pedantic -Wundef 2>&1 | FileCheck -strict-whitespace %s #define \u00FC #define a\u00FD() 0 #ifndef \u00FC #error "This should never happen" #endif #if a\u00FD() #error "This should never happen" #endif #if a\U000000FD() #error "This should never happen" #endif #if \uarecool // expected-warning{{incomplete universal character name; treating as '\' followed by identifier}} expected-error {{invalid token at start of a preprocessor expression}} #endif #if \uwerecool // expected-warning{{\u used with no following hex digits; treating as '\' followed by identifier}} expected-error {{invalid token at start of a preprocessor expression}} #endif #if \U0001000 // expected-warning{{incomplete universal character name; treating as '\' followed by identifier}} expected-error {{invalid token at start of a preprocessor expression}} #endif // Make sure we reject disallowed UCNs #define \ufffe // expected-error {{macro name must be an identifier}} #define \U10000000 // expected-error {{macro name must be an identifier}} #define \u0061 // expected-error {{character 'a' cannot be specified by a universal character name}} expected-error {{macro name must be an identifier}} // FIXME: Not clear what our behavior should be here; \u0024 is "$". #define a\u0024 // expected-warning {{whitespace}} #if \u0110 // expected-warning {{is not defined, evaluates to 0}} #endif #define \u0110 1 / 0 #if \u0110 // expected-error {{division by zero in preprocessor expression}} #endif #define STRINGIZE(X) # X extern int check_size[sizeof(STRINGIZE(\u0112)) == 3 ? 1 : -1]; // Check that we still diagnose disallowed UCNs in #if 0 blocks. // C99 5.1.1.2p1 and C++11 [lex.phases]p1 dictate that preprocessor tokens are // formed before directives are parsed. // expected-error@+4 {{character 'a' cannot be specified by a universal character name}} #if 0 #define \ufffe // okay #define \U10000000 // okay #define \u0061 // error, but -verify only looks at comments outside #if 0 #endif // A UCN formed by token pasting is undefined in both C99 and C++. // Right now we don't do anything special, which causes us to coincidentally // accept the first case below but reject the second two. #define PASTE(A, B) A ## B extern int PASTE(\, u00FD); extern int PASTE(\u, 00FD); // expected-warning{{\u used with no following hex digits}} extern int PASTE(\u0, 0FD); // expected-warning{{incomplete universal character name}} #ifdef __cplusplus // expected-error@-3 {{expected unqualified-id}} // expected-error@-3 {{expected unqualified-id}} #else // expected-error@-6 {{expected identifier}} // expected-error@-6 {{expected identifier}} #endif // A UCN produced by line splicing is valid in C99 but undefined in C++. // Since undefined behavior can do anything including working as intended, // we just accept it in C++ as well.; #define newline_1_\u00F\ C 1 #define newline_2_\u00\ F\ C 1 #define newline_3_\u\ 00\ FC 1 #define newline_4_\\ u00FC 1 #define newline_5_\\ u\ \ 0\ 0\ F\ C 1 #if (newline_1_\u00FC && newline_2_\u00FC && newline_3_\u00FC && \ newline_4_\u00FC && newline_5_\u00FC) #else #error "Line splicing failed to produce UCNs" #endif #define capital_u_\U00FC // expected-warning@-1 {{incomplete universal character name}} expected-note@-1 {{did you mean to use '\u'?}} expected-warning@-1 {{whitespace}} // CHECK: note: did you mean to use '\u'? // CHECK-NEXT: #define capital_u_\U00FC // CHECK-NEXT: {{^ \^}} // CHECK-NEXT: {{^ u}}
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/stringize_misc.c
// RUN: %clang_cc1 -E %s | FileCheck -strict-whitespace %s #define M(x, y) #x #y M( f(1, 2), g((x=y++, y))) // CHECK: "f(1, 2)" "g((x=y++, y))" M( {a=1 , b=2;} ) /* A semicolon is not a comma */ // CHECK: "{a=1" "b=2;}" M( <, [ ) /* Passes the arguments < and [ */ // CHECK: "<" "[" M( (,), (...) ) /* Passes the arguments (,) and (...) */ // CHECK: "(,)" "(...)" #define START_END(start, end) start c=3; end START_END( {a=1 , b=2;} ) /* braces are not parentheses */ // CHECK: {a=1 c=3; b=2;} /* * To pass a comma token as an argument it is * necessary to write: */ #define COMMA , M(a COMMA b, (a, b)) // CHECK: "a COMMA b" "(a, b)"
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/microsoft-import.c
// RUN: %clang_cc1 -E -verify -fms-compatibility %s #import "pp-record.h" // expected-error {{#import of type library is an unsupported Microsoft feature}} // Test attributes #import "pp-record.h" no_namespace, auto_rename // expected-error {{#import of type library is an unsupported Microsoft feature}} #import "pp-record.h" no_namespace \ auto_rename \ auto_search // expected-error@-3 {{#import of type library is an unsupported Microsoft feature}}
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/macro_arg_directive.c
// RUN: %clang_cc1 %s -fsyntax-only -verify #define a(x) enum { x } a(n = #undef a #define a 5 a); _Static_assert(n == 5, ""); #define M(A) M( #pragma pack(pop) // expected-error {{embedding a #pragma directive within macro arguments is not supported}} ) // header1.h void fail(const char *); #define MUNCH(...) \ ({ int result = 0; __VA_ARGS__; if (!result) { fail(#__VA_ARGS__); }; result }) static inline int f(int k) { return MUNCH( // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{returning 'void'}} if (k < 3) result = 24; else if (k > 4) result = k - 4; } #include "macro_arg_directive.h" // expected-error {{embedding a #include directive within macro arguments is not supported}} int g(int k) { return f(k) + f(k-1)); }
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/arm-acle-6.5.c
// RUN: %clang -target arm-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-DEFAULT // CHECK-DEFAULT-NOT: __ARM_FP // RUN: %clang -target arm-eabi -mfpu=vfp -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP // RUN: %clang -target arm-eabi -mfpu=vfp3 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP // RUN: %clang -target arm-eabi -mfpu=vfp3-d16 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP // RUN: %clang -target arm-eabi -mfpu=neon -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP // RUN: %clang -target arm-eabi -mfpu=vfp3 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP // RUN: %clang -target armv7-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP // CHECK-SP-DP: __ARM_FP 0xC // RUN: %clang -target arm-eabi -mfpu=vfpv4 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP-HP // RUN: %clang -target arm-eabi -mfpu=vfpv4-d16 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP-HP // RUN: %clang -target arm-eabi -mfpu=fp-armv8 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP-HP // RUN: %clang -target arm-eabi -mfpu=neon-fp-armv8 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP-HP // RUN: %clang -target arm-eabi -mfpu=crypto-neon-fp-armv8 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP-HP // RUN: %clang -target armv8-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP-HP // CHECK-SP-DP-HP: __ARM_FP 0xE
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/_Pragma-dependency.c
// RUN: %clang_cc1 -E -verify %s #define DO_PRAGMA _Pragma #define STR "GCC dependency \"parse.y\"") // expected-error@+1 {{'parse.y' file not found}} DO_PRAGMA (STR
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/headermap-rel.c
// This uses a headermap with this entry: // Foo.h -> Foo/Foo.h // RUN: %clang_cc1 -E %s -o %t.i -I %S/Inputs/headermap-rel/foo.hmap -F %S/Inputs/headermap-rel // RUN: FileCheck %s -input-file %t.i // CHECK: Foo.h is parsed // CHECK: Foo.h is parsed #include "Foo.h" #include "Foo.h"
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/expr_usual_conversions.c
// RUN: %clang_cc1 %s -E -verify #define INTMAX_MIN (-9223372036854775807LL -1) #if (-42 + 0U) /* expected-warning {{left side of operator converted from negative value to unsigned: -42 to 18446744073709551574}} */ \ / -2 /* expected-warning {{right side of operator converted from negative value to unsigned: -2 to 18446744073709551614}} */ foo #endif // Shifts don't want the usual conversions: PR2279 #if (2 << 1U) - 30 >= 0 #error #endif
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/hash_space.c
// RUN: %clang_cc1 %s -E | grep " #" // Should put a space before the # so that -fpreprocessed mode doesn't // macro expand this again. #define HASH # HASH define foo bar
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/include-pth.c
// RUN: %clang_cc1 -emit-pth %s -o %t // RUN: %clang_cc1 -include-pth %t %s -E | grep 'file_to_include' | count 2 #include "file_to_include.h"
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/function_macro_file.c
/* RUN: %clang_cc1 -E -P %s | grep f */ #include "function_macro_file.h" ()
0
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/TestFramework.framework
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/TestFramework.framework/Headers/TestFramework.h
// Include a subframework header. #include <AnotherTestFramework/AnotherTestFramework.h> static inline int test_framework_func(unsigned a) { return a; }
0
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/TestFramework.framework/Frameworks/AnotherTestFramework.framework
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/TestFramework.framework/Frameworks/AnotherTestFramework.framework/Headers/AnotherTestFramework.h
static inline int another_test_framework_func(unsigned a) { return a; }
0
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/headermap-rel/Foo.framework
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/headermap-rel/Foo.framework/Headers/Foo.h
Foo.h is parsed
0
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/headermap-rel2/system/usr
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/headermap-rel2/system/usr/include/someheader.h
#define A 1
0
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/headermap-rel2
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/headermap-rel2/Product/someheader.h
#define A 2
0
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/microsoft-header-search/findme.h
#pragma once #error Wrong findme.h included, MSVC header search incorrect
0
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/microsoft-header-search/include1.h
#pragma once #include "a/include2.h" #pragma once #include "a/include2.h"
0
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/microsoft-header-search/falsepos.h
#pragma once #warning successfully resolved the falsepos.h header
0
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/microsoft-header-search
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/microsoft-header-search/a/include2.h
#pragma once #include "b/include3.h" #pragma once #include "b/include3.h"
0
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/microsoft-header-search
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/microsoft-header-search/a/findme.h
#pragma once #warning findme.h successfully included using MS search rules
0
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/microsoft-header-search/a
repos/DirectXShaderCompiler/tools/clang/test/Preprocessor/Inputs/microsoft-header-search/a/b/include3.h
#pragma once #include "findme.h" #include "falsepos.h"
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/taef_exec/lit.site.cfg.in
import sys ## Autogenerated by LLVM/Clang configuration. # Do not edit! config.llvm_src_root = "@LLVM_SOURCE_DIR@" config.llvm_obj_root = "@LLVM_BINARY_DIR@" config.llvm_build_mode = "@LLVM_BUILD_MODE@" config.te = "@TAEF_EXECUTABLE@" config.taef_arch = "@TAEF_ARCH@" config.verbose = True # Support substitution of the tools_dir, libs_dirs, and build_mode with user # parameters. This is used when we can't determine the tool dir at # configuration time. try: config.llvm_build_mode = config.llvm_build_mode % lit_config.params except KeyError: e = sys.exc_info()[1] key, = e.args lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key)) # Let the main config do the real work. lit_config.load_config(config, "@CLANG_SOURCE_DIR@/test/taef_exec/lit.cfg")
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Sema/attr-bounded.c
// RUN: %clang_cc1 -fsyntax-only %s // Make sure OpenBSD's bounded extension is accepted. typedef long ssize_t; typedef unsigned long size_t; typedef struct FILE FILE; ssize_t read(int, void *, size_t) __attribute__((__bounded__(__buffer__,2,3))); int readlink(const char *, char *, size_t) __attribute__((__bounded__(__string__,2,3))); size_t fread(void *, size_t, size_t, FILE *) __attribute__((__bounded__(__size__,1,3,2))); char *getwd(char *) __attribute__((__bounded__(__minbytes__,1,1024)));
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Sema/implicit-decl.c
// RUN: %clang_cc1 %s -verify -fsyntax-only -Werror typedef int int32_t; typedef unsigned char Boolean; extern int printf(__const char *__restrict __format, ...); // expected-note{{'printf' declared here}} void func() { int32_t *vector[16]; const char compDesc[16 + 1]; int32_t compCount = 0; if (_CFCalendarDecomposeAbsoluteTimeV(compDesc, vector, compCount)) { // expected-note {{previous implicit declaration is here}} \ expected-error {{implicit declaration of function '_CFCalendarDecomposeAbsoluteTimeV' is invalid in C99}} } printg("Hello, World!\n"); // expected-error{{implicit declaration of function 'printg' is invalid in C99}} \ // expected-note{{did you mean 'printf'?}} __builtin_is_les(1, 3); // expected-error{{use of unknown builtin '__builtin_is_les'}} } Boolean _CFCalendarDecomposeAbsoluteTimeV(const char *componentDesc, int32_t **vector, int32_t count) { // expected-error{{conflicting types for '_CFCalendarDecomposeAbsoluteTimeV'}} return 0; } // Test the typo-correction callback in Sema::ImplicitlyDefineFunction extern int sformatf(char *str, __const char *__restrict __format, ...); // expected-note{{'sformatf' declared here}} void test_implicit() { int formats = 0; formatd("Hello, World!\n"); // expected-error{{implicit declaration of function 'formatd' is invalid in C99}} \ // expected-note{{did you mean 'sformatf'?}} }
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Sema/bitfield.c
// RUN: %clang_cc1 %s -fsyntax-only -verify -std=c11 -Wno-unused-value enum e0; // expected-note{{forward declaration of 'enum e0'}} struct a { int a : -1; // expected-error{{bit-field 'a' has negative width}} // rdar://6081627 int b : 33; // expected-error{{size of bit-field 'b' (33 bits) exceeds size of its type (32 bits)}} int c : (1 + 0.25); // expected-error{{expression is not an integer constant expression}} int d : (int)(1 + 0.25); // rdar://6138816 int e : 0; // expected-error {{bit-field 'e' has zero width}} float xx : 4; // expected-error {{bit-field 'xx' has non-integral type}} // PR3607 enum e0 f : 1; // expected-error {{field has incomplete type 'enum e0'}} int g : (_Bool)1; // PR4017 char : 10; // expected-error {{size of anonymous bit-field (10 bits) exceeds size of its type (8 bits)}} unsigned : -2; // expected-error {{anonymous bit-field has negative width (-2)}} float : 12; // expected-error {{anonymous bit-field has non-integral type 'float'}} }; struct b {unsigned x : 2;} x; __typeof__(x.x+1) y; int y; struct {unsigned x : 2;} x2; __typeof__((x.x+=1)+1) y; __typeof__((0,x.x)+1) y; __typeof__(x.x<<1) y; int y; struct PR8025 { double : 2; // expected-error{{anonymous bit-field has non-integral type 'double'}} }; struct Test4 { unsigned bitX : 4; unsigned bitY : 4; unsigned var; }; void test4(struct Test4 *t) { (void) sizeof(t->bitX); // expected-error {{invalid application of 'sizeof' to bit-field}} (void) sizeof((t->bitY)); // expected-error {{invalid application of 'sizeof' to bit-field}} (void) sizeof(t->bitX = 4); // not a bitfield designator in C (void) sizeof(t->bitX += 4); // not a bitfield designator in C (void) sizeof((void) 0, t->bitX); // not a bitfield designator in C (void) sizeof(t->var ? t->bitX : t->bitY); // not a bitfield designator in C (void) sizeof(t->var ? t->bitX : t->bitX); // not a bitfield designator in C } typedef unsigned Unsigned; typedef signed Signed; struct Test5 { unsigned n : 2; } t5; typedef __typeof__(t5.n) Unsigned; // Bitfield is unsigned typedef __typeof__(+t5.n) Signed; // ... but promotes to signed. typedef __typeof__(t5.n + 0) Signed; // Arithmetic promotes. typedef __typeof__(+(t5.n = 0)) Signed; // FIXME: Assignment should not; the result typedef __typeof__(+(t5.n += 0)) Signed; // is a non-bit-field lvalue of type unsigned. typedef __typeof__(+(t5.n *= 0)) Signed; typedef __typeof__(+(++t5.n)) Signed; // FIXME: Increment is equivalent to compound-assignment. typedef __typeof__(+(--t5.n)) Signed; // This should not promote to signed. typedef __typeof__(+(t5.n++)) Unsigned; // Post-increment is underspecified, but seems to typedef __typeof__(+(t5.n--)) Unsigned; // also act like compound-assignment. struct Test6 { : 0.0; // expected-error{{type name requires a specifier or qualifier}} };
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Sema/atomic-ops.c
// RUN: %clang_cc1 %s -verify -ffreestanding -fsyntax-only -triple=i686-linux-gnu -std=c11 // Basic parsing/Sema tests for __c11_atomic_* #include <stdatomic.h> struct S { char c[3]; }; _Static_assert(__GCC_ATOMIC_BOOL_LOCK_FREE == 2, ""); _Static_assert(__GCC_ATOMIC_CHAR_LOCK_FREE == 2, ""); _Static_assert(__GCC_ATOMIC_CHAR16_T_LOCK_FREE == 2, ""); _Static_assert(__GCC_ATOMIC_CHAR32_T_LOCK_FREE == 2, ""); _Static_assert(__GCC_ATOMIC_WCHAR_T_LOCK_FREE == 2, ""); _Static_assert(__GCC_ATOMIC_SHORT_LOCK_FREE == 2, ""); _Static_assert(__GCC_ATOMIC_INT_LOCK_FREE == 2, ""); _Static_assert(__GCC_ATOMIC_LONG_LOCK_FREE == 2, ""); #ifdef __i386__ _Static_assert(__GCC_ATOMIC_LLONG_LOCK_FREE == 1, ""); #else _Static_assert(__GCC_ATOMIC_LLONG_LOCK_FREE == 2, ""); #endif _Static_assert(__GCC_ATOMIC_POINTER_LOCK_FREE == 2, ""); _Static_assert(__c11_atomic_is_lock_free(1), ""); _Static_assert(__c11_atomic_is_lock_free(2), ""); _Static_assert(__c11_atomic_is_lock_free(3), ""); // expected-error {{not an integral constant expression}} _Static_assert(__c11_atomic_is_lock_free(4), ""); _Static_assert(__c11_atomic_is_lock_free(8), ""); _Static_assert(__c11_atomic_is_lock_free(16), ""); // expected-error {{not an integral constant expression}} _Static_assert(__c11_atomic_is_lock_free(17), ""); // expected-error {{not an integral constant expression}} _Static_assert(__atomic_is_lock_free(1, 0), ""); _Static_assert(__atomic_is_lock_free(2, 0), ""); _Static_assert(__atomic_is_lock_free(3, 0), ""); // expected-error {{not an integral constant expression}} _Static_assert(__atomic_is_lock_free(4, 0), ""); _Static_assert(__atomic_is_lock_free(8, 0), ""); _Static_assert(__atomic_is_lock_free(16, 0), ""); // expected-error {{not an integral constant expression}} _Static_assert(__atomic_is_lock_free(17, 0), ""); // expected-error {{not an integral constant expression}} _Static_assert(atomic_is_lock_free((atomic_char*)0), ""); _Static_assert(atomic_is_lock_free((atomic_short*)0), ""); _Static_assert(atomic_is_lock_free((atomic_int*)0), ""); _Static_assert(atomic_is_lock_free((atomic_long*)0), ""); // expected-error@+1 {{__int128 is not supported on this target}} _Static_assert(atomic_is_lock_free((_Atomic(__int128)*)0), ""); // expected-error {{not an integral constant expression}} _Static_assert(atomic_is_lock_free(0 + (atomic_char*)0), ""); char i8; short i16; int i32; int __attribute__((vector_size(8))) i64; struct Incomplete *incomplete; // expected-note {{forward declaration of 'struct Incomplete'}} _Static_assert(__atomic_is_lock_free(1, &i8), ""); _Static_assert(__atomic_is_lock_free(1, &i64), ""); _Static_assert(__atomic_is_lock_free(2, &i8), ""); // expected-error {{not an integral constant expression}} _Static_assert(__atomic_is_lock_free(2, &i16), ""); _Static_assert(__atomic_is_lock_free(2, &i64), ""); _Static_assert(__atomic_is_lock_free(4, &i16), ""); // expected-error {{not an integral constant expression}} _Static_assert(__atomic_is_lock_free(4, &i32), ""); _Static_assert(__atomic_is_lock_free(4, &i64), ""); _Static_assert(__atomic_is_lock_free(8, &i32), ""); // expected-error {{not an integral constant expression}} _Static_assert(__atomic_is_lock_free(8, &i64), ""); _Static_assert(__atomic_always_lock_free(1, 0), ""); _Static_assert(__atomic_always_lock_free(2, 0), ""); _Static_assert(!__atomic_always_lock_free(3, 0), ""); _Static_assert(__atomic_always_lock_free(4, 0), ""); _Static_assert(__atomic_always_lock_free(8, 0), ""); _Static_assert(!__atomic_always_lock_free(16, 0), ""); _Static_assert(!__atomic_always_lock_free(17, 0), ""); _Static_assert(__atomic_always_lock_free(1, incomplete), ""); _Static_assert(!__atomic_always_lock_free(2, incomplete), ""); _Static_assert(!__atomic_always_lock_free(4, incomplete), ""); _Static_assert(__atomic_always_lock_free(1, &i8), ""); _Static_assert(__atomic_always_lock_free(1, &i64), ""); _Static_assert(!__atomic_always_lock_free(2, &i8), ""); _Static_assert(__atomic_always_lock_free(2, &i16), ""); _Static_assert(__atomic_always_lock_free(2, &i64), ""); _Static_assert(!__atomic_always_lock_free(4, &i16), ""); _Static_assert(__atomic_always_lock_free(4, &i32), ""); _Static_assert(__atomic_always_lock_free(4, &i64), ""); _Static_assert(!__atomic_always_lock_free(8, &i32), ""); _Static_assert(__atomic_always_lock_free(8, &i64), ""); void f(_Atomic(int) *i, _Atomic(int*) *p, _Atomic(float) *d, int *I, int **P, float *D, struct S *s1, struct S *s2) { __c11_atomic_init(I, 5); // expected-error {{pointer to _Atomic}} __c11_atomic_load(0); // expected-error {{too few arguments to function}} __c11_atomic_load(0,0,0); // expected-error {{too many arguments to function}} __c11_atomic_store(0,0,0); // expected-error {{address argument to atomic builtin must be a pointer}} __c11_atomic_store((int*)0,0,0); // expected-error {{address argument to atomic operation must be a pointer to _Atomic}} __c11_atomic_load(i, memory_order_seq_cst); __c11_atomic_load(p, memory_order_seq_cst); __c11_atomic_load(d, memory_order_seq_cst); int load_n_1 = __atomic_load_n(I, memory_order_relaxed); int *load_n_2 = __atomic_load_n(P, memory_order_relaxed); float load_n_3 = __atomic_load_n(D, memory_order_relaxed); // expected-error {{must be a pointer to integer or pointer}} __atomic_load_n(s1, memory_order_relaxed); // expected-error {{must be a pointer to integer or pointer}} __atomic_load(i, I, memory_order_relaxed); // expected-error {{must be a pointer to a trivially-copyable type}} __atomic_load(I, i, memory_order_relaxed); // expected-warning {{passing '_Atomic(int) *' to parameter of type 'int *'}} __atomic_load(I, *P, memory_order_relaxed); __atomic_load(I, *P, memory_order_relaxed, 42); // expected-error {{too many arguments}} (int)__atomic_load(I, I, memory_order_seq_cst); // expected-error {{operand of type 'void'}} __atomic_load(s1, s2, memory_order_acquire); __c11_atomic_store(i, 1, memory_order_seq_cst); __c11_atomic_store(p, 1, memory_order_seq_cst); // expected-warning {{incompatible integer to pointer conversion}} (int)__c11_atomic_store(d, 1, memory_order_seq_cst); // expected-error {{operand of type 'void'}} __atomic_store_n(I, 4, memory_order_release); __atomic_store_n(I, 4.0, memory_order_release); __atomic_store_n(I, P, memory_order_release); // expected-warning {{parameter of type 'int'}} __atomic_store_n(i, 1, memory_order_release); // expected-error {{must be a pointer to integer or pointer}} __atomic_store_n(s1, *s2, memory_order_release); // expected-error {{must be a pointer to integer or pointer}} __atomic_store(I, *P, memory_order_release); __atomic_store(s1, s2, memory_order_release); __atomic_store(i, I, memory_order_release); // expected-error {{trivially-copyable}} int exchange_1 = __c11_atomic_exchange(i, 1, memory_order_seq_cst); int exchange_2 = __c11_atomic_exchange(I, 1, memory_order_seq_cst); // expected-error {{must be a pointer to _Atomic}} int exchange_3 = __atomic_exchange_n(i, 1, memory_order_seq_cst); // expected-error {{must be a pointer to integer or pointer}} int exchange_4 = __atomic_exchange_n(I, 1, memory_order_seq_cst); __atomic_exchange(s1, s2, s2, memory_order_seq_cst); __atomic_exchange(s1, I, P, memory_order_seq_cst); // expected-warning 2{{parameter of type 'struct S *'}} (int)__atomic_exchange(s1, s2, s2, memory_order_seq_cst); // expected-error {{operand of type 'void'}} __c11_atomic_fetch_add(i, 1, memory_order_seq_cst); __c11_atomic_fetch_add(p, 1, memory_order_seq_cst); __c11_atomic_fetch_add(d, 1, memory_order_seq_cst); // expected-error {{must be a pointer to atomic integer or pointer}} __atomic_fetch_add(i, 3, memory_order_seq_cst); // expected-error {{pointer to integer or pointer}} __atomic_fetch_sub(I, 3, memory_order_seq_cst); __atomic_fetch_sub(P, 3, memory_order_seq_cst); __atomic_fetch_sub(D, 3, memory_order_seq_cst); // expected-error {{must be a pointer to integer or pointer}} __atomic_fetch_sub(s1, 3, memory_order_seq_cst); // expected-error {{must be a pointer to integer or pointer}} __c11_atomic_fetch_and(i, 1, memory_order_seq_cst); __c11_atomic_fetch_and(p, 1, memory_order_seq_cst); // expected-error {{must be a pointer to atomic integer}} __c11_atomic_fetch_and(d, 1, memory_order_seq_cst); // expected-error {{must be a pointer to atomic integer}} __atomic_fetch_and(i, 3, memory_order_seq_cst); // expected-error {{pointer to integer}} __atomic_fetch_or(I, 3, memory_order_seq_cst); __atomic_fetch_xor(P, 3, memory_order_seq_cst); // expected-error {{must be a pointer to integer}} __atomic_fetch_or(D, 3, memory_order_seq_cst); // expected-error {{must be a pointer to integer}} __atomic_fetch_and(s1, 3, memory_order_seq_cst); // expected-error {{must be a pointer to integer}} _Bool cmpexch_1 = __c11_atomic_compare_exchange_strong(i, 0, 1, memory_order_seq_cst, memory_order_seq_cst); _Bool cmpexch_2 = __c11_atomic_compare_exchange_strong(p, 0, (int*)1, memory_order_seq_cst, memory_order_seq_cst); _Bool cmpexch_3 = __c11_atomic_compare_exchange_strong(d, (int*)0, 1, memory_order_seq_cst, memory_order_seq_cst); // expected-warning {{incompatible pointer types}} _Bool cmpexch_4 = __atomic_compare_exchange_n(I, I, 5, 1, memory_order_seq_cst, memory_order_seq_cst); _Bool cmpexch_5 = __atomic_compare_exchange_n(I, P, 5, 0, memory_order_seq_cst, memory_order_seq_cst); // expected-warning {{; dereference with *}} _Bool cmpexch_6 = __atomic_compare_exchange_n(I, I, P, 0, memory_order_seq_cst, memory_order_seq_cst); // expected-warning {{passing 'int **' to parameter of type 'int'}} _Bool cmpexch_7 = __atomic_compare_exchange(I, I, 5, 1, memory_order_seq_cst, memory_order_seq_cst); // expected-warning {{passing 'int' to parameter of type 'int *'}} _Bool cmpexch_8 = __atomic_compare_exchange(I, P, I, 0, memory_order_seq_cst, memory_order_seq_cst); // expected-warning {{; dereference with *}} _Bool cmpexch_9 = __atomic_compare_exchange(I, I, I, 0, memory_order_seq_cst, memory_order_seq_cst); const volatile int flag_k = 0; volatile int flag = 0; (void)(int)__atomic_test_and_set(&flag_k, memory_order_seq_cst); // expected-warning {{passing 'const volatile int *' to parameter of type 'volatile void *'}} (void)(int)__atomic_test_and_set(&flag, memory_order_seq_cst); __atomic_clear(&flag_k, memory_order_seq_cst); // expected-warning {{passing 'const volatile int *' to parameter of type 'volatile void *'}} __atomic_clear(&flag, memory_order_seq_cst); (int)__atomic_clear(&flag, memory_order_seq_cst); // expected-error {{operand of type 'void'}} const _Atomic(int) const_atomic; __c11_atomic_init(&const_atomic, 0); // expected-error {{address argument to atomic operation must be a pointer to non-const _Atomic type ('const _Atomic(int) *' invalid)}} __c11_atomic_store(&const_atomic, 0, memory_order_release); // expected-error {{address argument to atomic operation must be a pointer to non-const _Atomic type ('const _Atomic(int) *' invalid)}} __c11_atomic_load(&const_atomic, memory_order_acquire); // expected-error {{address argument to atomic operation must be a pointer to non-const _Atomic type ('const _Atomic(int) *' invalid)}} // Ensure the <stdatomic.h> macros behave appropriately. atomic_int n = ATOMIC_VAR_INIT(123); atomic_init(&n, 456); atomic_init(&n, (void*)0); // expected-warning {{passing 'void *' to parameter of type 'int'}} const atomic_wchar_t cawt; atomic_init(&cawt, L'x'); // expected-error {{non-const}} atomic_wchar_t awt; atomic_init(&awt, L'x'); int x = kill_dependency(12); atomic_thread_fence(); // expected-error {{too few arguments to function call}} atomic_thread_fence(memory_order_seq_cst); atomic_signal_fence(memory_order_seq_cst); void (*pfn)(memory_order) = &atomic_thread_fence; pfn = &atomic_signal_fence; int k = atomic_load_explicit(&n, memory_order_relaxed); atomic_store_explicit(&n, k, memory_order_relaxed); atomic_store(&n, atomic_load(&n)); k = atomic_exchange(&n, 72); k = atomic_exchange_explicit(&n, k, memory_order_release); atomic_compare_exchange_strong(&n, k, k); // expected-warning {{take the address with &}} atomic_compare_exchange_weak(&n, &k, k); atomic_compare_exchange_strong_explicit(&n, &k, k, memory_order_seq_cst); // expected-error {{too few arguments}} atomic_compare_exchange_weak_explicit(&n, &k, k, memory_order_seq_cst, memory_order_acquire); atomic_fetch_add(&k, n); // expected-error {{must be a pointer to _Atomic}} k = atomic_fetch_add(&n, k); k = atomic_fetch_sub(&n, k); k = atomic_fetch_and(&n, k); k = atomic_fetch_or(&n, k); k = atomic_fetch_xor(&n, k); k = atomic_fetch_add_explicit(&n, k, memory_order_acquire); k = atomic_fetch_sub_explicit(&n, k, memory_order_release); k = atomic_fetch_and_explicit(&n, k, memory_order_acq_rel); k = atomic_fetch_or_explicit(&n, k, memory_order_consume); k = atomic_fetch_xor_explicit(&n, k, memory_order_relaxed); // C11 7.17.1/4: atomic_flag is a structure type. struct atomic_flag must_be_struct = ATOMIC_FLAG_INIT; // C11 7.17.8/5 implies that it is also a typedef type. atomic_flag guard = ATOMIC_FLAG_INIT; _Bool old_val = atomic_flag_test_and_set(&guard); if (old_val) atomic_flag_clear(&guard); old_val = (atomic_flag_test_and_set)(&guard); if (old_val) (atomic_flag_clear)(&guard); const atomic_flag const_guard; atomic_flag_test_and_set(&const_guard); // expected-error {{address argument to atomic operation must be a pointer to non-const _Atomic type ('const atomic_bool *' (aka 'const _Atomic(_Bool) *') invalid)}} atomic_flag_clear(&const_guard); // expected-error {{address argument to atomic operation must be a pointer to non-const _Atomic type ('const atomic_bool *' (aka 'const _Atomic(_Bool) *') invalid)}} } _Atomic(int*) PR12527_a; void PR12527() { int *b = PR12527_a; } void PR16931(int* x) { // expected-note {{passing argument to parameter 'x' here}} typedef struct { _Atomic(_Bool) flag; } flag; flag flagvar = { 0 }; PR16931(&flagvar); // expected-warning {{incompatible pointer types}} } void memory_checks(_Atomic(int) *Ap, int *p, int val) { (void)__c11_atomic_load(Ap, memory_order_relaxed); (void)__c11_atomic_load(Ap, memory_order_acquire); (void)__c11_atomic_load(Ap, memory_order_consume); (void)__c11_atomic_load(Ap, memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}} (void)__c11_atomic_load(Ap, memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} (void)__c11_atomic_load(Ap, memory_order_seq_cst); (void)__c11_atomic_load(Ap, val); (void)__c11_atomic_load(Ap, -1); // expected-warning {{memory order argument to atomic operation is invalid}} (void)__c11_atomic_load(Ap, 42); // expected-warning {{memory order argument to atomic operation is invalid}} (void)__c11_atomic_store(Ap, val, memory_order_relaxed); (void)__c11_atomic_store(Ap, val, memory_order_acquire); // expected-warning {{memory order argument to atomic operation is invalid}} (void)__c11_atomic_store(Ap, val, memory_order_consume); // expected-warning {{memory order argument to atomic operation is invalid}} (void)__c11_atomic_store(Ap, val, memory_order_release); (void)__c11_atomic_store(Ap, val, memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} (void)__c11_atomic_store(Ap, val, memory_order_seq_cst); (void)__c11_atomic_fetch_add(Ap, 1, memory_order_relaxed); (void)__c11_atomic_fetch_add(Ap, 1, memory_order_acquire); (void)__c11_atomic_fetch_add(Ap, 1, memory_order_consume); (void)__c11_atomic_fetch_add(Ap, 1, memory_order_release); (void)__c11_atomic_fetch_add(Ap, 1, memory_order_acq_rel); (void)__c11_atomic_fetch_add(Ap, 1, memory_order_seq_cst); (void)__c11_atomic_fetch_add( (struct Incomplete * _Atomic *)0, // expected-error {{incomplete type 'struct Incomplete'}} 1, memory_order_seq_cst); (void)__c11_atomic_init(Ap, val); (void)__c11_atomic_init(Ap, val); (void)__c11_atomic_init(Ap, val); (void)__c11_atomic_init(Ap, val); (void)__c11_atomic_init(Ap, val); (void)__c11_atomic_init(Ap, val); (void)__c11_atomic_fetch_sub(Ap, val, memory_order_relaxed); (void)__c11_atomic_fetch_sub(Ap, val, memory_order_acquire); (void)__c11_atomic_fetch_sub(Ap, val, memory_order_consume); (void)__c11_atomic_fetch_sub(Ap, val, memory_order_release); (void)__c11_atomic_fetch_sub(Ap, val, memory_order_acq_rel); (void)__c11_atomic_fetch_sub(Ap, val, memory_order_seq_cst); (void)__c11_atomic_fetch_and(Ap, val, memory_order_relaxed); (void)__c11_atomic_fetch_and(Ap, val, memory_order_acquire); (void)__c11_atomic_fetch_and(Ap, val, memory_order_consume); (void)__c11_atomic_fetch_and(Ap, val, memory_order_release); (void)__c11_atomic_fetch_and(Ap, val, memory_order_acq_rel); (void)__c11_atomic_fetch_and(Ap, val, memory_order_seq_cst); (void)__c11_atomic_fetch_or(Ap, val, memory_order_relaxed); (void)__c11_atomic_fetch_or(Ap, val, memory_order_acquire); (void)__c11_atomic_fetch_or(Ap, val, memory_order_consume); (void)__c11_atomic_fetch_or(Ap, val, memory_order_release); (void)__c11_atomic_fetch_or(Ap, val, memory_order_acq_rel); (void)__c11_atomic_fetch_or(Ap, val, memory_order_seq_cst); (void)__c11_atomic_fetch_xor(Ap, val, memory_order_relaxed); (void)__c11_atomic_fetch_xor(Ap, val, memory_order_acquire); (void)__c11_atomic_fetch_xor(Ap, val, memory_order_consume); (void)__c11_atomic_fetch_xor(Ap, val, memory_order_release); (void)__c11_atomic_fetch_xor(Ap, val, memory_order_acq_rel); (void)__c11_atomic_fetch_xor(Ap, val, memory_order_seq_cst); (void)__c11_atomic_exchange(Ap, val, memory_order_relaxed); (void)__c11_atomic_exchange(Ap, val, memory_order_acquire); (void)__c11_atomic_exchange(Ap, val, memory_order_consume); (void)__c11_atomic_exchange(Ap, val, memory_order_release); (void)__c11_atomic_exchange(Ap, val, memory_order_acq_rel); (void)__c11_atomic_exchange(Ap, val, memory_order_seq_cst); (void)__c11_atomic_compare_exchange_strong(Ap, p, val, memory_order_relaxed, memory_order_relaxed); (void)__c11_atomic_compare_exchange_strong(Ap, p, val, memory_order_acquire, memory_order_relaxed); (void)__c11_atomic_compare_exchange_strong(Ap, p, val, memory_order_consume, memory_order_relaxed); (void)__c11_atomic_compare_exchange_strong(Ap, p, val, memory_order_release, memory_order_relaxed); (void)__c11_atomic_compare_exchange_strong(Ap, p, val, memory_order_acq_rel, memory_order_relaxed); (void)__c11_atomic_compare_exchange_strong(Ap, p, val, memory_order_seq_cst, memory_order_relaxed); (void)__c11_atomic_compare_exchange_weak(Ap, p, val, memory_order_relaxed, memory_order_relaxed); (void)__c11_atomic_compare_exchange_weak(Ap, p, val, memory_order_acquire, memory_order_relaxed); (void)__c11_atomic_compare_exchange_weak(Ap, p, val, memory_order_consume, memory_order_relaxed); (void)__c11_atomic_compare_exchange_weak(Ap, p, val, memory_order_release, memory_order_relaxed); (void)__c11_atomic_compare_exchange_weak(Ap, p, val, memory_order_acq_rel, memory_order_relaxed); (void)__c11_atomic_compare_exchange_weak(Ap, p, val, memory_order_seq_cst, memory_order_relaxed); (void)__atomic_load_n(p, memory_order_relaxed); (void)__atomic_load_n(p, memory_order_acquire); (void)__atomic_load_n(p, memory_order_consume); (void)__atomic_load_n(p, memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}} (void)__atomic_load_n(p, memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} (void)__atomic_load_n(p, memory_order_seq_cst); (void)__atomic_load(p, p, memory_order_relaxed); (void)__atomic_load(p, p, memory_order_acquire); (void)__atomic_load(p, p, memory_order_consume); (void)__atomic_load(p, p, memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}} (void)__atomic_load(p, p, memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} (void)__atomic_load(p, p, memory_order_seq_cst); (void)__atomic_store(p, p, memory_order_relaxed); (void)__atomic_store(p, p, memory_order_acquire); // expected-warning {{memory order argument to atomic operation is invalid}} (void)__atomic_store(p, p, memory_order_consume); // expected-warning {{memory order argument to atomic operation is invalid}} (void)__atomic_store(p, p, memory_order_release); (void)__atomic_store(p, p, memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} (void)__atomic_store(p, p, memory_order_seq_cst); (void)__atomic_store_n(p, val, memory_order_relaxed); (void)__atomic_store_n(p, val, memory_order_acquire); // expected-warning {{memory order argument to atomic operation is invalid}} (void)__atomic_store_n(p, val, memory_order_consume); // expected-warning {{memory order argument to atomic operation is invalid}} (void)__atomic_store_n(p, val, memory_order_release); (void)__atomic_store_n(p, val, memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}} (void)__atomic_store_n(p, val, memory_order_seq_cst); (void)__atomic_fetch_add(p, val, memory_order_relaxed); (void)__atomic_fetch_add(p, val, memory_order_acquire); (void)__atomic_fetch_add(p, val, memory_order_consume); (void)__atomic_fetch_add(p, val, memory_order_release); (void)__atomic_fetch_add(p, val, memory_order_acq_rel); (void)__atomic_fetch_add(p, val, memory_order_seq_cst); (void)__atomic_fetch_sub(p, val, memory_order_relaxed); (void)__atomic_fetch_sub(p, val, memory_order_acquire); (void)__atomic_fetch_sub(p, val, memory_order_consume); (void)__atomic_fetch_sub(p, val, memory_order_release); (void)__atomic_fetch_sub(p, val, memory_order_acq_rel); (void)__atomic_fetch_sub(p, val, memory_order_seq_cst); (void)__atomic_add_fetch(p, val, memory_order_relaxed); (void)__atomic_add_fetch(p, val, memory_order_acquire); (void)__atomic_add_fetch(p, val, memory_order_consume); (void)__atomic_add_fetch(p, val, memory_order_release); (void)__atomic_add_fetch(p, val, memory_order_acq_rel); (void)__atomic_add_fetch(p, val, memory_order_seq_cst); (void)__atomic_sub_fetch(p, val, memory_order_relaxed); (void)__atomic_sub_fetch(p, val, memory_order_acquire); (void)__atomic_sub_fetch(p, val, memory_order_consume); (void)__atomic_sub_fetch(p, val, memory_order_release); (void)__atomic_sub_fetch(p, val, memory_order_acq_rel); (void)__atomic_sub_fetch(p, val, memory_order_seq_cst); (void)__atomic_fetch_and(p, val, memory_order_relaxed); (void)__atomic_fetch_and(p, val, memory_order_acquire); (void)__atomic_fetch_and(p, val, memory_order_consume); (void)__atomic_fetch_and(p, val, memory_order_release); (void)__atomic_fetch_and(p, val, memory_order_acq_rel); (void)__atomic_fetch_and(p, val, memory_order_seq_cst); (void)__atomic_fetch_or(p, val, memory_order_relaxed); (void)__atomic_fetch_or(p, val, memory_order_acquire); (void)__atomic_fetch_or(p, val, memory_order_consume); (void)__atomic_fetch_or(p, val, memory_order_release); (void)__atomic_fetch_or(p, val, memory_order_acq_rel); (void)__atomic_fetch_or(p, val, memory_order_seq_cst); (void)__atomic_fetch_xor(p, val, memory_order_relaxed); (void)__atomic_fetch_xor(p, val, memory_order_acquire); (void)__atomic_fetch_xor(p, val, memory_order_consume); (void)__atomic_fetch_xor(p, val, memory_order_release); (void)__atomic_fetch_xor(p, val, memory_order_acq_rel); (void)__atomic_fetch_xor(p, val, memory_order_seq_cst); (void)__atomic_fetch_nand(p, val, memory_order_relaxed); (void)__atomic_fetch_nand(p, val, memory_order_acquire); (void)__atomic_fetch_nand(p, val, memory_order_consume); (void)__atomic_fetch_nand(p, val, memory_order_release); (void)__atomic_fetch_nand(p, val, memory_order_acq_rel); (void)__atomic_fetch_nand(p, val, memory_order_seq_cst); (void)__atomic_and_fetch(p, val, memory_order_relaxed); (void)__atomic_and_fetch(p, val, memory_order_acquire); (void)__atomic_and_fetch(p, val, memory_order_consume); (void)__atomic_and_fetch(p, val, memory_order_release); (void)__atomic_and_fetch(p, val, memory_order_acq_rel); (void)__atomic_and_fetch(p, val, memory_order_seq_cst); (void)__atomic_or_fetch(p, val, memory_order_relaxed); (void)__atomic_or_fetch(p, val, memory_order_acquire); (void)__atomic_or_fetch(p, val, memory_order_consume); (void)__atomic_or_fetch(p, val, memory_order_release); (void)__atomic_or_fetch(p, val, memory_order_acq_rel); (void)__atomic_or_fetch(p, val, memory_order_seq_cst); (void)__atomic_xor_fetch(p, val, memory_order_relaxed); (void)__atomic_xor_fetch(p, val, memory_order_acquire); (void)__atomic_xor_fetch(p, val, memory_order_consume); (void)__atomic_xor_fetch(p, val, memory_order_release); (void)__atomic_xor_fetch(p, val, memory_order_acq_rel); (void)__atomic_xor_fetch(p, val, memory_order_seq_cst); (void)__atomic_nand_fetch(p, val, memory_order_relaxed); (void)__atomic_nand_fetch(p, val, memory_order_acquire); (void)__atomic_nand_fetch(p, val, memory_order_consume); (void)__atomic_nand_fetch(p, val, memory_order_release); (void)__atomic_nand_fetch(p, val, memory_order_acq_rel); (void)__atomic_nand_fetch(p, val, memory_order_seq_cst); (void)__atomic_exchange_n(p, val, memory_order_relaxed); (void)__atomic_exchange_n(p, val, memory_order_acquire); (void)__atomic_exchange_n(p, val, memory_order_consume); (void)__atomic_exchange_n(p, val, memory_order_release); (void)__atomic_exchange_n(p, val, memory_order_acq_rel); (void)__atomic_exchange_n(p, val, memory_order_seq_cst); (void)__atomic_exchange(p, p, p, memory_order_relaxed); (void)__atomic_exchange(p, p, p, memory_order_acquire); (void)__atomic_exchange(p, p, p, memory_order_consume); (void)__atomic_exchange(p, p, p, memory_order_release); (void)__atomic_exchange(p, p, p, memory_order_acq_rel); (void)__atomic_exchange(p, p, p, memory_order_seq_cst); (void)__atomic_compare_exchange(p, p, p, 0, memory_order_relaxed, memory_order_relaxed); (void)__atomic_compare_exchange(p, p, p, 0, memory_order_acquire, memory_order_relaxed); (void)__atomic_compare_exchange(p, p, p, 0, memory_order_consume, memory_order_relaxed); (void)__atomic_compare_exchange(p, p, p, 0, memory_order_release, memory_order_relaxed); (void)__atomic_compare_exchange(p, p, p, 0, memory_order_acq_rel, memory_order_relaxed); (void)__atomic_compare_exchange(p, p, p, 0, memory_order_seq_cst, memory_order_relaxed); (void)__atomic_compare_exchange_n(p, p, val, 0, memory_order_relaxed, memory_order_relaxed); (void)__atomic_compare_exchange_n(p, p, val, 0, memory_order_acquire, memory_order_relaxed); (void)__atomic_compare_exchange_n(p, p, val, 0, memory_order_consume, memory_order_relaxed); (void)__atomic_compare_exchange_n(p, p, val, 0, memory_order_release, memory_order_relaxed); (void)__atomic_compare_exchange_n(p, p, val, 0, memory_order_acq_rel, memory_order_relaxed); (void)__atomic_compare_exchange_n(p, p, val, 0, memory_order_seq_cst, memory_order_relaxed); }
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Sema/aarch64-special-register.c
// RUN: %clang_cc1 -ffreestanding -fsyntax-only -verify -triple aarch64 %s void string_literal(unsigned v) { __builtin_arm_wsr(0, v); // expected-error {{expression is not a string literal}} } void wsr_1(unsigned v) { __builtin_arm_wsr("sysreg", v); } void wsrp_1(void *v) { __builtin_arm_wsrp("sysreg", v); } void wsr64_1(unsigned long v) { __builtin_arm_wsr64("sysreg", v); //expected-error {{invalid special register for builtin}} } unsigned rsr_1() { return __builtin_arm_rsr("sysreg"); } void *rsrp_1() { return __builtin_arm_rsrp("sysreg"); } unsigned long rsr64_1() { return __builtin_arm_rsr64("sysreg"); //expected-error {{invalid special register for builtin}} } void wsr_2(unsigned v) { __builtin_arm_wsr("0:1:2:3:4", v); } void wsrp_2(void *v) { __builtin_arm_wsrp("0:1:2:3:4", v); } void wsr64_2(unsigned long v) { __builtin_arm_wsr64("0:1:2:3:4", v); } unsigned rsr_2() { return __builtin_arm_rsr("0:1:2:3:4"); } void *rsrp_2() { return __builtin_arm_rsrp("0:1:2:3:4"); } unsigned long rsr64_2() { return __builtin_arm_rsr64("0:1:2:3:4"); } void wsr_3(unsigned v) { __builtin_arm_wsr("0:1:2", v); //expected-error {{invalid special register for builtin}} } void wsrp_3(void *v) { __builtin_arm_wsrp("0:1:2", v); //expected-error {{invalid special register for builtin}} } void wsr64_3(unsigned long v) { __builtin_arm_wsr64("0:1:2", v); //expected-error {{invalid special register for builtin}} } unsigned rsr_3() { return __builtin_arm_rsr("0:1:2"); //expected-error {{invalid special register for builtin}} } void *rsrp_3() { return __builtin_arm_rsrp("0:1:2"); //expected-error {{invalid special register for builtin}} } unsigned long rsr64_3() { return __builtin_arm_rsr64("0:1:2"); //expected-error {{invalid special register for builtin}} }
0
repos/DirectXShaderCompiler/tools/clang/test
repos/DirectXShaderCompiler/tools/clang/test/Sema/offsetof-64.c
// RUN: %clang_cc1 -fsyntax-only -verify %s -triple x86_64-linux-gnu // PR15216 // Don't crash when taking computing the offset of structs with large arrays. const unsigned long Size = (1l << 60); struct Chunk1 { char padding[Size]; char more_padding[1][Size]; char data; }; int test1 = __builtin_offsetof(struct Chunk1, data); struct Chunk2 { char padding[Size][Size][Size]; // expected-error 2{{array is too large}} char data; }; // FIXME: Remove this error when the constant evaluator learns to // ignore bad types. int test2 = __builtin_offsetof(struct Chunk2, data); // expected-error{{initializer element is not a compile-time constant}}