summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclGroup.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other ↵Eugene Zelenko2017-11-101-2/+4
| | | | | | minor fixes (NFC). llvm-svn: 317854
* Retire llvm::alignOf in favor of C++11 alignof.Benjamin Kramer2016-10-201-1/+1
| | | | | | No functionality change intended. llvm-svn: 284730
* [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 llvm-svn: 275882
* [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. llvm-svn: 256585
* 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). llvm-svn: 233911
* 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. llvm-svn: 169237
* I lied. Kill off a few more Destroy methodsDouglas Gregor2010-07-251-6/+0
| | | | llvm-svn: 109379
* 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>. llvm-svn: 91990
* 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. llvm-svn: 69828
* 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. llvm-svn: 68002
* Cleanups for DeclGroup.Chris Lattner2009-03-281-8/+5
| | | | llvm-svn: 67922
* 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. llvm-svn: 64474
* 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 llvm-svn: 63153
* 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. llvm-svn: 63135
* Fix incorrect release of Decl* array referenced by DeclGroup.Ted Kremenek2008-10-181-1/+1
| | | | | | Patch by Timo Sirainen! llvm-svn: 57772
* Add const_iterator to DeclGroup.Ted Kremenek2008-10-071-9/+12
| | | | | | Serialization for OwningDeclGroupRefs now works. llvm-svn: 57272
* Added prototype serialization code for DeclGroup.Ted Kremenek2008-10-061-0/+62
| | | | llvm-svn: 57222
* 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. llvm-svn: 57213
* Delete trailing white space. It's over 80 columns.Zhongxing Xu2008-09-271-1/+1
| | | | llvm-svn: 56749
* 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. llvm-svn: 56708
* Added prototype implementation of the DeclGroup, DeclGroupRef, and ↵Ted Kremenek2008-09-251-0/+59
DeclGroupOwningRef classes. Documentation and testing are pending. llvm-svn: 56611
OpenPOWER on IntegriCloud