- Aug 08, 2007
-
-
Steve Naroff authored
it is used by "tgmath.h" (so we need to support it). It might also come in handy when developing the overloaded function macros for OpenCU. Next check-in will make this an integer constant expression... llvm-svn: 40930
-
- Aug 05, 2007
-
-
Steve Naroff authored
Remove a space from "typeof" printing. It was causing the following error... [dylan:clang/test/Parser] admin% ../../../../Debug/bin/clang -parse-ast-check typeof.c Warnings expected but not seen: Line 21: incompatible types assigning 'typeof(*pi) const' to 'int *' Warnings seen but not expected: Line 21: incompatible types assigning 'typeof(*pi) const' to 'int *' Also corrected a typo from my previous commit. llvm-svn: 40832
-
- Aug 04, 2007
-
-
Chris Lattner authored
struct X { int A; }; void foo() { struct X s; int i; i = __builtin_choose_expr(0, s, i); } compiles to: %tmp = load i32* %i ; <i32> [#uses=1] store i32 %tmp, i32* %i wow :) llvm-svn: 40801
-
- Aug 03, 2007
-
-
Steve Naroff authored
Implement __builtin_choose_expr. llvm-svn: 40794
-
Chris Lattner authored
Rename AddrLabel and OCUVectorComponent -> AddrLabelExpr and OCUVectorElementExpr respectively. This is for consistency with other expr nodes end with *Expr. llvm-svn: 40785
-
Chris Lattner authored
llvm-svn: 40778
-
Chris Lattner authored
llvm-svn: 40768
-
Chris Lattner authored
llvm-svn: 40764
-
Chris Lattner authored
llvm-svn: 40763
-
- Aug 02, 2007
-
-
Chris Lattner authored
llvm-svn: 40760
-
Steve Naroff authored
Tweak to Expr::isIntegerConstantExpr...make sure the result is appropriately size for TypesCompatibleExpr's. llvm-svn: 40716
-
Steve Naroff authored
Hack Expr::isConstantExpr() to allow for __builtin_types_compatible_p. llvm-svn: 40705
-
Steve Naroff authored
- Finish hooking up support for __builtin_types_compatible_p(). - Fix type printing code for recently added TypeOfExpr/TypeOfType. llvm-svn: 40700
-
Steve Naroff authored
Add AST/Sema support for __builtin_types_compatible_p (a GNU extension). Todo...still need to call the action from the parser... llvm-svn: 40693
-
- Aug 01, 2007
-
-
Steve Naroff authored
Add comments to getTypeOfExpr/getTypeOfType. Also add instances of TypeOfExpr/TypeOfType to the Types vector (so we can keep track of them). llvm-svn: 40677
-
Steve Naroff authored
Two typeof() related changes... - Changed the name of ASTContext::getTypeOfType(Expr*)->getTypeOfExpr(). - Remove FIXME for TypeOfExpr::getAsStringInternal(). This will work fine for printing the AST. It isn't ideal for error diagnostics (since it's more natural to display the expressions type). One "random" (or at least delayed:-) change... - Changed all "ext_typecheck_*" diagnostics from EXTENSION->WARNING. Reason: Since -pedantic is now off (by default), these diagnostics were never being emitted (which is bad). With this change, clang will emit the warning all the time. The only downside (wrt GCC compatibility) is -pedantic-errors will not turn this diagnostics into errors (a "feature" of making tagging them with EXTENSION). When/if this becomes an issue, we can revisit. llvm-svn: 40676
-
Chris Lattner authored
llvm-svn: 40659
-
- Jul 31, 2007
-
-
Chris Lattner authored
llvm-svn: 40651
-
Chris Lattner authored
there is now an isXXXType and a getAsXXXType llvm-svn: 40646
-
Chris Lattner authored
llvm-svn: 40640
-
Chris Lattner authored
existing one to getAsPointerType() llvm-svn: 40639
-
Steve Naroff authored
Add parsing and AST support for GNU "typeof". Many small changes to lot's of files. Still some FIXME's, however the basic support is in place. llvm-svn: 40631
-
- Jul 30, 2007
-
-
Steve Naroff authored
llvm-svn: 40584
-
- Jul 29, 2007
-
-
Steve Naroff authored
Added a new expression, OCUVectorComponent. llvm-svn: 40577
-
- Jul 26, 2007
-
-
Steve Naroff authored
Add Type::isOCUVectorType(). Convert isFunctionType(), isStructureType(), and isUnionType() to the new API. llvm-svn: 40541
-
Steve Naroff authored
llvm-svn: 40509
-
Steve Naroff authored
Various improvements to Sema::ParseMemberReferenceExpr(). - Added source range support to Diag's. - Used the new type predicate API to remove dealing with the canonical type explicitly. - Added Type::isRecordType(). - Removed some casts. - Removed a const qualifier from RecordType::getDecl(). llvm-svn: 40508
-
- Jul 24, 2007
-
-
Steve Naroff authored
Fix Sema::ParseCallExpr()...it wasn't doing the default array/function promotions on it's argument types. This resulted in the following errors when compiling promote_types_in_proto.c test... [dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang test/Parser/promote_types_in_proto.c test/Parser/promote_types_in_proto.c:7:24: error: incompatible types passing 'char *[]' to function expecting 'char *const []' arrayPromotion(argv); ~~~~~~~~~~~~~~ ^~~~ test/Parser/promote_types_in_proto.c:8:27: error: incompatible types passing 'void (char *const [])' to function expecting 'void (char *const [])' functionPromotion(arrayPromotion); ~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~ 2 diagnostics generated. When fixing this, noticed that both ParseCallExpr() and ParseReturnStmt() were prematurely comparing types for equivalence. This is incorrect (since the expr. promotions haven't been done yet). To fix this, I moved the check "down" to Sema::CheckAssignmentConstraints(). I also converted Type::isArrayType() to the modern API (since I needed it). Still more Type predicates to convert. llvm-svn: 40475
-
Chris Lattner authored
This implements test/Sema/stmt_exprs.c llvm-svn: 40465
-
Chris Lattner authored
Patch by Neil Booth! llvm-svn: 40452
-
- Jul 22, 2007
-
-
Anders Carlsson authored
llvm-svn: 40388
-
- Jul 21, 2007
-
-
Steve Naroff authored
llvm-svn: 40375
-
Chris Lattner authored
llvm-svn: 40176
-
Anders Carlsson authored
llvm-svn: 40162
-
- Jul 20, 2007
-
-
Chris Lattner authored
llvm-svn: 40113
-
Chris Lattner authored
llvm-svn: 40110
-
Chris Lattner authored
llvm-svn: 40068
-
- Jul 19, 2007
-
-
Steve Naroff authored
We still need to do sematic analysis (and implement initializers), however this should complete the parsing & ast building for compound literals. llvm-svn: 40067
-
- Jul 18, 2007
-
-
Chris Lattner authored
llvm-svn: 40012
-
Chris Lattner authored
This allows us to compile this: struct abc { char A; double D; }; int foo() { return sizeof(struct abc); return __alignof__(struct abc); } Into: ret i32 16 ret i32 8 llvm-svn: 40010
-