hanchenye-llvm-project/clang/test/Sema
Richard Trieu 7561ed01cb Allow -1 to assign max value to unsigned bitfields.
Silence the -Wbitfield-constant-conversion warning for when -1 or other
negative values are assigned to unsigned bitfields, provided that the bitfield
is wider than the minimum number of bits needed to encode the negative value.

llvm-svn: 277796
2016-08-05 02:39:30 +00:00
..
Inputs
128bitfloat.cpp Enable support for __float128 in Clang and enable it on pertinent platforms 2016-05-09 08:52:33 +00:00
128bitint.c
2007-10-01-BuildArrayRef.c
2009-03-09-WeakDeclarations-1.c
2009-04-22-UnknownSize.c
2009-07-17-VoidParameter.c
2010-05-31-palignr.c
MicrosoftCompatibility-x64.c
MicrosoftCompatibility-x86.c
MicrosoftCompatibility.c
MicrosoftCompatibility.cpp
MicrosoftExtensions.c [Sema] A flexible array member must not be the only named member 2016-07-04 00:24:59 +00:00
PR2727.c
PR2728.c
PR2919-builtin-types-compat-strips-crv.c
PR2923.c
PR2963-enum-constant.c
PR16678.c
__try.c
aarch64-neon-ranges.c
aarch64-neon-vector-types.c
aarch64-special-register.c AArch64: allow 64-bit access to sysregs. 2016-04-13 17:08:55 +00:00
address-constant.c
address_spaces.c [MSVC] Implementation of __unaligned as a proper type qualifier 2016-05-11 18:38:21 +00:00
alias-redefinition.c
align-arm-apcs.c
align-systemz.c
align-x86-64.c
align-x86.c
align_value.c
alignas.c
altivec-init.c
annotate.c
anonymous-struct-union-c11.c
anonymous-struct-union.c
arg-duplicate.c
arg-scope-c99.c
arg-scope.c
arm-asm.c
arm-darwin-aapcs.cpp
arm-interrupt-attr.c
arm-layout.c
arm-microsoft-intrinsics.c
arm-neon-types.c
arm-no-fp16.c [ARM] Guard the declarations of f16 to f32 vcvt intrinsics in arm_neon.h by testing __ARM_FP 2016-04-29 15:03:32 +00:00
arm-special-register.c
arm64-inline-asm.c
arm64-neon-args.c
arm64-neon-header.c AArch64: fix return type of vqmovun_high_*. 2016-07-12 17:38:50 +00:00
arm_acle.c
arm_vfma.c PR27216: Only define __ARM_FEATURE_FMA when the target has VFPv4 2016-04-28 11:29:08 +00:00
array-bounds-ptr-arith.c
array-constraint.c
array-declared-as-incorrect-type.c
array-init.c
array-size-64.c
array-size.c
asm-label.c Error on redeclaring with a conflicting asm label and on redeclaring with an asm label after the first ODR-use. Detects problems like the one in PR22830 where gcc and clang both compiled the file but with different behaviour. 2015-12-11 21:28:55 +00:00
asm.c -inline-asm][X86] Add ability to use AVX512 in MS inline asm 2016-02-03 11:32:08 +00:00
assign-null.c
assign.c
ast-print-x86.c
ast-print.c Fix printing of anonymous struct typedefs. 2016-03-18 21:35:59 +00:00
atomic-compare.c
atomic-expr.c
atomic-ops.c Fix deduction of __atomic_load's parameter types. 2016-03-30 23:39:56 +00:00
atomic-requires-library-error.c
atomic-type.c
attr-alias-elf.c [GCC] Attribute ifunc support in clang 2016-04-11 07:48:59 +00:00
attr-alias.c
attr-aligned.c [Sema] PR26444 fix crash when alignment value is >= 2**16 2016-03-02 06:48:47 +00:00
attr-args.c
attr-availability-android.c
attr-availability-app-extensions.c watchOS & tvOS: add a few more tests. 2015-11-02 21:14:48 +00:00
attr-availability-ios.c
attr-availability-macosx.c AvailabilityAttr: we accept "macos" as the platform name. 2016-06-28 20:55:30 +00:00
attr-availability-tvos.c Availability: set location when creating attribute for tvos, watchos. 2016-05-06 21:04:01 +00:00
attr-availability-watchos.c watchOS & tvOS: add a few more tests. 2015-11-02 21:14:48 +00:00
attr-availability.c AvailabilityAttr: we accept "macos" as the platform name. 2016-06-28 20:55:30 +00:00
attr-bounded.c
attr-capabilities.c Thread Safety Analysis: allow capability attribute on unions. 2015-09-29 16:24:18 +00:00
attr-cleanup.c
attr-coldhot.c Implement __attribute__((internal_linkage)). 2015-11-10 21:28:44 +00:00
attr-decl-after-definition.c
attr-declspec-ignored.c
attr-deprecated-message.c
attr-deprecated.c Set the default C standard to C99 when targeting the PS4. 2016-04-27 19:53:03 +00:00
attr-disable-tail-calls.c Add support for function attribute 'disable_tail_calls'. 2015-11-13 00:42:21 +00:00
attr-endian.c
attr-flag-enum.c Update tests touched by r249656 2015-10-08 06:31:22 +00:00
attr-format.c
attr-format_arg.c
attr-ifunc.c Don't clutter the test directory with temporary IR files. 2016-04-11 10:16:37 +00:00
attr-malloc.c
attr-minsize.c
attr-mode-enums.c Fix for PR8901: attribute "mode" rejected for enums and dependent types. 2016-02-02 13:50:39 +00:00
attr-mode-vector-types.c PR10235: support for vector mode attributes + warning, by Dmitry Polukhin. 2015-11-19 10:13:11 +00:00
attr-mode.c Enable support for __float128 in Clang and enable it on pertinent platforms 2016-05-09 08:52:33 +00:00
attr-msp430.c
attr-naked.c
attr-naked.cpp
attr-nodebug.c Allow 'nodebug' on local variables. 2016-06-16 00:42:36 +00:00
attr-noduplicate.c
attr-noinline.c
attr-nonnull.c
attr-noreturn.c
attr-notail.c Implement __attribute__((internal_linkage)). 2015-11-10 21:28:44 +00:00
attr-ownership.c Fix several accidental DOS line endings in source files 2016-01-03 15:55:40 +00:00
attr-print.c AvailabilityAttr: we accept "macos" as the platform name. 2016-06-28 20:55:30 +00:00
attr-regparm.c
attr-returns-twice.c
attr-section.c
attr-self-alias.c
attr-sentinel.c
attr-swiftcall.c Semantic analysis for the swiftcall calling convention. 2016-03-03 06:39:32 +00:00
attr-target.c
attr-tls_model.c
attr-unavailable-message.c
attr-unknown.c
attr-unused.c
attr-used.c
attr-visibility.c
attr-weak.c
attr-x86-interrupt.c [X86] Support 'interrupt' attribute for x86 2016-01-15 04:06:31 +00:00
auto-type.c Additional tests from r252690 that I forgot to 'svn add'. 2015-11-12 21:42:39 +00:00
big-endian-neon-initializers.c
bitfield-layout.c [PS4] Change the names of some "environmental" things to what our 2016-05-16 17:22:25 +00:00
bitfield-layout_1.c pr26544: Bitfield layout with pragma pack and attributes "packed" and 2016-02-19 11:23:28 +00:00
bitfield-promote.c
bitfield.c Allow -1 to assign max value to unsigned bitfields. 2016-08-05 02:39:30 +00:00
block-args.c
block-call.c
block-explicit-noreturn-type.c
block-labels.c
block-literal.c
block-misc.c
block-printf-attribute-1.c
block-return-1.c
block-return-2.c
block-return-3.c
block-return.c
block-sentinel-attribute.c
block-storageclass.c
bool-compare.c
builtin-assume-aligned.c
builtin-assume.c
builtin-classify-type.c PR26449: Tests for builtin_classify_type fix 2016-02-15 10:44:27 +00:00
builtin-clear_cache.c
builtin-cpu-supports.c
builtin-longjmp.c [Sparc] setjmp and longjmp intrinsic support update to add unit tests and remove accidentally checked-in code. 2016-06-15 16:08:13 +00:00
builtin-object-size.c [ExprConstant] Fix PR28314 - crash while evluating objectsize. 2016-06-27 19:40:41 +00:00
builtin-prefetch.c
builtin-stackaddress.c
builtin-unary-fp.c
builtin_objc_msgSend.c
builtins-aarch64.c
builtins-arm-exclusive.c
builtins-arm-strex-rettype.c
builtins-arm.c [ARM] Add mrrc/mrrc2 intrinsics and update existing mcrr/mcrr2 intrinsics. 2016-06-17 00:59:41 +00:00
builtins-arm64-exclusive.c
builtins-arm64.c
builtins-decl.c
builtins-gnu-mode.c
builtins-overflow.c Add support for __builtin_{add,sub,mul}_overflow. 2015-10-29 20:48:01 +00:00
builtins-ppc.c
builtins-x86.c
builtins.c
builtins.cl [Sema] Handle errors during rewriteBuiltinFunctionDecl 2016-07-21 23:03:43 +00:00
c11-typedef-redef.c
c89.c
call-with-static-chain.c
callingconv-cast.c Fix line numbers in calling convention test 2016-05-17 17:33:31 +00:00
callingconv-iamcu.c [X86] Support for C calling convention only for MCU target. 2015-11-25 09:24:26 +00:00
callingconv-ms_abi.c
callingconv-sysv_abi.c
callingconv.c
captured-statements.c
cast-incomplete.c [Sema] Tweak incomplete enum types on MSVC ABI targets 2015-10-08 07:45:35 +00:00
cast-to-union.c
cast.c
check-increment.c
compare.c
complex-imag.c
complex-init-list.c
complex-int.c
complex-promotion.c
compound-literal.c
conditional-expr.c
conditional.c
const-eval-64.c
const-eval.c Explicitly permit undefined behavior in constant initializers for global 2015-12-08 03:21:47 +00:00
const-ptr-int-ptr-cast.c
constant-builtins-2.c
constant-builtins.c
constant-conversion.c Allow -1 to assign max value to unsigned bitfields. 2016-08-05 02:39:30 +00:00
constructor-attribute.c
conversion-64-32.c
conversion.c
convertvector.c
crash-invalid-array.c
crash-invalid-builtin.c
darwin-align-cast.c
darwin-tls.c ARM: allow __thread on OS versions that have the required runtime support. 2016-01-07 09:04:46 +00:00
decl-in-prototype.c When a tag is declared in prototype scope in C, if we've decided that it 2016-01-11 22:41:53 +00:00
decl-invalid.c
decl-microsoft-call-conv.c
decl-type-merging.c
declspec.c
default.c
default1.c
deref.c
designated-initializers.c
dllexport.c Sema: support __declspec(dll*) on ObjC interfaces 2016-07-15 20:41:10 +00:00
dllimport.c Sema: support __declspec(dll*) on ObjC interfaces 2016-07-15 20:41:10 +00:00
empty1.c
empty2.c
enable_if-ext.c Sema: provide an extension warning for enable_if 2016-02-18 06:49:31 +00:00
enable_if.c Add the Pure attribute to C99 builtin functions from ctype.h. This is a corrected version of r266199 with test case fixes. 2016-05-04 21:08:13 +00:00
enum-increment.c
enum-packed.c
enum.c Update tests touched by r249656 2015-10-08 06:31:22 +00:00
expr-address-of.c
expr-comma-c99.c
expr-comma.c
exprs.c Add support for GCC's '__auto_type' extension, per the GCC manual: 2015-11-11 02:02:15 +00:00
ext_vector_casts.c [Sema] Make extended vectors of `bool` an error. 2016-01-28 01:38:18 +00:00
ext_vector_comparisons.c
ext_vector_components.c Add .rgba syntax extension to ext_vector_type types 2016-07-22 18:49:43 +00:00
ext_vector_conversions.c Prevent implicit re-interpret casts between ExtVector and Scalar types. 2015-09-15 00:21:56 +00:00
extern-redecl.c
flexible-array-init.c
float128-ld-incompatibility.cpp Enable support for __float128 in Clang and enable it on pertinent platforms 2016-05-09 08:52:33 +00:00
floating-point-compare.c
fn-ptr-as-fn-prototype.c Update a few more tests in response to the MS ABI enum semantics 2015-10-08 08:28:09 +00:00
for.c
format-string-percentm.c
format-strings-c90.c
format-strings-darwin.c
format-strings-enum-fixed-type.cpp
format-strings-enum.c
format-strings-fixit-ssize_t.c
format-strings-fixit.c Move the fixit for -Wformat-security to a note. 2016-03-15 20:56:38 +00:00
format-strings-freebsd.c Check 'r' and 'y specifiers of freebsd_kernel_printf format strings on PS4 2016-04-26 23:19:00 +00:00
format-strings-gnu.c
format-strings-int-typedefs.c
format-strings-ms.c
format-strings-no-fixit.c
format-strings-non-iso.c
format-strings-scanf.c [Sema] Attempt to fix tests for utf-8 invalid format string specifiers 2016-03-29 18:38:44 +00:00
format-strings-size_t.c
format-strings.c [Sema] Attempt to fix tests for utf-8 invalid format string specifiers 2016-03-29 18:38:44 +00:00
fp16-sema.c
fpack-struct.c
freemain.c
function-ptr.c
function-redecl.c Update a few more tests in response to the MS ABI enum semantics 2015-10-08 08:28:09 +00:00
function.c
generic-selection.c Amends r252104 to evaluate the controlling expression in an unevaluated context. This eliminates false-positive diagnostics about null pointer dereferences (etc) in the controlling expression. 2016-02-23 18:55:15 +00:00
gnu-attributes.c
gnu-flags.c
gnu89.c
heinous-extensions-off.c
heinous-extensions-on.c
i-c-e.c
i386-linux-android.c
illegal-types.c
implicit-builtin-decl.c
implicit-builtin-freestanding.c [Driver] Add support for -fno-builtin-foo options. 2016-01-06 14:35:46 +00:00
implicit-builtin-redecl.c
implicit-cast-dump.c
implicit-cast.c
implicit-decl.c
implicit-def.c
implicit-int.c
incompatible-function-pointer-types.c [Sema] Create a separate group for incompatible function pointer warning 2016-07-18 20:37:06 +00:00
incompatible-sign.c
incomplete-call.c
incomplete-decl.c
indirect-goto.c
init-struct-qualified.c
init-vector.c
init.c
initialize-noreturn.c [Sema] Create a separate group for incompatible function pointer warning 2016-07-18 20:37:06 +00:00
inline-asm-validate-aarch64.c
inline-asm-validate-amdgpu.cl AMDGPU: Add support for 's' and 'v' asm constraints 2015-11-19 22:11:58 +00:00
inline-asm-validate-tmpl.cpp
inline-asm-validate-x86.c
inline-asm-validate.c
inline-redef.c
inline.c C does not have inline variables. 2016-07-14 22:22:58 +00:00
int-arith-convert.c
integer-overflow.c Adjust tests to have consistent integer sizes. 2016-04-11 20:37:04 +00:00
internal_linkage.c Implement __attribute__((internal_linkage)). 2015-11-10 21:28:44 +00:00
invalid-assignment-constant-address-space.c [MSVC] Implementation of __unaligned as a proper type qualifier 2016-05-11 18:38:21 +00:00
invalid-cast.cpp
invalid-decl.c
invalid-init-diag.c
invalid-struct-init.c
knr-def-call.c
knr-variadic-def.c
libbuiltins-ctype-powerpc64.c Add the Pure attribute to C99 builtin functions from ctype.h. This is a corrected version of r266199 with test case fixes. 2016-05-04 21:08:13 +00:00
libbuiltins-ctype-x86_64.c Add the Pure attribute to C99 builtin functions from ctype.h. This is a corrected version of r266199 with test case fixes. 2016-05-04 21:08:13 +00:00
lit.local.cfg
loop-control.c
many-logical-ops.c
many-parameters.c
member-reference.c
memset-invalid-1.c
memset-invalid.c
merge-decls.c
mips-interrupt-attr.c [mips] Interrupt attribute support. 2015-11-27 18:03:44 +00:00
mips16_attr_allowed.c
mips16_attr_not_allowed.c
missing-field-initializers.c
mms-bitfields.c
mrtd.c
ms-inline-asm-invalid-arch.c
ms-inline-asm.c
ms-keyword-system-header.c
ms-wchar.c
ms_abi-sysv_abi.c
ms_bitfield_layout.c
ms_class_layout.cpp
ms_wide_predefined_expr.cpp
neon-vector-types-support.c
neon-vector-types.c
nested-redef.c
no-documentation-warn-tagdecl-specifier.c
no-format-y2k-turnsoff-format.c
non-null-warning.c Skip NonNull sema checks in unevaluated contexts. 2015-10-09 00:17:57 +00:00
nonnull.c Add a "declared 'nonnull' here" note to warnings where an expression is checked against null. 2016-06-15 05:18:39 +00:00
nowarn-documentation-property.m
nullability.c [Sema] Compute the nullability of a conditional expression based on the 2016-07-20 01:48:11 +00:00
offsetof-64.c
offsetof.c
outof-range-constant-compare.c
overloadable-complex.c
overloadable.c [Sema] Create a separate group for incompatible function pointer warning 2016-07-18 20:37:06 +00:00
overloaded-func-transparent-union.c
parentheses.c [Sema] Add -Wparentheses warnings for '^' in '|' expressions and '&' in '^' expressions to compliment '&' in '|' that is already present. Matches gcc behavior. 2015-12-13 05:41:41 +00:00
parentheses.cpp
pass-object-size.c [Sema] Allow implicit conversions of &overloaded_fn in C. 2016-03-23 02:33:58 +00:00
pid_t.c
pointer-addition.c
pointer-conversion.c
pointer-subtract-compat.c
ppc-bool.c
pr9812.c
pr25786.c Fix assertion "Chunk.Kind == DeclaratorChunk::Function" with attributed type. 2016-02-10 11:23:48 +00:00
pragma-align-mac68k-unsupported.c
pragma-align-mac68k.c
pragma-align-packed.c
pragma-arc-cf-code-audited.c
pragma-ms_struct.c
pragma-pack-2.c
pragma-pack-3.c
pragma-pack-4.c
pragma-pack-5.c
pragma-pack-6.c
pragma-pack-and-options-align.c
pragma-pack-apple.c
pragma-pack.c
pragma-section-invalid.c
pragma-section.c
pragma-unused.c
pragma-weak.c Revert "Fix for merging decls in pragma weak Calling CheckFunctionDeclaration so that 2 decls for the 'weak' are merged. Differential Revision: http://reviews.llvm.org/D13048" 2015-12-03 11:37:28 +00:00
predef.c
predefined-function.c Keep invalid functions as part of the AST 2016-06-16 21:39:55 +00:00
preserve-call-conv.c Add attributes for preserve_mostcc/preserve_allcc calling conventions to the C/C++ front-end 2016-03-16 18:00:46 +00:00
private-extern.c
rdr6094103-unordered-compare-promote.c
recover-goto.c
redefine_extname.c
redefinition.c
renderscript.rs Revise RenderScript attribute declaration 2016-06-10 21:51:18 +00:00
return-noreturn.c
return-silent.c
return.c
scope-check.c
self-comparison.c
sentinel-attribute.c
shift.c
short-enums.c Update a few more tests in response to the MS ABI enum semantics 2015-10-08 08:28:09 +00:00
sign-conversion.c
sizeof-struct-non-zero-as-member.cl
statements.c
static-array.c
static-assert.c
static-init.c
stdcall-fastcall-x64.c
stdcall-fastcall.c
stmtexprs.c
string-init.c
string-plus-char.c
struct-cast.c
struct-compat.c
struct-decl.c
struct-packed-align.c Fix clang/test/Sema/struct-packed-align.c. "Windows" is not MS compiler. 2015-12-03 16:03:34 +00:00
surpress-deprecated.c
switch-1.c Explicitly permit undefined behavior in constant initializers for global 2015-12-08 03:21:47 +00:00
switch.c
template-specialization.cpp
tentative-decls.c
text-diag.c
thread-specifier.c
tls.c
tls_alignment.cpp
transparent-union-pointer.c
transparent-union.c
type-spec-struct-union.c
typecheck-binop.c
typedef-prototype.c
typedef-redef.c
typedef-retain.c
typedef-variable-type.c
typeof-use-deprecated.c
types.c
typo-correction.c [Parser] Fix bug where delayed typo in conditional expression was corrected twice 2016-07-29 00:55:40 +00:00
ucn-cstring.c
ucn-identifiers.c
uninit-det-order.c
uninit-variables-vectors.c
uninit-variables.c
unnamed-bitfield-init.c
unused-expr-system-header.c
unused-expr.c Implement support for [[nodiscard]] in C++1z that is based off existing support for warn_unused_result, and treat it as an extension pre-C++1z. This also means extending the existing warn_unused_result attribute so that it can be placed on an enum as well as a class. 2016-03-07 22:44:55 +00:00
usual-float.c
va_arg_x86_32.c
va_arg_x86_64.c
var-redecl.c
varargs-win64.c Support __builtin_ms_va_list. 2015-09-17 20:55:33 +00:00
varargs-x86-32.c Support __builtin_ms_va_list. 2015-09-17 20:55:33 +00:00
varargs-x86-64.c Improve diagnostic checking for va_start to also warn on other instances of undefined behavior, such as a parameter declared with the register keyword in C, or a parameter of a type that undergoes default argument promotion. 2016-04-24 13:30:21 +00:00
varargs.c Improve diagnostic checking for va_start to also warn on other instances of undefined behavior, such as a parameter declared with the register keyword in C, or a parameter of a type that undergoes default argument promotion. 2016-04-24 13:30:21 +00:00
varargs_unreachable.c
variadic-block.c
variadic-incomplete-arg-type.c
variadic-promotion.c
vector-assign.c
vector-cast.c [SemaExpr] Support assignments from vector to scalars with same size 2016-07-06 18:05:23 +00:00
vector-init.c
vector-ops.c
vfprintf-invalid-redecl.c
vfprintf-valid-redecl.c
vla-2.c
vla.c
void_arg.c
warn-absolute-value-header.c
warn-absolute-value.c [Sema] Don't crash trying to diagnose abs called on a pointer type 2015-11-15 03:04:34 +00:00
warn-bad-function-cast.c
warn-bitwise-compare.c
warn-cast-align.c
warn-cast-qual.c
warn-char-subscripts.c
warn-documentation-almost-trailing.c
warn-documentation-crlf.c Fix several accidental DOS line endings in source files 2016-01-03 15:55:40 +00:00
warn-documentation-fixits.cpp
warn-documentation-unknown-command.cpp
warn-documentation.cpp
warn-documentation.m
warn-double-promotion.c Improve test coverage of -Wdouble-promotion 2016-04-29 17:44:29 +00:00
warn-duplicate-enum.c
warn-extern-main.c
warn-freestanding-complex.c
warn-gnu-designators.c
warn-logical-not-compare.c
warn-main-return-type.c
warn-main.c
warn-missing-braces.c
warn-missing-prototypes.c
warn-missing-variable-declarations.c
warn-null.c
warn-outof-range-assign-enum.c
warn-overlap.c Teach -Wtautological-overlap-compare about enums 2015-10-01 18:47:52 +00:00
warn-self-assign-field.mm
warn-shadow-intrinsics.c
warn-shadow.c
warn-shift-negative.c
warn-sizeof-array-decay.c
warn-sizeof-arrayarg.c Make a test a bit shorter. No behavior change. 2015-09-24 01:34:27 +00:00
warn-string-conversion.c
warn-strlcpycat-size.c
warn-strncat-size.c
warn-tautological-compare.c
warn-thread-safety-analysis.c Thread Safety Analysis: fix before/after checks so that they work on global 2015-09-29 15:25:51 +00:00
warn-type-safety-mpi-hdf5.c
warn-type-safety.c
warn-type-safety.cpp
warn-unreachable.c
warn-unsequenced.c
warn-unused-function.c
warn-unused-label.c
warn-unused-parameters.c
warn-unused-value.c
warn-unused-variables-werror.c
warn-unused-variables.c
warn-variable-not-needed.c
warn-vla.c
warn-write-strings.c
wchar.c [PS4] Change the names of some "environmental" things to what our 2016-05-16 17:22:25 +00:00
weak-import-on-enum.c
x86-attr-force-align-arg-pointer.c
x86-builtin-palignr.c
x86_64-linux-android.c
xray-always-instrument-attr.c Add XRay flags to Clang. We implement two flags to control the XRay behaviour: 2016-07-13 22:32:15 +00:00
xray-always-instrument-attr.cpp Add XRay flags to Clang. We implement two flags to control the XRay behaviour: 2016-07-13 22:32:15 +00:00
zvector.c