summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Remove hack support for @try...@finally in source-level CFGs. The current hackTed Kremenek2009-04-071-8/+1
| | | | | | had too many false positives in the analyzer. llvm-svn: 68492
* Ignore plus operands when looking up the operand number from a named ↵Anders Carlsson2009-04-031-3/+0
| | | | | | operand. This matches llvm-gcc and fixes PR3908. llvm-svn: 68371
* Resynchronize Decl/VarDecl serialization code with the structuresDouglas Gregor2009-04-021-0/+12
| | | | llvm-svn: 68346
* Fix up lookup rules for properties declared inFariborz Jahanian2009-04-022-48/+0
| | | | | | objc's continuation class. llvm-svn: 68339
* add TemplateName.cpp/h to the xcode project, minor tidying.Chris Lattner2009-04-021-1/+1
| | | | llvm-svn: 68301
* Fix a bug in declaration of property in continuationFariborz Jahanian2009-04-011-0/+10
| | | | | | | class which was exposed by implementation of objc2's nonfragile abi code gen. llvm-svn: 68259
* Nonfragile ivar synthesis with property is in a continuationFariborz Jahanian2009-04-012-1/+39
| | | | | | class. llvm-svn: 68234
* Update CMake file. Patch by Brian Diekelman!Ted Kremenek2009-04-011-0/+1
| | | | llvm-svn: 68232
* Give Type::getDesugaredType a "for-display" mode that can apply moreDouglas Gregor2009-04-011-7/+27
| | | | | | | | | | | | | | | | | | | | | | | heuristics to determine when it's useful to desugar a type for display to the user. Introduce two C++-specific heuristics: - For a qualified type (like "foo::bar"), only produce a new desugred type if desugaring the qualified type ("bar", in this case) produces something interesting. For example, if "foo::bar" refers to a class named "bar", don't desugar. However, if "foo::bar" refers to a typedef of something else, desugar to that something else. This gives some useful desugaring such as "foo::bar (aka 'int')". - Don't desugar class template specialization types like "basic_string<char>" down to their underlying "class basic_string<char, char_traits<char>, allocator<char>>, etc."; it's better just to leave such types alone. Update diagnostics.html with some discussion and examples of type preservation in C++, showing qualified names and class template specialization types. llvm-svn: 68207
* Fix: <rdar://problem/6740387>. Sending nil to an object that returns a structTed Kremenek2009-04-011-0/+40
| | | | | | | should only be an error if that value is consumed. This fix was largely accomplished by moving 'isConsumedExpr' back to ParentMap. llvm-svn: 68195
* remove ASTContext::buildObjCInterfaceType, which breaks canonical Chris Lattner2009-04-011-12/+0
| | | | | | | | types. It is no longer needed now that the code generator re-lays-out interfaces if they are defines after being laid out from a forward decl. llvm-svn: 68194
* CFG: For 'if(...) {}' (empty body) construct an empty CFGBlock so that we canTed Kremenek2009-04-011-2/+7
| | | | | | distinguish between the true and false branches for path-sensitive analyses. llvm-svn: 68185
* Fix block comparisons. Radar 6732116.Mike Stump2009-04-011-3/+3
| | | | llvm-svn: 68171
* Parsing, semantic analysis, and template instantiation for typenameDouglas Gregor2009-04-014-17/+59
| | | | | | | | | | | | | specifiers that terminate in a simple-template-id, e.g., typename MetaFun::template apply<T1, T2> Also, implement template instantiation for dependent nested-name-specifiers that involve unresolved identifiers, e.g., typename T::type::type llvm-svn: 68166
OpenPOWER on IntegriCloud