summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed Objective-C type encoding for bitfields for the GNU runtime to match ↵David Chisnall2010-06-041-36/+66
| | | | | | the encoding used by GCC. llvm-svn: 105451
* Fix 80-column.Fariborz Jahanian2010-05-271-1/+2
| | | | llvm-svn: 104847
* Objective-c++ IR gen.Fariborz Jahanian2010-05-271-0/+3
| | | | | | | | Flag synthesized struct decl. as non-empty so CXX side of ir gen does not skip its Null initialization. Fixes radar 8027844 for objc++'s collection statement. llvm-svn: 104837
* Move the relevant ASTContext member functions that deal with ↵Anders Carlsson2010-05-261-74/+0
| | | | | | ASTRecordLayoutBuilder into RecordLayoutBuilder.cpp. This matches the way we interact with other builder classes (CGRecordLayoutBuilder, VTableBuilder and VTTBuilder) and it also allows for making ASTRecordLayoutBuilder a private class without a header file. llvm-svn: 104671
* A type- or value-dependent expression cannot use bitfieldDouglas Gregor2010-05-241-0/+3
| | | | | | promotion. Fixes <rdar://problem/8020920>. llvm-svn: 104545
* Keep track of all of the class and function template's "common"Douglas Gregor2010-05-231-0/+10
| | | | | | | | pointers in the ASTContext, so that the folding sets stored inside them will be deallocated when the ASTContext is destroyed (under -disable-free). <rdar://problem/7998824>. llvm-svn: 104465
* Even though we don't unique VLA types, we still need to build aDouglas Gregor2010-05-231-2/+10
| | | | | | canonical type where the element type is canonical. Fixes PR7206. llvm-svn: 104461
* Support implicitly closing on 'this' in a block. Fixed PR7165.John McCall2010-05-201-13/+33
| | | | | | (the codegen works here, too, but that's annoying to test without execution) llvm-svn: 104202
* Adds support for ObjC++'s GC attribute on declaration ofFariborz Jahanian2010-05-191-0/+81
| | | | | | object variables and functions returning such objects. llvm-svn: 104168
* Teach the ObjC mangler to ignore member pointers just like gcc does.John McCall2010-05-171-0/+5
| | | | llvm-svn: 104001
* Teach ASTContext::getUnqualifiedArrayType() how to look throughDouglas Gregor2010-05-171-5/+14
| | | | | | | typedefs. As a drive-by, teach hit how to build VLA types, since those will eventually be supported in C++. llvm-svn: 103958
* Substantially alter the design of the Objective C type AST by introducingJohn McCall2010-05-151-101/+119
| | | | | | | | | | | | | | | | | | | | | ObjCObjectType, which is basically just a pair of one of {primitive-id, primitive-Class, user-defined @class} with a list of protocols. An ObjCObjectPointerType is therefore just a pointer which always points to one of these types (possibly sugared). ObjCInterfaceType is now just a kind of ObjCObjectType which happens to not carry any protocols. Alter a rather large number of use sites to use ObjCObjectType instead of ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather than hashing them in a FoldingSet. Remove some number of methods that are no longer used, at least after this patch. By simplifying ObjCObjectPointerType, we are now able to easily remove and apply pointers to Objective-C types, which is crucial for a certain kind of ObjC++ metaprogramming common in WebKit. llvm-svn: 103870
* Merged Elaborated and QualifiedName types.Abramo Bagnara2010-05-111-47/+18
| | | | llvm-svn: 103517
* Allocate most of DeclarationNamesTable using ASTContext's allcocator. The ↵Ted Kremenek2010-05-101-3/+0
| | | | | | | | only things that aren't allocated this way are the internal FoldingSets. llvm-svn: 103429
* Start converting pieces of DeclarationNameTable to be allocated using ↵Ted Kremenek2010-05-101-1/+6
| | | | | | | | | | ASTContext's allocator. While DeclarationNameTable doesn't leak, it uses 'malloc' too often. Start with having 'CXXLiteralOperatorNames' allocated using ASTContext's allocator and add a 'DoDestroy()' method to DeclarationNameTable that is called by ~ASTContext. llvm-svn: 103426
* Implement encoding of methods which have instantiatedFariborz Jahanian2010-05-071-0/+11
| | | | | | template arguments. llvm-svn: 103221
* When synthesizing Objective C records, give the synthetic fields publicJohn McCall2010-04-301-0/+8
| | | | | | | | access. Fixes an assertion. Fixes rdar://problem/7927811. Too lazy to reduce a test case. llvm-svn: 102776
* Revert "Fix for PR6953: per gcc, regparm and noreturn affect the ↵Daniel Dunbar2010-04-281-8/+13
| | | | | | compatibility of", it is breaking the builds of quite a few projects (emacs, dovecot, gnutar, bison). llvm-svn: 102501
* Fix for PR6953: per gcc, regparm and noreturn affect the compatibility ofEli Friedman2010-04-271-13/+8
| | | | | | | | | function types. This could potentially have unexpected side-effects, so look here if there are new regressions. llvm-svn: 102464
* More simplifications.Benjamin Kramer2010-04-271-17/+7
| | | | llvm-svn: 102447
* Move CollectIvarsToConstructOrDestruct to SemaFariborz Jahanian2010-04-271-49/+0
| | | | | | | from AST, consider ivar array of objects (per Doug's comment). llvm-svn: 102446
* Simplify some code. No change in functionality.Benjamin Kramer2010-04-271-18/+9
| | | | llvm-svn: 102445
* Make the InjectedClassNameType the canonical type of the current instantiationJohn McCall2010-04-271-12/+17
| | | | | | | | | | | | | | | | of a class template or class template partial specialization. That is to say, in template <class T> class A { ... }; or template <class T> class B<const T*> { ... }; make 'A<T>' and 'B<const T*>' sugar for the corresponding InjectedClassNameType when written inside the appropriate context. This allows us to track the current instantiation appropriately even inside AST routines. It also allows us to compute a DeclContext for a type much more efficiently, at some extra cost every time we write a template specialization (which can be optimized, but I've left it simple in this patch). llvm-svn: 102407
* New method to construct/destruct ivars that have non-trivial default Fariborz Jahanian2010-04-261-0/+49
| | | | | | constructors or destructors, not used yet. llvm-svn: 102403
* Turn CXXMethodVector into a generic class template.Anders Carlsson2010-04-231-49/+0
| | | | llvm-svn: 102208
* More work toward implementingFariborz Jahanian2010-04-231-0/+40
| | | | | | NeXt's -fno-constant-cfstrings - wip. llvm-svn: 102189
* When computing the alignof value for a vector type, ensure thatDan Gohman2010-04-211-1/+1
| | | | | | | the alignment is a power of 2, even in the esoteric case of a vector element which does not have a power-of-2 sizeof value. llvm-svn: 102036
* AST: Dump ASTRecordLayout objects when they are created with ↵Daniel Dunbar2010-04-191-0/+5
| | | | | | -fdump-record-layouts. llvm-svn: 101815
* Fix -Wcast-qual warnings.Dan Gohman2010-04-191-1/+2
| | | | llvm-svn: 101786
* Add encoding of reference types like gcc does for objc methods andFariborz Jahanian2010-04-131-3/+8
| | | | | | blocks. Fixes PR6468. llvm-svn: 101196
* Implement method type encoding in the presenseFariborz Jahanian2010-04-081-2/+2
| | | | | | of c-style arguments. Completes radar 7445205. llvm-svn: 100813
* Fix a misuse of iterators when iterating through block'sFariborz Jahanian2010-04-081-2/+2
| | | | | | parameters list for encoding. llvm-svn: 100788
* Put type restriction on convesion to nonconforming 'id' back in Fariborz Jahanian2010-04-061-3/+2
| | | | | | block pointer type comparison. llvm-svn: 100533
* Relax the typesafty rules of block pointers types whichFariborz Jahanian2010-04-011-2/+3
| | | | | | take'id' or return 'id' in their type. Fixes radar 7814131. llvm-svn: 100129
* Extend DependentNameType with a keyword enum that specifies whetherDouglas Gregor2010-03-311-14/+24
| | | | | | | this was parsed as a typename-specifier, elaborated-type-specifier (including the kind), or just a dependent qualified type name. llvm-svn: 100039
* Rename TypenameType to DependentNameType in anticipation of someDouglas Gregor2010-03-311-16/+16
| | | | | | refactoring work in this area. llvm-svn: 100019
* Remember the regparm attribute in FunctionType::ExtInfo.Rafael Espindola2010-03-301-7/+20
| | | | | | Fixes PR3782. llvm-svn: 99940
* the big refactoring bits of PR3782.Rafael Espindola2010-03-301-34/+43
| | | | | | | | This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute and fix the bug. llvm-svn: 99920
* Be a bit more consistent in using operator->Rafael Espindola2010-03-291-2/+2
| | | | | | | This patch moves some methods from QualType to Type and changes the users to use -> instead of . llvm-svn: 99805
* Implement a framework for the delay of arbitrary diagnostics withinJohn McCall2010-03-241-1/+2
| | | | | | | | | templates. So delay access-control diagnostics when (for example) the target of a friend declaration is a specific specialization of a template. I was surprised to find that this was required for an access-controlled selfhost. llvm-svn: 99383
* More clean up of ivars which are either in class extensions andFariborz Jahanian2010-03-221-27/+15
| | | | | | | | implementation or synthesized into an implementation. Also, fixes a code gen. bug when ivars are itroduced in interleaved implementations. (related to radar 7547942). llvm-svn: 99193
* Remove the capture, serialization, and deserialization of commentDouglas Gregor2010-03-191-197/+1
| | | | | | | | ranges as part of the ASTContext. This code is not and was never used, but contributes ~250k to the size of the Cocoa.h precompiled header. llvm-svn: 99007
* objective-c patch to provide type safty when blocks are passing orFariborz Jahanian2010-03-171-7/+59
| | | | | | | returning objc objects. There will be a corresponding objective-c++ patch soon. llvm-svn: 98696
* Let SourceManager::getBufferData return StringRef instead of a pair of two ↵Benjamin Kramer2010-03-161-2/+2
| | | | | | const char*. llvm-svn: 98630
* Give SourceManager a Diagnostic object with which to report errors,Douglas Gregor2010-03-161-10/+12
| | | | | | and start simplifying the interfaces in SourceManager that can fail. llvm-svn: 98594
* Introduce a new BufferResult class to act as the return type ofDouglas Gregor2010-03-151-9/+15
| | | | | | | | | | | | | | SourceManager's getBuffer() (and similar) operations. This abstract can be used to force callers to cope with errors in getBuffer(), such as missing files and changed files. Fix a bunch of callers to use the new interface. Add some very basic checks for file consistency (file size, modification time) into ContentCache::getBuffer(), although these checks don't help much until we've updated the main callers (e.g., SourceManager::getSpelling()). llvm-svn: 98585
* Check compatibility of vector types using their canonicalizations.John McCall2010-03-121-1/+2
| | | | | | | | | Fixes an assertion arising C overload analysis, but really I can't imagine that this wouldn't cause a thousand other uncaught failures. Fixes PR6600. llvm-svn: 98400
* Extend the builtin syntax to allow address-space qualifiers on pointers andJohn McCall2010-03-121-4/+15
| | | | | | references. Based on a patch by Arnaud de Grandmaison! llvm-svn: 98327
* For ivars created using @synthesize, set their DeclContext to beTed Kremenek2010-03-111-28/+4
| | | | | | | | | | | | the @implementation (instead of the @interface) and actually add the ivar to the DeclContext (which we weren't doing before). This allows us to simplify ASTContext::CollectNonClassIvars() by removing ASTContext::CollectProtocolSynthesizedIvars(). Now all ivars can be found by either inspecting the ObjCInterfaceDecl and its companion ObjCImplementationDecl. llvm-svn: 98280
* Allow the fast path through ASTContext::getTypeDeclType to be inlined.John McCall2010-03-101-18/+16
| | | | llvm-svn: 98138
OpenPOWER on IntegriCloud