- Jan 16, 2008
-
-
Steve Naroff authored
Sema::MergeFunctionDecl()...make sure diagnostic is accurate (wrt function declarations/definitions). Patch by Carl Lewis! llvm-svn: 46070
-
- Jan 15, 2008
-
-
Steve Naroff authored
Finish up handling all permutations of "complex int" (in 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
-
Steve Naroff authored
- Change Type::isComplexType() to exlude GCC's complex integer extension. In 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
-
Steve Naroff authored
Rework commit r45976, which was incorrect. - 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
-
Steve Naroff authored
Make sure Sema::GetTypeForDeclarator() deals with abstract declarators when diagnosing incorrect code. Bug submitted by Eli. llvm-svn: 45989
-
- Jan 14, 2008
-
-
Chris Lattner authored
llvm-svn: 45977
-
Steve Naroff authored
Fix crasher when redefining functions. Not 100% pleased with this solution, but it is clearly an improvement. Will discuss with Chris later. llvm-svn: 45975
-
Steve Naroff authored
Record if a compound literal expression is @ file scope. This allows us to 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
-
- Jan 13, 2008
-
-
Steve Naroff authored
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
-
- Jan 12, 2008
-
-
Chris Lattner authored
llvm-svn: 45915
-
Chris Lattner authored
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
-
Chris Lattner authored
Eli Friedman! llvm-svn: 45906
-
Chris Lattner authored
extern "C" in C++ mode. Patch by Mike Stump! llvm-svn: 45904
-
- Jan 10, 2008
-
-
Steve Naroff authored
- Teach Expr::isConstantExpr() about InitListExpr's (and offsetof, since I 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
-
Fariborz Jahanian authored
llvm-svn: 45839
-
Fariborz Jahanian authored
llvm-svn: 45793
-
Steve Naroff authored
Fix Sema::ActOnDeclarator() to call MergeFunctionDecl for function decls 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
-
- Jan 09, 2008
-
-
Steve Naroff authored
Fix ASTContext::typesAreCompatible to allow for int/enum compatibility (C99 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
-
Steve Naroff authored
Teach Sema::ActOnCompoundLiteral about constraint C99 6.5.2.5p3. llvm-svn: 45782
-
- Jan 08, 2008
-
-
Steve Naroff authored
Fix Sema::CheckConditionalOperands(). The null pointer constant checks need to precede the check for two pointer operands. llvm-svn: 45732
-
- Jan 07, 2008
-
-
Ted Kremenek authored
some naming inconsistencies in the names of classes pertaining to Objective-C support in clang. llvm-svn: 45715
-
Fariborz Jahanian authored
objc object type. llvm-svn: 45709
-
Fariborz Jahanian authored
llvm-svn: 45708
-
Chris Lattner authored
llvm-svn: 45706
-
- Jan 06, 2008
-
-
Chris Lattner authored
llvm-svn: 45666
-
Chris Lattner authored
llvm-svn: 45665
-
Chris Lattner authored
pretty print the type name for void. llvm-svn: 45664
-
- Jan 05, 2008
-
-
Fariborz Jahanian authored
in a foreach-statement which is illegal (but not yet caught) . llvm-svn: 45615
-
Fariborz Jahanian authored
llvm-svn: 45604
-
Chris Lattner authored
llvm-svn: 45602
-
Chris Lattner authored
it explicitly for vectors. This allows us to unnest some code. llvm-svn: 45600
-
Chris Lattner authored
stripping down to canonical types early. llvm-svn: 45599
-
- Jan 04, 2008
-
-
Chris Lattner authored
llvm-svn: 45597
-
Chris Lattner authored
llvm-svn: 45591
-
Chris Lattner authored
it from several places. This merges the diagnostics, making them more uniform and fewer in number. This also simplifies and cleans up the code. Some highlights: 1. This removes a bunch of very-similar diagnostics. 2. This renames AssignmentCheckResult -> AssignConvertType 3. This merges PointerFromInt + IntFromPointer which were always treated the same. 4. This updates a bunch of test cases that have minor changes to the produced diagnostics. llvm-svn: 45589
-
Fariborz Jahanian authored
llvm-svn: 45561
-
Chris Lattner authored
llvm-svn: 45560
-
Chris Lattner authored
llvm-svn: 45558
-
- Jan 03, 2008
-
-
Chris Lattner authored
llvm-svn: 45556
-
Fariborz Jahanian authored
llvm-svn: 45546
-