llvm-project/clang/test/Sema
Douglas Gregor 739ef0c183 C99 DR #316 implies that the function parameter types that are known
only from a function definition (that does not have a prototype) are
only used to determine the compatible with other declarations of that
same function. In particular, when referencing the function we pretend
as if it does not have a prototype. Implement this behavior, which
fixes PR3626.

llvm-svn: 65460
2009-02-25 16:33:18 +00:00
..
128bitint.c Initial implementation of arbitrary fixed-width integer types. 2009-02-13 02:31:07 +00:00
PR2727.c Fix isIntegerConstantExpr eval of __builtin_offsetof to return result 2008-08-28 18:42:20 +00:00
PR2728.c Fix isIntegerConstantExpr eval of __builtin_offsetof to return result 2008-08-28 18:42:20 +00:00
PR2919-builtin-types-compat-strips-crv.c add missing RUN lines 2008-11-26 15:50:12 +00:00
PR2923.c Fix missing %s in run string causing hang during tests. 2008-10-29 19:29:09 +00:00
PR2963-enum-constant.c Use VerifyIntegerConstantExpression instead of isIntegerConstantExpr. Fixes PR2963 2008-12-05 16:33:57 +00:00
address-constant.c PR1963: Address of function is a constant expression 2008-04-04 09:45:30 +00:00
address_spaces.c testcase that works now with r62061 2009-01-12 00:08:58 +00:00
align-x86.c Fix for PR3433: map __alignof__ to preferred alignment. (This was 2009-02-22 03:31:23 +00:00
annotate.c add a test case 2008-02-21 19:44:16 +00:00
anonymous-struct-union.c fix rdar://6611778, a redefinition of an interface was causing an 2009-02-23 22:00:08 +00:00
arg-duplicate.c C99 DR #316 implies that the function parameter types that are known 2009-02-25 16:33:18 +00:00
arg-scope-c99.c Add support for C++ default arguments, and rework Parse-Sema 2008-04-08 04:40:51 +00:00
arg-scope.c Add support for C++ default arguments, and rework Parse-Sema 2008-04-08 04:40:51 +00:00
array-constraint.c GNU allows structs with flexible array members to be placed inside 2009-02-10 21:49:46 +00:00
array-declared-as-incorrect-type.c Make all the 'redefinition' diagnostics more consistent, and make the 2008-11-23 23:12:31 +00:00
array-init.c Downgrade the "excess elements in initializer" errors to warnings *in 2009-02-18 22:23:55 +00:00
asm.c If an input constraint refers to an output constraint, it should have the same constraint info as the output constraint. Fixes PR3417 2009-01-27 20:38:24 +00:00
assign-null.c Move the null pointer constant check from Sema::CheckSingleInitializer/ActOnCallExpr/CheckMessageArgumentTypes/ActOnReturnStmt to Sema::CheckSingleAssignmentConstraints. This makes sure all null pointer assignments are considered compatible. 2007-11-27 17:58:44 +00:00
assign.c Fix <rdar://problem/5733511> clang doesn't emit error for const array. 2008-02-09 16:59:44 +00:00
ast-print.c Fix a bug handling typedefs of functions, patch by Nuno Lopes! 2007-12-06 17:20:20 +00:00
attr-aligned.c Fix for PR3433: map __alignof__ to preferred alignment. (This was 2009-02-22 03:31:23 +00:00
attr-cleanup.c Improve Sema of the cleanup attribute somewhat. 2009-02-07 23:16:50 +00:00
attr-deprecated.c diagnose uses of deprecated typenames and tags. 2009-02-16 22:07:16 +00:00
attr-mode.c Make ProcessDeclAttributes walk the declarator structure pulling 2008-06-29 00:16:31 +00:00
attr-nodebug.c Add sema support for the nodebug attribute. 2009-02-13 06:46:13 +00:00
attr-noinline.c Add sema support for the noinline attribute. 2009-02-19 19:16:48 +00:00
attr-noreturn.c Improve attribute parsing & tests. 2008-10-19 02:04:16 +00:00
attr-unused.c Improve attribute parsing & tests. 2008-10-19 02:04:16 +00:00
attr-used.c Warn about attribute used ignored on "extern int a 2009-02-13 22:48:56 +00:00
attr-warn_unused_result.c Several related changes: 2009-02-14 07:37:35 +00:00
bitfield-layout.c Cleanup/refactoring of Sema struct layout. This patch unifies the struct 2008-05-30 09:31:38 +00:00
bitfield.c Implement rdar://6138816 - [sema] named bitfields cannot have 0 width 2008-12-12 04:56:04 +00:00
block-args.c instead of forcing blocks on by default, make them default to off, but let 2008-12-04 23:20:07 +00:00
block-as-object.m instead of forcing blocks on by default, make them default to off, but let 2008-12-04 23:20:07 +00:00
block-byref-args.c instead of forcing blocks on by default, make them default to off, but let 2008-12-04 23:20:07 +00:00
block-call.c Fix <rdar://problem/6418623> Bogus block type compatibility warning. 2008-12-10 17:49:55 +00:00
block-explicit-return-type.c Add support for blocks with explicit return types. 2009-02-04 22:31:32 +00:00
block-literal.c instead of forcing blocks on by default, make them default to off, but let 2008-12-04 23:20:07 +00:00
block-misc.c Fixup expected errors. 2009-02-08 07:59:54 +00:00
block-return.c Extend builtin "attribute" syntax to include a notation for 2009-02-14 00:32:47 +00:00
block-storageclass.c instead of forcing blocks on by default, make them default to off, but let 2008-12-04 23:20:07 +00:00
block-syntax-error.c Add support for blocks with explicit return types. 2009-02-04 22:31:32 +00:00
builtin-object-size.c Append the test runs with '&&'. 2008-10-05 00:08:56 +00:00
builtin-prefetch.c Switch several more Sema Diag methods over. This simplifies the 2008-11-19 05:08:23 +00:00
builtin-stackaddress.c Fix typo in test. 2008-05-20 08:27:04 +00:00
builtins.c merge some simple call diagnostics. 2008-11-21 18:44:24 +00:00
c89-2.c -C mode doesn't return comments on "#" lines, so the diag checker doesn't pick them up. 2007-08-30 06:38:49 +00:00
c89.c Clean up the C89/C++ warnings about C99 array features to not 2008-12-18 06:50:14 +00:00
callingconv.c Add new test 2008-03-07 20:04:49 +00:00
carbon.c Re-enable PTH testing for Cocoa.h and Carbon.h (and include testing for Objective-C++). 2009-01-09 00:41:48 +00:00
cast-to-union.c add support for initializing static vars with a cast to union (gcc extension) 2009-01-15 16:44:45 +00:00
cast.c casting to void is ok for structs (C99 6.5.4p2), this fixes 2007-10-29 04:26:44 +00:00
check-increment.c Make sure Sema::CheckIncrementDecrementOperand() removes typedefs when doing it's analysis. 2007-11-11 14:15:57 +00:00
compare.c Be a bit stricter about array type compatibility. 2008-02-06 04:53:22 +00:00
complex-int.c Use VerifyIntegerConstantExpression for case values. 2008-12-01 02:13:02 +00:00
complex-promotion.c Add another complex promotion test. 2008-12-10 23:57:51 +00:00
compound-literal.c Centralize error reporting of improper uses of incomplete types in the 2009-01-19 19:26:10 +00:00
conditional-expr.c Fix <rdar://problem/5928590> clang -fsyntax-only: "incompatible operand types ('int' and 'void')" on input that 'gcc -fsyntax-only' eats 2008-05-12 21:44:38 +00:00
conditional.c fix type of ?: operator. If one of the operator is void, the type should be void as well. 2008-06-04 19:14:12 +00:00
const-eval.c Evaluation of unary deref could call integer evaluator on non-integral 2009-02-21 18:14:20 +00:00
const-ptr-int-ptr-cast.c Throw the switch to exclusively use Evaluate (along with the small 2009-02-22 06:45:27 +00:00
constant-builtins-2.c Teach tryEvaluate that fabs, copysign, and unary +/- are constants for 2008-10-16 03:51:50 +00:00
constant-builtins.c Make Sema::CheckForConstantInitializer use Expr::Evaluate. This fixes PR3130. 2008-12-05 05:09:56 +00:00
constructor-attribute.c Support __attribute__(({con,de}structor)) in Parse & Sema 2008-07-31 22:40:48 +00:00
darwin-align-cast.c Put back my temporary hack until Eli addresses this in a more complete fashion. 2008-06-03 22:06:04 +00:00
decl-invalid.c Diagnose declarations that don't declare anything, and fix PR3020. 2008-12-28 15:28:59 +00:00
decl-type-merging.c Fix for PR2100: merge types for variables. 2009-01-24 23:49:55 +00:00
declspec.c Fix a long standard problem with clang retaining "too much" sugar 2009-02-19 23:45:49 +00:00
default.c rename -parse-ast-print to -ast-print 2007-10-11 00:18:28 +00:00
default1.c Add support for C++ default arguments, and rework Parse-Sema 2008-04-08 04:40:51 +00:00
deref.c Tweak fix for http://llvm.org/bugs/show_bug.cgi?id=2000 to work across typedefs. 2008-02-18 15:14:59 +00:00
designated-initializers.c Downgrade the "excess elements in initializer" errors to warnings *in 2009-02-18 22:23:55 +00:00
dllimport-dllexport.c Several related changes: 2009-02-14 07:37:35 +00:00
enum.c Centralize error reporting of improper uses of incomplete types in the 2009-01-19 19:26:10 +00:00
expr-address-of.c Don't allow taking the address of an element in an ext_vector 2009-02-15 22:45:20 +00:00
expr-comma-c89.c c89 does not perform array -> pointer promotion unless the array is an lvalue. This 2008-07-25 21:33:13 +00:00
expr-comma.c c89 does not perform array -> pointer promotion unless the array is an lvalue. This 2008-07-25 21:33:13 +00:00
exprs.c Fix a long standard problem with clang retaining "too much" sugar 2009-02-19 23:45:49 +00:00
ext_vector_components.c enhance ExtVectorElementExpr to allow V->xxyy to work like (*V).xxyy 2009-02-16 21:11:58 +00:00
flexible-array-init.c Downgrade the "excess elements in initializer" errors to warnings *in 2009-02-18 22:23:55 +00:00
floating-point-compare.c Fixed test case to not expect a warning when one should not be emitted. 2007-11-29 01:03:21 +00:00
for.c rename -parse-ast-print to -ast-print 2007-10-11 00:18:28 +00:00
format-attribute.c Add attribute "format" support for typedefs of function pointers. 2008-05-09 17:36:24 +00:00
format-strings.c use the full spelling of a string literal token so that trigraphs 2009-02-18 18:34:12 +00:00
function-ptr.c give better diagnostics for converting between function pointer and void*. 2008-01-03 22:56:36 +00:00
function-redecl.c When we're declaring an object or function with linkage, teach name 2009-02-24 20:03:32 +00:00
function.c Improve merging of function declarations. Specifically: 2009-02-24 01:23:02 +00:00
i-c-e.c Implement the final (hopefully) wrinkle to i-c-e + builtin_constant_p 2008-12-12 18:00:51 +00:00
if-empty-body.c improve error recovery handling broken 'then' or 'else' stmts in 2007-10-29 05:08:52 +00:00
illegal-types.c Make sure Sema::GetTypeForDeclarator() deals with abstract declarators when diagnosing incorrect code. 2008-01-14 23:33:18 +00:00
implicit-builtin-decl.c Fix test on platforms where size_t != unsigned long. 2009-02-18 00:52:29 +00:00
implicit-builtin-freestanding.c Add a test case for -ffreestanding that redefines malloc. 2009-02-14 21:06:05 +00:00
implicit-builtin-redecl.c Make error-message check platform-agnostic 2009-02-19 00:03:13 +00:00
implicit-cast.c Fix a bug in Sema::CheckConditionalOperands(). When mixing pointers and null pointer constants, we need to promote the null pointer constant (which is an integer) to the pointer type. Test case is self explanatory. 2007-10-18 05:13:08 +00:00
implicit-decl.c Merge function-return.c into function.c 2008-12-18 02:01:17 +00:00
implicit-def.c rename -parse-ast-print to -ast-print 2007-10-11 00:18:28 +00:00
implicit-int.c Unspecified type specs default to int. This fixes a crash 2007-07-13 21:02:29 +00:00
incomplete-decl.c Make one expected-diag directive match exactly one actual diagnostic. 2009-02-07 19:52:04 +00:00
init-struct-qualified.c For struct initialization, check compatibility with the unqualified 2008-06-09 03:52:40 +00:00
init.c A few small improvements to Evaluate for stuff I noted in FIXMEs. 2009-02-23 04:23:56 +00:00
int-arith-convert.c int-arith-convert.c makes assumptions about integer sizes, so force a specific architecture 2008-12-02 16:34:01 +00:00
invalid-decl.c Fix PR3031 by silencing follow-on errors in invalid declarations. 2008-11-11 06:13:16 +00:00
invalid-init-diag.c Suppress constant initializer checking when the declaration isn't valid. 2009-02-20 01:34:21 +00:00
invalid-struct-init.c make the 'to match this' diagnostic a note. 2008-11-23 23:17:07 +00:00
knr-def-call.c C99 DR #316 implies that the function parameter types that are known 2009-02-25 16:33:18 +00:00
member-reference.c Unify the code for defining tags in C and C++, so that we always 2009-01-08 20:45:30 +00:00
merge-decls.c testcase for rdar://6096412 which already works. 2009-02-11 06:22:30 +00:00
ms-fuzzy-asm.c Use getLogicalLineNumber() in FuzzyParseMicrosoftAsmStatement(), it's more general and simplifies the code. 2008-02-08 18:01:27 +00:00
nested-redef.c Improve merging of function declarations. Specifically: 2009-02-24 01:23:02 +00:00
nonnull.c Tidy up sema processing of attribute "nonull": 2008-09-01 19:57:52 +00:00
offsetof.c Simplify test. 2008-12-06 22:27:22 +00:00
overloadable-complex.c Add test for overloading with _Complex in C 2009-02-12 00:57:03 +00:00
overloadable.c Downgrade complaints about calling unavailable functions to a warning 2009-02-18 21:56:37 +00:00
pointer-addition.c Make one expected-diag directive match exactly one actual diagnostic. 2009-02-07 19:52:04 +00:00
pointer-subtract-compat.c Allow subtraction of function pointer types in C, as a GNU extension. Fixes rdar://problem/6520707 2009-01-23 19:03:35 +00:00
pragma-pack-2.c Implement #pragma pack use in structure packing. The general approach 2008-10-16 02:34:03 +00:00
pragma-pack.c Exercise #pragma pack(pop, <width>) in test case. 2008-10-17 16:05:47 +00:00
predef.c fix rdar://6097892 - gcc incompat: clang rejects __func__, __FUNCTION__, and __PRETTY_FUNCTION__ outside func 2008-12-12 05:05:20 +00:00
predefined-function.c Adopt a more principled approach to invalid declarations: 2009-02-16 17:45:42 +00:00
rdar6248119.m Enter a new scope for a @try block. 2008-09-26 17:32:47 +00:00
rdr6094103-unordered-compare-promote.c Arguments to unordered comparison builtins may need implicit casts. 2009-02-19 19:28:43 +00:00
recover-goto.c Fix a bug recovering from broken code with a goto that Eli reported. 2008-01-25 00:01:10 +00:00
redefinition.c Handle any undeclared parameters in a K&R-style function with a 2009-01-23 16:23:13 +00:00
self-comparison.c Added to test case for "self-comparison check" uses of relation operators: x < x and x > x 2007-10-29 17:02:56 +00:00
sentinel-attribute.c Add parsing of the sentinel attribute. Still need to create the attribute. 2008-10-05 18:05:59 +00:00
shift.c Don't do integer promotions of LHS for compound shift assignment. The LHS has to be a modifiable lvalue. 2007-12-13 07:28:16 +00:00
static-init.c Throw the switch to exclusively use Evaluate (along with the small 2009-02-22 06:45:27 +00:00
stdcall-fastcall.c Complete the test after adding handling of merged attributes on decls. 2008-12-26 00:52:17 +00:00
stmt_exprs.c Correct test; sorry for any inconvenience. 2009-01-24 23:44:26 +00:00
struct-cast.c Use the unqualified type for GCCs struct/union cast extension 2009-01-13 17:00:51 +00:00
struct-compat.c Make all the 'redefinition' diagnostics more consistent, and make the 2008-11-23 23:12:31 +00:00
struct-decl.c Sanity fix for PR3642: if we're treating a diagnostic as an error, it's 2009-02-22 00:20:44 +00:00
struct-packed-align.c __attribute__((aligned)) was being ignored! 2009-02-18 20:06:09 +00:00
switch.c Use VerifyIntegerConstantExpression for case values. 2008-12-01 02:13:02 +00:00
tentative-decls.c Adopt a more principled approach to invalid declarations: 2009-02-16 17:45:42 +00:00
text-diag.c fix crash when printing diagnostics with tokens that span through more than one line 2008-08-05 19:40:20 +00:00
transparent-union-pointer.c An extremely hacky version of transparent_union support; it isn't 2008-09-02 05:19:23 +00:00
type-spec-struct-union.c Properly set the scope of non-fields declared within a struct, union, 2009-01-12 18:45:55 +00:00
typecheck-binop.c Change a whole lot of diagnostics to take QualType's directly 2008-11-24 06:25:27 +00:00
typedef-prototype.c implement test/Sema/typedef-prototype.c, allowing code 2007-11-14 06:34:38 +00:00
typedef-redef.c Adopt a more principled approach to invalid declarations: 2009-02-16 17:45:42 +00:00
typedef-retain.c Fix typo noticed by Chris. 2009-01-30 23:26:40 +00:00
typedef-variable-type.c Always try to fold array sizes, and warn if we could fold something that isn't an ICE. This makes us compatible with GCC. 2009-02-20 18:53:20 +00:00
types.c Fix a long standard problem with clang retaining "too much" sugar 2009-02-19 23:45:49 +00:00
unnamed-bitfield-init.c Make sure to count the struct elements correctly; here, we want the 2008-08-09 23:45:45 +00:00
unused-expr.c add support for -fno-math-errno, and validate that it affects sema properly. 2009-02-17 00:35:09 +00:00
usual-float.c Fix a basic bug (having to do with typedefs) in Sema::UsualArithmeticConversions(). 2007-11-10 19:45:54 +00:00
va_arg_x86_64.c Fix a regression from my fix to PR2631. Fixes PR2692. 2008-08-20 22:17:17 +00:00
var-redecl.c When we're declaring an object or function with linkage, teach name 2009-02-24 20:03:32 +00:00
varargs.c Fix va_arg bug noticed by Eli, __builtin_va_arg is not an l-value 2009-02-12 09:21:08 +00:00
vector-assign.c Turn on -flax-vector-conversions by default, issue a warning whenever one is done. Add a -fnolax-vector-conversions option. Fixes PR2862. 2009-01-30 23:17:46 +00:00
vector-cast.c Report errors for invalid casts from/to vectors. 2007-11-27 05:51:55 +00:00
vector-init.c Downgrade the "excess elements in initializer" errors to warnings *in 2009-02-18 22:23:55 +00:00
vla.c Extend the implicit declaration and checking against out-of-scope 2009-02-24 19:23:27 +00:00
void_arg.c Patch for PR2350; the issue was tnat we were allowing (with an error) 2008-05-22 08:54:03 +00:00
warn-freestanding-complex.c Add a test case for -ffreestanding that redefines malloc. 2009-02-14 21:06:05 +00:00
wchar_size.c Get the type right for wide string literals; it's wchar_t, not char. 2008-05-27 07:57:14 +00:00