summaryrefslogtreecommitdiff
path: root/lib/AST/DeclGroup.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other ↵Eugene Zelenko2017-11-101-2/+4
| | | | | | minor fixes (NFC). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317854 91177308-0d34-0410-b5e6-96231b3b80d8
* Retire llvm::alignOf in favor of C++11 alignof.Benjamin Kramer2016-10-201-1/+1
| | | | | | No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284730 91177308-0d34-0410-b5e6-96231b3b80d8
* [NFC] Header cleanupMehdi Amini2016-07-181-1/+0
| | | | | | | | | | Summary: Removed unused headers, replaced some headers with forward class declarations Patch by: Eugene <claprix@yandex.ru> Differential Revision: https://reviews.llvm.org/D20100 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275882 91177308-0d34-0410-b5e6-96231b3b80d8
* [TrailingObjects] Convert Decl* classes.James Y Knight2015-12-291-4/+3
| | | | | | | | Also remove now-redundant explicit alignment specification on some of the classes converted prior to TrailingObjects automatically ensuring proper alignment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256585 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace custom alignment enforcement with LLVM_ALIGNAS.Benjamin Kramer2015-04-021-0/+2
| | | | | | | | | | This isn't perfect as it still assumes sizeof(void*) == alignof(void*), but we can fix that when compiler support gets better. Shrinks some Stmts that happen to inherit from Stmt and have a SourceLocation as the first member (64 bit archs only). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233911 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-1/+1
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
* I lied. Kill off a few more Destroy methodsDouglas Gregor2010-07-251-6/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109379 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 'DeclStmt::DoDestroy()' which doesn't actually recurse over its child ↵Ted Kremenek2009-12-231-0/+1
| | | | | | expressions (via StmtIterator), as those expressions are owned by the Decls and Types (which are destroyed elsewhere). This fixes a crasher reported in <rdar://problem/7487294>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91990 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the serialization code that predates precompiledDouglas Gregor2009-04-221-37/+0
| | | | | | | | headers. Future approaches to (de-)serializing ASTs will be based on the PCH infrastructure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69828 91177308-0d34-0410-b5e6-96231b3b80d8
* Push DeclGroup much farther throughout the compiler. Now the variousChris Lattner2009-03-291-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | productions (except the already broken ObjC cases like @class X,Y;) in the parser that can produce more than one Decl return a DeclGroup instead of a Decl, etc. This allows elimination of the Decl::NextDeclarator field, and exposes various clients that should look at all decls in a group, but which were only looking at one (such as the dumper, printer, etc). These have been fixed. Still TODO: 1) there are some FIXME's in the code about potentially using DeclGroup for better location info. 2) ParseObjCAtDirectives should return a DeclGroup due to @class etc. 3) I'm not sure what is going on with StmtIterator.cpp, or if it can be radically simplified now. 4) I put a truly horrible hack in ParseTemplate.cpp. I plan to bring up #3/4 on the mailing list, but don't plan to tackle #1/2 in the short term. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68002 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanups for DeclGroup.Chris Lattner2009-03-281-8/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67922 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove DeclGroupOwningRef, since we intend for declarations to be ownedDouglas Gregor2009-02-131-49/+2
| | | | | | | | | | | | | | | | | by DeclContexts (always) rather than by statements. DeclContext currently goes out of its way to avoid destroying any Decls that might be owned by a DeclGroupOwningRef. However, in an error-recovery situation, a failure in a declaration statement can cause all of the decls in a DeclGroupOwningRef to be destroyed after they've already be added into the DeclContext. Hence, DeclContext is left with already-destroyed declarations, and bad things happen. This problem was causing failures that showed up as assertions on x86 Linux in test/Parser/objc-forcollection-neg-2.m. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64474 91177308-0d34-0410-b5e6-96231b3b80d8
* Finish making AST BumpPtrAllocation runtime configurable (based on ↵Steve Naroff2009-01-271-2/+2
| | | | | | | | | | | | -disable-free). snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m 0.179u 0.051s 0:00.23 95.6% 0+0k 0+0io 0pf+0w snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m -disable-free 0.169u 0.052s 0:00.22 95.4% 0+0k 0+0io 0pf+0w git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63153 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove many references to ASTContext::getAllocator(), replacing them with ↵Steve Naroff2009-01-271-1/+1
| | | | | | | | | calls to the recently added placement new (which uses ASTContext's allocator for memory). Also added ASTContext::Deallocate(). This will simplify runtime replacement of ASTContext's allocator. Keeping the allocator private (and removing getAllocator() entirely) is also goodness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63135 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix incorrect release of Decl* array referenced by DeclGroup.Ted Kremenek2008-10-181-1/+1
| | | | | | | Patch by Timo Sirainen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57772 91177308-0d34-0410-b5e6-96231b3b80d8
* Add const_iterator to DeclGroup.Ted Kremenek2008-10-071-9/+12
| | | | | | | Serialization for OwningDeclGroupRefs now works. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57272 91177308-0d34-0410-b5e6-96231b3b80d8
* Added prototype serialization code for DeclGroup.Ted Kremenek2008-10-061-0/+62
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57222 91177308-0d34-0410-b5e6-96231b3b80d8
* Modified DeclGroupRef to always load/store the internal pointer value as ↵Ted Kremenek2008-10-061-6/+7
| | | | | | Decl*. This hopefully will obviate any concerns with violating strict type-aliasing issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57213 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete trailing white space. It's over 80 columns.Zhongxing Xu2008-09-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56749 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a union instead of a bunch of magic casts to implement a variant. This ↵Ted Kremenek2008-09-261-5/+5
| | | | | | removes the type-punning errors for DeclGroup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56708 91177308-0d34-0410-b5e6-96231b3b80d8
* Added prototype implementation of the DeclGroup, DeclGroupRef, and ↵Ted Kremenek2008-09-251-0/+59
DeclGroupOwningRef classes. Documentation and testing are pending. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56611 91177308-0d34-0410-b5e6-96231b3b80d8