summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
* Add a CXXDestroyExpr. Add classof member functions to CXXTempVarDecl.Anders Carlsson2009-04-212-0/+18
| | | | llvm-svn: 69654
* Add the beginnings of a CXXTempVarDecl class.Anders Carlsson2009-04-211-0/+7
| | | | llvm-svn: 69652
* Kill ASTContext::[gs]etFieldForDecl, instead we just lookup thingsDaniel Dunbar2009-04-211-10/+0
| | | | | | | | when we need them -- which is exactly what some code was already doing! - No intended functionality change. llvm-svn: 69648
* Assert on a few conditions that (I believe) should holdDaniel Dunbar2009-04-211-0/+2
| | | | | | | w.r.t. ASTContext::[gs]etFieldDecl, and the Field argument to EmitObjCValueForIvar). llvm-svn: 69639
* Add pch reader/writer support for ObjCMethodDecl.Steve Naroff2009-04-201-5/+5
| | | | | | Test will be enabled with ObjCInterfaceDecl is added. llvm-svn: 69594
* Make FieldDecl parameter to getObjCEncodingForType... const.Daniel Dunbar2009-04-201-4/+4
| | | | llvm-svn: 69578
* Remove non-const form of lookupFieldDeclForIvar.Daniel Dunbar2009-04-201-3/+4
| | | | llvm-svn: 69563
* Add location info for indirect goto.Chris Lattner2009-04-191-1/+1
| | | | llvm-svn: 69497
* Lazy deserialization of function bodies for PCH files. For the CarbonDouglas Gregor2009-04-181-5/+6
| | | | | | | | | | "Hello, World!", this takes us from deserializing 6469 statements/expressions down to deserializing 1 statement/expression. It only translated into a 1% improvement on the Carbon-prefixed 403.gcc, but (a) it's the right thing to do, and (b) we expect this to matter more once we lazily deserialize identifiers. llvm-svn: 69407
* FunctionDecl::getBody() is getting an ASTContext argument for use inDouglas Gregor2009-04-183-6/+20
| | | | | | | | lazy PCH deserialization. Propagate that argument wherever it needs to be. No functionality change, except that I've tightened up a few PCH tests in preparation. llvm-svn: 69406
* Fix two embarrassing PCH bugs:Douglas Gregor2009-04-171-1/+1
| | | | | | | | | 1) Accidentally used delete [] on an array of statements that was allocated with ASTContext's allocator 2) Deserialization of names with multiple declarations (e.g., a struct and a function) used the wrong mangling constant, causing it to view declaration IDs as Decl*s. 403.gcc builds and links properly. llvm-svn: 69390
* PCH support for inline assembly statements.Douglas Gregor2009-04-171-0/+20
| | | | | | | This completes support for all of C (+ extensions). We can (again) build a PCH file for Carbon.h. llvm-svn: 69385
* Implement lvalue test for conditional expressions.Sebastian Redl2009-04-171-0/+26
| | | | | | Add a few commented lines to the test case that point out things that don't work yet. llvm-svn: 69354
* Add support for the __has_trivial_destructor type trait.Anders Carlsson2009-04-172-2/+6
| | | | llvm-svn: 69345
* PCH support for the first batch of statements, including null,Douglas Gregor2009-04-171-0/+8
| | | | | | compound, case, default, if, switch, and break statements. llvm-svn: 69329
* Fix <rdar://problem/6765383> clang-6: clang does not appear to support ↵Steve Naroff2009-04-162-0/+12
| | | | | | declaring a static Block 'const'. llvm-svn: 69306
* PCH support for InitListExpr, DesignatedInitExpr, and ImplicitValueInitExpr.Douglas Gregor2009-04-161-0/+18
| | | | llvm-svn: 69251
* Add support for the __has_trivial_constructor type trait.Anders Carlsson2009-04-162-0/+10
| | | | llvm-svn: 69245
* PCH support for ShuffleVectorExpr and BlockDeclRefExprDouglas Gregor2009-04-161-0/+9
| | | | llvm-svn: 69244
* PCH support for ExtVectorElementExpr and VAArgExpr.Douglas Gregor2009-04-151-3/+3
| | | | llvm-svn: 69240
* Fix decl type merges when they haveFariborz Jahanian2009-04-151-3/+3
| | | | | | __string/__weak attributes. llvm-svn: 69229
* PCH support for MemberExpr and CallExpr.Douglas Gregor2009-04-151-0/+5
| | | | llvm-svn: 69186
* PCH support for string literalsDouglas Gregor2009-04-151-0/+21
| | | | llvm-svn: 69172
* Implement support for designated initializers that refer to members ofDouglas Gregor2009-04-151-18/+48
| | | | | | anonymous structs or unions. Fixes PR3778. llvm-svn: 69153
* Improve "assignment to cast" diagnostic.Daniel Dunbar2009-04-151-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Strip off extra parens when looking for casts. - Change the location info to point at the cast (instead of the assignment). For example, on int *b; #define a ((void*) b) void f0() { a = 10; } we now emit: /tmp/t.c:4:3: error: assignment to cast is illegal, lvalue casts are not supported a = 10; ^ ~ /tmp/t.c:2:12: note: instantiated from: #define a ((void*) b) ~^~~~~~~~~~ instead of: /tmp/t.c:4:5: error: expression is not assignable a = 10; ~ ^ llvm-svn: 69114
* Strip paren expressions when trying to diagnose "cast as lvalue"Daniel Dunbar2009-04-141-1/+1
| | | | | | extension. llvm-svn: 69100
* ASTContext::mergeTypes(): Loosen up the type checking for 'Class' (treating ↵Steve Naroff2009-04-141-5/+5
| | | | | | | | | | | | | | it like 'id'). This fixes <rdar://problem/6782722> XCDataTipsManager.m registers, observes notifications in class methods. The radar above is the result of clang typing 'self' in a class method as 'Class', which results in some spurious warnings (GCC types 'self' in a class method as 'id'). I considered changing the type of 'self' to 'id' (to conform to GCC), however this resulted in *many* test cases breaking. In addition, I really prefer a more strongly typed 'self'. All in all, this is the least obtrusive fix I could find for removing the spurious warnings (though we do loose some valid warnings). llvm-svn: 69041
* Audit __private_extern__ handling.Daniel Dunbar2009-04-142-17/+6
| | | | | | | | | | | | | | - Exposed quite a few Sema issues and a CodeGen crash. - See FIXMEs in test case, and in SemaDecl.cpp (PR3983). I'm skeptical that __private_extern__ should actually be a storage class value. I think that __private_extern__ basically amounts to extern A __attribute__((visibility("hidden"))) and would be better off handled (a) as that, or (b) with an extra bit in the VarDecl. llvm-svn: 69020
* Add VarDecl::getStorageClassSpecifierString (StorageClass -> const char*).Daniel Dunbar2009-04-141-0/+14
| | | | | | - No functionality change. llvm-svn: 69019
* Change dyn_cast<> to isa<>. Pointed out by Anders (thanks).Steve Naroff2009-04-141-1/+1
| | | | llvm-svn: 69007
* Fix crasher in ASTContext::getObjCEncodingForMethodDecl().Steve Naroff2009-04-141-5/+7
| | | | | | This was exposed as a result of something else that was recently fixed. llvm-svn: 69004
* fix PR3932: [ObjC]Type defined as 'id' is not recognized as a valid object type.Chris Lattner2009-04-121-11/+18
| | | | | | by making ASTContext::isObjCObjectPointerType accept typedefs of id. llvm-svn: 68931
* Non-pointer objects are none gc'able regardles ofFariborz Jahanian2009-04-111-0/+4
| | | | | | the attribute set on them. llvm-svn: 68844
* Various minor fixes to PCH reading and writing, with generalDouglas Gregor2009-04-101-0/+7
| | | | | | | cleanup. Aside from a minor tweak to the PCH file format, no functionality change. llvm-svn: 68793
* Use correct alignment and size for references in records as well.Anders Carlsson2009-04-101-0/+4
| | | | llvm-svn: 68769
* Add Expr::EvaluateAsLValue which will (believe it or not) try to evaluate an ↵Anders Carlsson2009-04-101-0/+6
| | | | | | Expr as an LValue. llvm-svn: 68763
* Fix thinko noticed by Chris.Anders Carlsson2009-04-101-1/+1
| | | | llvm-svn: 68762
* Use the same alignment for reference declarations as for pointer declarations.Anders Carlsson2009-04-101-2/+5
| | | | llvm-svn: 68761
* Implementation of pre-compiled headers (PCH) based on lazyDouglas Gregor2009-04-092-1/+129
| | | | | | | | | | | | | | | | | | | de-serialization of abstract syntax trees. PCH support serializes the contents of the abstract syntax tree (AST) to a bitstream. When the PCH file is read, declarations are serialized as-needed. For example, a declaration of a variable "x" will be deserialized only when its VarDecl can be found by a client, e.g., based on name lookup for "x" or traversing the entire contents of the owner of "x". This commit provides the framework for serialization and (lazy) deserialization, along with support for variable and typedef declarations (along with several kinds of types). More declarations/types, along with important auxiliary structures (source manager, preprocessor, etc.), will follow. llvm-svn: 68732
* Add @encode support for complex types.Anders Carlsson2009-04-091-2/+5
| | | | llvm-svn: 68729
* Propagate the ASTContext to various AST traversal and lookup functions.Douglas Gregor2009-04-097-75/+104
| | | | | | No functionality change (really). llvm-svn: 68726
* Simple DeclContext's internal representation by always storing aDouglas Gregor2009-04-091-103/+14
| | | | | | | | StoredDeclsMap, instead of using the it's-an-array-or-its-a-map trick. I'll verify that performance isn't impacted later; for now, I need the common representation. llvm-svn: 68715
* Another ParentMap bug: only the right side of a comma expression is consumed.Ted Kremenek2009-04-091-2/+2
| | | | llvm-svn: 68680
* Added a FIXME.Fariborz Jahanian2009-04-081-0/+2
| | | | llvm-svn: 68646
* Fix buffer overrun when laying out synthesized ivars.Daniel Dunbar2009-04-081-1/+2
| | | | llvm-svn: 68634
* Fix bug in ParentMap::isConsumedExpr. A BinaryOperator always "consumes" theTed Kremenek2009-04-081-1/+3
| | | | | | | value of its subexpressions unless it is a comma (in which case it doesn't consume the left subexpression). llvm-svn: 68628
* improve compatibility with VC+, patch by John Thompson!Chris Lattner2009-04-081-1/+0
| | | | llvm-svn: 68586
* Allow us to ask for the access specifier of a translation unitDouglas Gregor2009-04-071-1/+2
| | | | llvm-svn: 68548
* CFG: when there is not continue or break target, mark the CFG as bad.Ted Kremenek2009-04-071-4/+11
| | | | llvm-svn: 68533
* Move the internal DeclContext data structures into a separate header. Douglas Gregor2009-04-072-111/+8
| | | | | | | | Simplify the addition of a case statement to a switch. Fix -print-stats for attribute-qualified types. llvm-svn: 68522
OpenPOWER on IntegriCloud