Commit Graph

23 Commits

Author SHA1 Message Date
Steve Naroff 43bafa78b3 Remove BlockStmtExpr.
Block literals are now represented by the concrete BlockExpr class.
This is cleanup (removes a FIXME).
No functionality change.

llvm-svn: 56288
2008-09-17 18:37:59 +00:00
Steve Naroff 7a147c6a3c Remove support for BlockExprExpr. For example...
^(expression) or ^(int arg1, float arg2)(expression)
...is no longer supported. 
All block literals now require a compound statement.

llvm-svn: 56257
2008-09-16 23:11:46 +00:00
Ted Kremenek 2d470fc0ba Patch by Csaba Hruska!
"Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch
covers the AST library, but ignores Analysis lib."

llvm-svn: 56185
2008-09-13 05:16:45 +00:00
Argyrios Kyrtzidis aa479138ea Add new 'CXXConditionDeclExpr' expression node used for a 'condition' declaration, e.g: "if (int x=0) {...}".
It is a subclass of DeclRefExpr and the main difference is that CXXConditionDeclExpr owns the declaration that it references.

llvm-svn: 56033
2008-09-09 23:47:53 +00:00
Steve Naroff c540d66940 Add semantic analysis for "blocks".
Highlights...

- 4 new AST nodes, BlockExpr, BlockStmtExpr, BlockExprExpr, BlockDeclRefExpr.
- Sema::ActOnBlockStart(), ActOnBlockError(), ActOnBlockStmtExpr(), ActOnBlockExprExpr(), ActOnBlockReturnStmt().

Next steps...

- hack Sema::ActOnIdentifierExpr() to deal with block decl refs.
- add attribute handler for byref decls.
- add test cases.

llvm-svn: 55710
2008-09-03 18:15:37 +00:00
Argyrios Kyrtzidis 857fcc2f8e Add support for C++'s "type-specifier ( expression-list )" expression:
-The Parser calls a new "ActOnCXXTypeConstructExpr" action.
-Sema, depending on the type and expressions number:
   -If the type is a class, it will treat it as a class constructor. [TODO]
   -If there's only one expression (i.e. "int(0.5)" ), creates a new "CXXFunctionalCastExpr" Expr node
   -If there are no expressions (i.e "int()" ), creates a new "CXXZeroInitValueExpr" Expr node.

llvm-svn: 55177
2008-08-22 15:38:55 +00:00
Argyrios Kyrtzidis 3bab3d21f9 Add ExplicitCastExpr to replace the current CastExpr, and have ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr):
Expr
  -> CastExpr
     -> ExplicitCastExpr
     -> ImplicitCastExpr 

llvm-svn: 54955
2008-08-18 23:01:59 +00:00
Daniel Dunbar 56fdb6ae69 More #include cleaning
- Kill unnecessary #includes in .cpp files. This is an automatic
   sweep so some things removed are actually used, but happen to be
   included by a previous header. I tried to get rid of the obvious
   examples and this was the easiest way to trim the #includes in one
   fell swoop.
 - We now return to regularly scheduled development.

llvm-svn: 54632
2008-08-11 06:23:49 +00:00
Steve Naroff 0d7c6dbae8 Cleanup ObjCSuperRefExpr (remove last usage and AST node:-).
llvm-svn: 54617
2008-08-10 19:10:41 +00:00
Chris Lattner 6307f19726 rename PreDefinedExpr -> PredefinedExpr
llvm-svn: 54605
2008-08-10 01:53:14 +00:00
Chris Lattner 574dee6cac change more instances of QualType::getCanonicalType to call
ASTContext::getCanonicalType instead (PR2189)

llvm-svn: 54105
2008-07-26 22:17:49 +00:00
Chris Lattner a9b3cae8fd Switch 'super' from being a weird cast thing to being a predefined expr node.
Patch by David Chisnall with objc rewriter and stmtdumper updates from me.

llvm-svn: 52580
2008-06-21 18:04:54 +00:00
Chris Lattner a5678ccd4a capture whether a CharacterLiteral was wide or not in the AST.
Patch by Mike Stump!

llvm-svn: 52081
2008-06-07 22:35:38 +00:00
Chris Lattner a0173131fa Fix ast dumping to work with long double literals, e.g. we dump:
long double X() { return 1.0L; }

as:

long double X()
(CompoundStmt 0xb06a00 <t.c:2:17, col:32>
  (ReturnStmt 0xb068d0 <col:19, col:26>
    (FloatingLiteral 0xb02cf0 <col:26> 'long double' 1.000000)))

llvm-svn: 52080
2008-06-07 22:13:43 +00:00
Steve Naroff ebf4cb4841 Fix <rdar://problem/5979875> clang on xcode: error: use of undeclared identifier 'super'
llvm-svn: 51888
2008-06-02 23:03:37 +00:00
Steve Naroff ec94403018 Add basic support for properties references (a missing feature).
While it is far from complete, it does fix the following <rdar://problem/5967199> clang on xcode: error: member reference is not to a structure or union

llvm-svn: 51719
2008-05-30 00:40:33 +00:00
Steve Naroff 021ca18bb5 - Move ObjC Expresssion AST's from Expr.h => ExprObjC.h
- #include ExprObjC.h in many places

llvm-svn: 51703
2008-05-29 21:12:08 +00:00
Eli Friedman a1b4ed8003 Implementation of __builtin_shufflevector, a portable builtin capable of
expressing the full flexibility of the LLVM shufflevector instruction.  
The expected immediate usage is in *mmintrin.h, so that they don't 
depend on the mess of gcc-inherited (and not completely implemented)
shuffle builtins.

llvm-svn: 51113
2008-05-14 19:38:39 +00:00
Ted Kremenek a06e7120bb Bug fix in StmtPrinter to handle pretty-printing ObjCMessageExprs involving variadic methods (also did some cosmetic cleanups in the printing output).
llvm-svn: 50583
2008-05-02 17:32:38 +00:00
Nate Begeman ce4d7fce6b OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris.
llvm-svn: 49942
2008-04-18 23:10:10 +00:00
Ted Kremenek b65a67d7b6 Remove uses of "Selector&" and "const Selector&", since Selector is just an
immutable smart pointer (we don't need to pass references, just pass Selector).

llvm-svn: 49773
2008-04-16 04:30:16 +00:00
Chris Lattner aa9c7aed0f Add support for C++ default arguments, and rework Parse-Sema
interaction for function parameters, fixing PR2046.

Patch by Doug Gregor!

llvm-svn: 49369
2008-04-08 04:40:51 +00:00
Chris Lattner 7a51313d8a Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it.  This follows the main
llvm tree, and allows the libraries to be built in parallel.  The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in.  This speeds
up parallel builds, particularly incremental ones.

llvm-svn: 48402
2008-03-15 23:59:48 +00:00