- Jan 15, 2008
-
-
Chris Lattner authored
llvm-svn: 46000
-
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
-
-
Steve Naroff authored
Bug submitted by Eli. llvm-svn: 45976
-
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
-
Steve Naroff authored
Revert r45951, Chris says it violates the C99 spec. llvm-svn: 45961
-
Anders Carlsson authored
llvm-svn: 45954
-
Chris Lattner authored
proto and function type without proto. It would never call 'functionTypesAreCompatible' because they have different type classes. llvm-svn: 45952
-
Steve Naroff authored
Rewrite Expr::isNullPointerConstant() to deal with multiple levels of explicit casts. Now, isNullPointerConstant() will return true for the following: "(void*)(double*)0" llvm-svn: 45951
-
- 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
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
-
- Jan 10, 2008
-
-
Fariborz Jahanian authored
llvm-svn: 45839
-
Fariborz Jahanian authored
llvm-svn: 45836
-
Fariborz Jahanian authored
llvm-svn: 45834
-
Fariborz Jahanian authored
llvm-svn: 45794
-
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
-
Chris Lattner authored
This fixes a crash reported by Seo Sanghyeon llvm-svn: 45778
-
Fariborz Jahanian authored
llvm-svn: 45777
-
Fariborz Jahanian authored
llvm-svn: 45776
-
Fariborz Jahanian authored
llvm-svn: 45769
-
Fariborz Jahanian authored
llvm-svn: 45767
-
Steve Naroff authored
Teach Expr::isConstantExpr() about CompoundLiterals. llvm-svn: 45764
-
- Jan 08, 2008
-
-
Fariborz Jahanian authored
llvm-svn: 45760
-
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
-
-
Chris Lattner authored
incorrectly apply the multiple include optimization to files with guards like: #if !defined(x) MACRO where MACRO could expand to different things in different contexts. Thanks Neil! llvm-svn: 45716
-
Fariborz Jahanian authored
objc object type. llvm-svn: 45709
-
Fariborz Jahanian authored
llvm-svn: 45708
-
- Jan 04, 2008
-
-
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: 45559
-
- Jan 03, 2008
-
-
Chris Lattner authored
llvm-svn: 45556
-
Fariborz Jahanian authored
llvm-svn: 45542
-
Chris Lattner authored
llvm-svn: 45530
-