| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 46524
|
|
|
|
|
|
|
|
| |
qualifiers match. The comment and C99 citation for this routine were correct...the code needed to conform to the comment/spec. This fixes the test added below.
Tightening up this routine forced tweaks to Sema::CheckSubtractionOperands() and Sema::CheckCompareOperands(). For example, they both need to operate on the unqualified pointee...
llvm-svn: 46522
|
|
|
|
|
|
| |
doesn't get confused by typedefs.
llvm-svn: 46502
|
|
|
|
|
|
|
|
| |
makes sure function calls that don't have a prototype get the default function/array conversion.
Patch by Eli Friedman!
llvm-svn: 46489
|
|
|
|
| |
llvm-svn: 46464
|
|
|
|
|
|
|
| |
Test case included from bz1948 (thanks Neil!).
Also fixed an 80 column violation...
llvm-svn: 46430
|
|
|
|
| |
llvm-svn: 46371
|
|
|
|
| |
llvm-svn: 46358
|
|
|
|
|
|
|
|
|
|
| |
CheckForCharArrayInitializer with CheckInitializerListTypes. The new routine now supports struct/union initializers.
This is a modified version of a patch by Eli Friedman. This version passes all of the clang tests and supports vectors:-)
Note that Eli and I are still unsatisfied the implementation of CheckInitializerListTypes(). We'd like to find a more elegant implementation. Nevertheless, this is a complex part of the standard (and may be hard to simplify). Since the complexity is localized to this routine, we can iterate without too much disruption:-)
llvm-svn: 46339
|
|
|
|
| |
llvm-svn: 46336
|
|
|
|
| |
llvm-svn: 46328
|
|
|
|
|
|
| |
- Use previous hooks to simplify Sema::CheckInitializerTypes()...
llvm-svn: 46235
|
|
|
|
| |
llvm-svn: 46234
|
|
|
|
|
|
| |
a method.
llvm-svn: 46232
|
|
|
|
|
|
|
|
| |
when dealing with arrays.
Bug submitted by Eli.
llvm-svn: 46179
|
|
|
|
|
|
| |
tentative definitions with incomplete types. Touch up all test cases that are effected.
llvm-svn: 46152
|
|
|
|
| |
llvm-svn: 46141
|
|
|
|
| |
llvm-svn: 46134
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__builtin_overload takes 2 or more arguments:
0) a non-zero constant-expr for the number of arguments the overloaded
functions will take
1) the arguments to pass to the matching overloaded function
2) a list of functions to match.
The return type of __builtin_overload is inferred from the function whose args
match the types of the arguments passed to the builtin. For example:
float a;
float sinf(float);
int sini(int);
float b = __builtin_overload(1, a, sini, sinf);
Says that we are overloading functions that take one argument, and trying to
pass an argument of the same type as 'a'. sini() does not match since it takes
and argument of type int. sinf does match, so at codegen time this will turn
into float b = sinf(a);
llvm-svn: 46132
|
|
|
|
|
|
|
|
| |
method name
size in accordance with how rewriter synthesizes method name.
llvm-svn: 46131
|
|
|
|
|
|
|
| |
Refactored the use of this method into both the Sema module and Analysis module,
which were using their own static functions that did the same thing.
llvm-svn: 46129
|
|
|
|
|
|
|
|
| |
correctly,
when creating its type.
llvm-svn: 46109
|
|
|
|
|
|
|
|
|
|
| |
a method named ImpCastExprToType in Sema.
Use this method to insert implicit casts for case statements from their
operand type to the condition type of the switch. This fixes a crash on
test/CodeGen/statements.c, reported by Eli Friedman.
llvm-svn: 46083
|
|
|
|
|
|
| |
declarations/definitions). Patch by Carl Lewis!
llvm-svn: 46070
|
|
|
|
|
|
|
|
|
|
| |
Sema::UsualArithmeticConversions()).
A FIXME remains to verify the conversion rules are consistent with GCC.
Thanks to Eli for the new/improved test case...
llvm-svn: 46022
|
|
|
|
|
|
|
|
|
|
| |
general, we will keep the lowest level Type predicates "pure" (i.e. true to the C99 spec).
- Modify Sema::UsualArithmeticConversions() to work with the new definition of Type::isComplexType().
This is a nice cleanup and also fixes a bug submitted by Eli (which I've added to the test suite).
llvm-svn: 46005
|
|
|
|
|
|
|
|
| |
- Add Type::isComplexIntegerType(), Type::getAsComplexIntegerType().
- Don't inlude complex types with Type::isIntegerType(), which is too general.
- Use the new predicates in Sema::UsualArithmeticConversions() to recognize/convert the types.
llvm-svn: 45992
|
|
|
|
|
|
|
|
| |
diagnosing incorrect code.
Bug submitted by Eli.
llvm-svn: 45989
|
|
|
|
| |
llvm-svn: 45977
|
|
|
|
|
|
| |
but it is clearly an improvement. Will discuss with Chris later.
llvm-svn: 45975
|
|
|
|
|
|
|
|
| |
implement C99 6.5.2.5p6. This could have been done without modifying the AST (by checking the decl type and passing the info down to isContextExpr), however we concluded this is more desirable.
Bug/patch by Eli Friedman!
llvm-svn: 45966
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove diagnostics from Sema::CheckIndirectionOperand(). C89/C99 allow dereferencing an incomplete type. clang appears to be emulating some incorrect gcc behavior (see below).
void
foo (void)
{
struct b;
struct b* x = 0;
struct b* y = &*x; // gcc produces an error ("dereferencing pointer to incomplete type")
}
With this patch, the above is now allowed.
Bug/Patch by Eli Friedman!
llvm-svn: 45933
|
|
|
|
| |
llvm-svn: 45915
|
|
|
|
|
|
|
|
| |
of const char, and it should error if it occurs outside a function.
Is it valid in an objc method? If so we should handle that too.
llvm-svn: 45910
|
|
|
|
|
|
| |
Eli Friedman!
llvm-svn: 45906
|
|
|
|
|
|
| |
extern "C" in C++ mode. Patch by Mike Stump!
llvm-svn: 45904
|
|
|
|
|
|
|
|
|
|
| |
noticed it was missing).
- Rename CheckInitializer() to CheckInitializerTypes().
- Removed the isStatic argument to CheckInitializerTypes() and all of it's subroutines. Checking for constant expressions is now done separately.
- Added CheckForConstantInitializer().
llvm-svn: 45840
|
|
|
|
| |
llvm-svn: 45839
|
|
|
|
| |
llvm-svn: 45793
|
|
|
|
|
|
| |
that aren't in scope. Since C functions are in a flat namespace, we need to give them special treatment (when compared with variables and typedefs).
llvm-svn: 45789
|
|
|
|
|
|
|
|
| |
6.7.2.2p4).
Fix Sema::MergeFunctionDecl to allow for function type compatibility (by using the predicate on ASTContext). Function types don't have to be identical to be compatible...
llvm-svn: 45784
|
|
|
|
| |
llvm-svn: 45782
|
|
|
|
|
|
| |
to precede the check for two pointer operands.
llvm-svn: 45732
|
|
|
|
|
|
|
| |
some naming inconsistencies in the names of classes pertaining to Objective-C
support in clang.
llvm-svn: 45715
|
|
|
|
|
|
| |
objc object type.
llvm-svn: 45709
|
|
|
|
|
|
| |
header.
llvm-svn: 45708
|
|
|
|
| |
llvm-svn: 45706
|
|
|
|
| |
llvm-svn: 45666
|
|
|
|
| |
llvm-svn: 45665
|
|
|
|
|
|
| |
pretty print the type name for void.
llvm-svn: 45664
|