Chris Lattner
ac18be9ad2
Add support for C90 implicitly defined functions, e.g.:
...
int A() {
return X();
}
llvm-svn: 39194
2006-11-20 06:49:47 +00:00
Chris Lattner
cb6a382b67
introduce a new ASTContext class to hold long-lived ast nodes.
...
llvm-svn: 39161
2006-11-10 06:20:45 +00:00
Chris Lattner
e168f76c2d
move the rest of the expr sema to SemaExpr.cpp and the decl processing stuff
...
to SemaDecl.cpp
llvm-svn: 39159
2006-11-10 05:29:30 +00:00
Chris Lattner
eaafe122b6
move semantic analysis of break/continue out of the parser into the sema class.
...
llvm-svn: 39157
2006-11-10 05:17:58 +00:00
Chris Lattner
af8d581230
move semantic analysis of statements to it's own file.
...
llvm-svn: 39156
2006-11-10 05:07:45 +00:00
Chris Lattner
5b183d882b
split semantic analysis of expressions out to its own file
...
llvm-svn: 39155
2006-11-10 05:03:26 +00:00
Chris Lattner
ddd6fc84cf
move ASTBuilder.h/cpp to be a private Sema.h/cpp files, not part of the
...
interface exported by libast.
llvm-svn: 39154
2006-11-10 04:58:55 +00:00
Chris Lattner
cc67ec1743
rename ASTBuilder to Sema
...
llvm-svn: 39153
2006-11-09 06:54:47 +00:00
Chris Lattner
697e5d692b
Change courses on how we do semantic analysis. Semantic analysis
...
fundamentally requires having an AST around, so move all sema to the
AST library. This is the first step, later steps will be needed to
clean up libast.
llvm-svn: 39150
2006-11-09 06:32:27 +00:00
Chris Lattner
16976d3e83
build ast nodes and print goto/goto*/break/continue.
...
llvm-svn: 39121
2006-11-05 01:46:01 +00:00
Chris Lattner
6c0ff13761
Add ast node support for case/default/label stmts.
...
llvm-svn: 39120
2006-11-05 00:19:50 +00:00
Chris Lattner
f2174b633b
implement AST node for switch stmt
...
llvm-svn: 39119
2006-11-04 20:59:27 +00:00
Chris Lattner
85ed873bdc
implement ast nodes for while and do loops
...
llvm-svn: 39116
2006-11-04 20:40:44 +00:00
Chris Lattner
71e23ce2e1
Add AST node, AST building, actions, and printing for 'for' stmts.
...
llvm-svn: 39113
2006-11-04 20:18:38 +00:00
Chris Lattner
72b7d39d78
remove full locinfo AST nodes for now. They just clutter the implementation
...
and should be implemented with an ASTBuilder subclass anyway.
llvm-svn: 39107
2006-11-04 06:37:16 +00:00
Chris Lattner
7cee11f078
Export the ASTBuilder class from the AST module.
...
llvm-svn: 39095
2006-11-03 06:42:29 +00:00
Chris Lattner
2abeb12df6
Fix building after the pure virtual function name changed.
...
llvm-svn: 39075
2006-10-28 19:51:26 +00:00
Chris Lattner
5f84a0648d
add ast node for ifstmt
...
llvm-svn: 39051
2006-10-25 05:55:20 +00:00
Chris Lattner
c52b118676
Handle __extension__ as a unary operator if requested.
...
llvm-svn: 39050
2006-10-25 05:45:55 +00:00
Chris Lattner
0535ebb3bd
only add to LastInGroupList if at the top-level.
...
llvm-svn: 39049
2006-10-25 05:28:22 +00:00
Chris Lattner
6d9a685d75
Make the driver print function bodies at -parse-print-ast
...
llvm-svn: 39048
2006-10-25 05:11:20 +00:00
Chris Lattner
e5cca06829
Make AST nodes for ReturnStmt's and CompoundStmts
...
llvm-svn: 39046
2006-10-25 04:29:46 +00:00
Chris Lattner
f42cce7a8e
Add new Stmt class
...
llvm-svn: 39045
2006-10-25 04:09:21 +00:00
Chris Lattner
ae31969ad2
Finish removing LexerToken from actions interface
...
llvm-svn: 39044
2006-10-25 03:49:28 +00:00
Chris Lattner
0ba3dc4ec3
Start removing LexerToken from the actions interface.
...
llvm-svn: 39043
2006-10-25 03:38:23 +00:00
Chris Lattner
ae986d5ac7
Remove temporary code
...
llvm-svn: 38999
2006-10-17 02:54:07 +00:00
Chris Lattner
30f910e88e
implement action callbacks for almost all the stmts.
...
llvm-svn: 38993
2006-10-16 05:52:41 +00:00
Chris Lattner
2dacc3ff2e
Changes through out the parser and actions/ast interface to return top-level
...
declarations through the asm streamer. For a testcase like:
int G;
int H, I, *J;
int func() {}
'clang -parse-print-ast' prints:
Read top-level decl: G
Read top-level decl: H
Read top-level decl: I
Read top-level decl: J
Read top-level decl: func
llvm-svn: 38992
2006-10-16 00:33:54 +00:00
Chris Lattner
a11999d83a
start creating proper ast nodes for variables and functions
...
llvm-svn: 38991
2006-10-15 22:34:45 +00:00
Chris Lattner
94b4ce3eae
don't abort
...
llvm-svn: 38965
2006-10-06 05:51:35 +00:00
Chris Lattner
d3e9895b9a
Initial support for semantic analysis and AST building for StringExpr nodes.
...
llvm-svn: 38960
2006-10-06 05:22:26 +00:00
Chris Lattner
26da7302ce
Build AST's for sizeof/alignof with type operands.
...
llvm-svn: 38951
2006-08-24 06:49:19 +00:00
Chris Lattner
e550a4ea12
Build CastExpr AST nodes
...
llvm-svn: 38950
2006-08-24 06:37:51 +00:00
Chris Lattner
26115acb1c
Build AST's for sizeof/alignof an expr.
...
llvm-svn: 38949
2006-08-24 06:10:04 +00:00
Chris Lattner
6f3a117f81
switch MemberExpr to holding a field decl instead of a raw identifier.
...
llvm-svn: 38948
2006-08-24 05:19:28 +00:00
Chris Lattner
98286a4551
Allow expression actions to fail
...
llvm-svn: 38947
2006-08-24 05:02:11 +00:00
Chris Lattner
879b9ad083
Add initial support for simple-primary exprs, including DeclExprs.
...
llvm-svn: 38944
2006-08-24 04:53:44 +00:00
Chris Lattner
e165d944c2
Add AST nodes for array, call, . and ->.
...
llvm-svn: 38943
2006-08-24 04:40:38 +00:00
Chris Lattner
1b92649857
Add AST nodes and actions for paren exprs and simple unary ops.
...
llvm-svn: 38940
2006-08-23 06:42:10 +00:00
Chris Lattner
9b6d4cb90e
Add (basic) expression AST representation capabilities for int/fp/binops/condexpr.
...
Add callbacks for same.
Add "full locinfo" mode.
llvm-svn: 38939
2006-08-23 05:17:46 +00:00
Chris Lattner
c11438cee1
Implement first cut of ASTBuilder class.
...
llvm-svn: 38938
2006-08-18 05:17:52 +00:00
Chris Lattner
3e7bd4ed44
Start adding support for printing out parser callbacks and adding ast building
...
llvm-svn: 38933
2006-08-17 05:51:27 +00:00