Chris Lattner
f61c8a805d
Handle C99 6.7.5.3p10, fixing test/Parser/attributes.c
...
llvm-svn: 39256
2007-01-21 19:04:43 +00:00
Chris Lattner
c5cdf4d092
Next big step in function parsing: create decl objects for parameters,
...
inserting them into the function body scope and registering them with the
corresponding FunctionDecl.
llvm-svn: 39253
2007-01-21 07:42:07 +00:00
Chris Lattner
2114d5e948
add some comments
...
llvm-svn: 39242
2006-12-04 07:40:24 +00:00
Chris Lattner
5c5fbccc96
Scrutinize K&R parameter declarations. This implements C99 6.9.1p6, correctly
...
diagnosing malformed K&R function definitions.
llvm-svn: 39241
2006-12-03 08:41:30 +00:00
Chris Lattner
cbc426d4f7
Next step of retaining information about function prototypes: actually retain
...
the info. Also, call Actions.ParseParamDeclaratorType instead of
Actions.ParseDeclarator for parameter type lists: we don't want declaration
objects created when parsing a function declarator, we just want type info.
llvm-svn: 39230
2006-12-02 06:43:02 +00:00
Chris Lattner
edc9e39d88
First step towards accurately retaining information about function
...
parameters: build an array of ParamInfo structures and pass it to the
declarator for safe keeping (it owns the list).
Next step: actually populate the arg array with useful stuff.
llvm-svn: 39229
2006-12-02 06:21:46 +00:00
Chris Lattner
b20e89449f
capture sourcelocation info for type specifiers. This improves diagnostics
...
for things like 'short _Complex'.
llvm-svn: 39227
2006-11-28 05:30:29 +00:00
Chris Lattner
353f5740b1
Finish converting DeclSpec to use accessors.
...
llvm-svn: 39223
2006-11-28 04:50:12 +00:00
Chris Lattner
740b2f30c7
When a decl is popped from its current scope, link it to the decl chain for
...
the containing function. This avoids leaking decls.
llvm-svn: 39197
2006-11-21 01:32:20 +00:00
Chris Lattner
229ce60fc9
split the ParseFunctionDefinition action into two actions, one which is
...
called before and one which is called after function definition parsing.
llvm-svn: 39196
2006-11-21 01:21:07 +00:00
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
0d8b1a1eff
remember and pretty-print cast types
...
llvm-svn: 39191
2006-11-20 04:34:45 +00:00
Chris Lattner
2ebe4bb64d
when a typedef name is parsed as part of declspecs, remember the decl for the
...
typedef.
llvm-svn: 39188
2006-11-20 01:29:42 +00:00
Chris Lattner
5ca17df626
decls should all have types
...
llvm-svn: 39187
2006-11-19 23:32:49 +00:00
Chris Lattner
591a675b1c
remove #include of clang/Parse/DeclSpec.h from clang/AST/Decl.h
...
llvm-svn: 39186
2006-11-19 23:16:18 +00:00
Chris Lattner
da8aa7b3a8
implement RTTI for Decl objects, eliminate some hokey virtual methods.
...
llvm-svn: 39185
2006-11-19 23:12:30 +00:00
Chris Lattner
200bdc3b90
add an action method for declspecs without declarators, like "struct foo;".
...
llvm-svn: 39184
2006-11-19 02:43:37 +00:00
Chris Lattner
302b4be4c2
build TypedefDecl objects when parsing typedefs.
...
Add a parsing fastpath for when we see typedef at the top-level.
llvm-svn: 39182
2006-11-19 02:31:38 +00:00
Chris Lattner
b571a5cbdc
implement conversion of simple declspec base types, and implement TypeRef::dump
...
llvm-svn: 39170
2006-11-11 23:56:48 +00:00
Chris Lattner
f84a79c4e9
restructure code to build the framework for creating types from declarators.
...
llvm-svn: 39166
2006-11-11 22:59:23 +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
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