| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Patch by David Chisnall!
llvm-svn: 52422
|
| |
|
|
| |
llvm-svn: 52375
|
| |
|
|
|
|
|
| |
-ScopedDecls get chained to their DeclContext.
-DeclContext's DeclChain replaces FunctionDecl's DeclChain and EnumDecl's ElementList.
llvm-svn: 52164
|
| |
|
|
|
|
|
|
|
| |
Added TagKind enum.
Added getTagKind() method.
Added convenience methods: isEnum(), isStruct(), isUnion(), isClass().
-RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one.
llvm-svn: 52160
|
| |
|
|
| |
llvm-svn: 52155
|
| |
|
|
| |
llvm-svn: 51936
|
| |
|
|
|
|
| |
this plugs the leak of attributes and also fixes a crash in the test
llvm-svn: 51862
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
encountered. Mixing up the decls is unintuitive, and confuses the AST
destruction code. Fixes PR2360.
Note that there is a need to look up the characteristics and
declarations of a function associated with a particular name or decl,
but the original swapping code doesn't solve it properly.
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-May/001644.html is one
suggestion for how to fix that.
llvm-svn: 51584
|
| |
|
|
| |
llvm-svn: 51544
|
| |
|
|
| |
llvm-svn: 51463
|
| |
|
|
|
|
| |
initializers of EnumConstantDecls.
llvm-svn: 51299
|
| |
|
|
|
|
|
|
| |
Fixed a bug in ParmVarDecl::param_end(): Handle the case where there are no
ParmVarDecls for a FunctionDecl, but its function prototype has formal arguments
(can happen with typedefs).
llvm-svn: 51297
|
| |
|
|
| |
llvm-svn: 51288
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Sema::ParseAST now constructs a TranslationUnit object to own the top-level Decls, which releases the top-level Decls upon exiting ParseAST.
2) Bug fix: TranslationUnit::~TranslationUnit handles the case where a Decl is added more than once as a top-level Decl.
3) Decl::Destroy is now a virtual method, obviating the need for a special dispatch based on DeclKind.
3) FunctionDecl::Destroy now releases its Body using its Destroy method.
4) Added Stmt::Destroy and Stmt::DestroyChildren, which recursively delete the child ASTs of a Stmt and call their dstors. We may need to special case dstor/Destroy methods for particular Stmt subclasses that own other dynamically allocated objects besides AST nodes.
5) REGRESSION: We temporarily are not deallocating attributes; a FIXME is provided.
llvm-svn: 51286
|
| |
|
|
|
|
|
| |
Fix 'swapping' of attributes to not insert null values into the
DeclAttrs map.
llvm-svn: 50612
|
| |
|
|
|
|
|
|
|
| |
-NamespaceDecl for the AST
-Checks for name clashes between namespaces and tag/normal declarations.
This commit doesn't implement proper name lookup for namespaces.
llvm-svn: 50321
|
| |
|
|
|
|
|
|
|
|
|
| |
DeclContext *CtxDecl -> DeclContext *DeclCtx
DeclContext *CD -> DeclContext *DC
It makes the code more consistent."
Patch by Zhongxing Xu!
llvm-svn: 50105
|
| |
|
|
| |
llvm-svn: 50021
|
| |
|
|
|
|
|
|
| |
-Added TranslationUnitDecl class to serve as top declaration context
-ASTContext gets a TUDecl member and a getTranslationUnitDecl() function
-All ScopedDecls get the TUDecl as DeclContext when declared at global scope
llvm-svn: 49855
|
| |
|
|
| |
llvm-svn: 49821
|
| |
|
|
|
|
|
|
| |
VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl().
This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it).
llvm-svn: 49748
|
| |
|
|
|
|
| |
Kirtzidis!
llvm-svn: 49603
|
| |
|
|
|
|
| |
Doug Gregor!
llvm-svn: 49598
|
| |
|
|
| |
llvm-svn: 49547
|
| |
|
|
| |
llvm-svn: 49532
|
| |
|
|
|
|
| |
argument handling. I'll fix up the c89 (void) thing next.
llvm-svn: 49459
|
| |
|
|
|
|
| |
the pattern of the other Decl classes.
llvm-svn: 49399
|
| |
|
|
|
|
|
|
| |
interaction for function parameters, fixing PR2046.
Patch by Doug Gregor!
llvm-svn: 49369
|
| |
|
|
| |
llvm-svn: 49294
|
| |
|
|
|
|
|
|
|
|
| |
-Renamed ContextDecl -> DeclContext
-Removed DeclContext pointer from FieldDecl
-EnumDecl inherits from DeclContext, instead of TagDecl
Patch by Argiris Kirtzidis!
llvm-svn: 49261
|
| |
|
|
|
|
|
| |
#1: To be consistent with FieldDecl::getContextDecl(), which serves the same purpose.
#2: From my perspective, getContext() is too general (and used by several other classes for different purposes).
llvm-svn: 49224
|
| |
|
|
|
|
|
|
|
|
|
| |
-Added ContextDecl (no TranslationUnitDecl)
-ScopedDecl class has a ContextDecl member
-FieldDecl class has a ContextDecl member, so that a Field or a ObjCIvar can be traced back to their RecordDecl/ObjCInterfaceDecl easily
-FunctionDecl, ObjCMethodDecl, TagDecl, ObjCInterfaceDecl inherit from ContextDecl. With TagDecl as ContextDecl, enum constants have a EnumDecl as their context.
-Moved Decl class to a "DeclBase.h" along with ContextDecl class
-CurContext is handled by Sema
llvm-svn: 49208
|
| |
|
|
| |
llvm-svn: 49135
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(to inherit from NamedDecl, instead of ScopedDecl).
- Added a DenseMap to associate an IdentifierInfo with the ObjCCompatibleAliasDecl.
- Renamed LookupScopedDecl->LookupDecl and changed it's return type to Decl. Also added lookup for ObjCCompatibleAliasDecl's.
- Removed Sema::LookupInterfaceDecl(). Converted clients to used LookupDecl().
- Some minor indentation changes.
Will deal with ObjCInterfaceDecl and getObjCInterfaceDecl() in a separate commit...
llvm-svn: 49058
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix objc ivar lookup. Ivar lookup should occur between lookup
of method-local values and lookup of globals. Emulate this with
some logic in the handling of Sema::ActOnIdentifierExpr.
Two todo's left:
1) sema shouldn't turn a bare reference to an ivar into "self->ivar"
in the AST. This is a hack.
2) The new ScopedDecl::isDefinedOutsideFunctionOrMethod method does
not correctly handle typedefs and enum constants yet.
llvm-svn: 48972
|
| |
|
|
| |
llvm-svn: 48404
|
| |
|
|
|
|
| |
allocation through ASTContext.
llvm-svn: 48403
|
|
|
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
|