aboutsummaryrefslogtreecommitdiff
path: root/lib/AST
AgeCommit message (Collapse)Author
2009-08-02Compute end_overridden_methods in a way that keeps ENABLE_EXPENSIVE_CHECKSDaniel Dunbar
happy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77850 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01Avoid accessing invalid std::vector element; this makes clangDaniel Dunbar
ENABLE_EXPENSIVE_CHECKS clean on x86_64-.*-darwin10. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77831 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31Add code to setup the vtable pointer in the constructor. Work in progress.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77699 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31Make canonicalization of overloaded function declarations match theDouglas Gregor
Itanium C++ ABI's name mangling, since both are related to the notion of "equivalent" function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77678 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31Canonicalize template template parameters. We can't test this yet, butDouglas Gregor
it's "obviously correct" :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77677 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31Canonicalize function parametersDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77676 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31Canonicalization and profiling for overloaded function declarations,Douglas Gregor
for those extra-esoteric cases. Not that any two given C++ compilers agree on this test case, but this change gives us a strong definition of equivalent types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77664 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31Canonicalize dependent extended vector types.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77663 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31Whitespace around else canonicalization and fix 80-col violations.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77655 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31Build canonical types for dependently-sized array types.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77647 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30Canonicalization of dependent C++0x decltype types.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77643 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30Canonicalization for dependent typeof(expr) types.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77639 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30Update based upon comments. Explain why we have an assert.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77612 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30We'll also need a vtable pointer if we have virtual bases.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77610 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30Support out-of-line definitions of the members of class templateDouglas Gregor
partial specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77606 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30Fix type to be consistent with the rest of the code.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77560 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30Add ability to layout the vtable pointer in trivial cases. I noticedMike Stump
that we would silently do bad things with virtual bases in the layout code, so, we just turn them off. When people do better things with them, we can turn them back on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77556 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29There's no point in going through the getAs<TagType> stuff to find the ↵Douglas Gregor
definition of a tag, since tags rarely have more than one or two declarations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77546 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Make tag declarations redeclarable. This change has three purposes:Douglas Gregor
1) Allow the Index library (and any other interested client) to walk the set of declarations for a given tag (enum, union, class, whatever). At the moment, this information is not readily available. 2) Reduce our dependence on TagDecl::TypeForDecl being mapped down to a TagType (for which getDecl() will return the tag definition, if one exists). This property won't exist for class template partial specializations. 3) Make the canonical declaration of a TagDecl actually canonical, e.g., so that it does not change when the tag is defined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Change uses of:Ted Kremenek
Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsRecordType() -> Type::getAs<RecordType>() Type::getAsPointerType() -> Type::getAs<PointerType>() Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>() Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>() Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>() Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>() Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsTagType() -> Type::getAs<TagType>() And remove Type::getAsReferenceType(), etc. This change is similar to one I made a couple weeks ago, but that was partly reverted pending some additional design discussion. With Doug's pending smart pointer changes for Types, it seemed natural to take this approach. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77510 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29No longer need to keep base class offsets in the offsetFariborz Jahanian
table as it has its own place now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77491 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29[llvm up]Douglas Gregor
A template name can refer to a set of overloaded function templates. Model this in TemplateName, which can now refer to an OverloadedFunctionDecl that contains function templates. This removes an unspeakable hack in Sema::isTemplateName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77488 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Use the new statement/expression profiling code to unique dependentDouglas Gregor
template arguments, as in template specialization types. This permits matching out-of-line definitions of members for class templates that involve non-type template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77462 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Code refactoring to define getCXXRecordDeclForPointerTypeFariborz Jahanian
and use it in several places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77411 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28Some minor cleanups, thanks Chris.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77402 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28Some style fixes, thanks Chris.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77400 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28Refactor the code that produces a TemplateSpecializationType, so thatDouglas Gregor
canonicalization for dependent TemplateSpecializationTypes occurs within ASTContext::getTemplateSpecializationType. Also, move template argument canonicalization into ASTContext::getCanonicalTemplateArgument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77388 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28remove extraneous bracesChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77386 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28Add a field for C++ specific data to ASTRecordLayout. Use it to store the ↵Anders Carlsson
non-virtual size and alignment + base offsets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77352 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28fix PR4633: cast to void should silence the 'unused expression' warning.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77344 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28Fix a typo in a commentDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77324 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28Profiling the pointer of a canonical type is sufficient to uniquely identify ↵Douglas Gregor
the type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77321 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28Finish profile support for statements.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77320 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28Complete profile support for C++ and Objective-C expressionsDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77318 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28CallExpr's SubExprs sometimes were allocated in the wrong place.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77302 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28Reimplement QualifierSet using a single word, as requested by dgregor.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77299 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28Implement ObjCMethodDecl::getCanonicalDecl().Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77298 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28-Add ObjCCategoryImplDecl::getCategoryClass() which returns the category ↵Argyrios Kyrtzidis
interface decl. -Correct ObjCMethodDecl::getNextRedeclaration(); A method in a ObjCCategoryImplDecl should point to a method in the associated ObjCCategoryDecl, not the ObjCInterfaceDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77297 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28Use ObjCImplDecl in place of ObjCCategoryImplDecl/ObjCImplementationDecl.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77296 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28Make longjmp a real builtin.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77291 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28Add a Profile function for statements so that we can (eventually) determineDouglas Gregor
when statements and expressions are equivalent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77284 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27Ensure we can work through typedefs.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77265 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27Add builtin knowledge about longjmp being noreturn. Add printing forMike Stump
the noreturn attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77253 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27Make ObjCImplDecl inherit from ObjCContainerDecl.Argyrios Kyrtzidis
ObjCContainerDecl now is the root class for objc decls that contain methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77235 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27Fix PR4624.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77176 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25Preserve qualifiers.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77097 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25Refactor ObjCImplDecl::getInstanceMethod/getClassMethod into oneArgyrios Kyrtzidis
ObjCImplDecl::getMethod. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77094 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25Refactor ObjCInterfaceDecl::lookupInstanceMethod/lookupClassMethod into oneArgyrios Kyrtzidis
ObjCInterfaceDecl::lookupMethod. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77093 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25Refactor ObjCProtocolDecl::lookupInstanceMethod/lookupClassMethod into oneArgyrios Kyrtzidis
ObjCProtocolDecl::lookupMethod. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77092 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25Refactor ObjCContainerDecl::getInstanceMethod/getClassMethod into oneArgyrios Kyrtzidis
ObjCContainerDecl::getMethod. Avoids code duplication. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77091 91177308-0d34-0410-b5e6-96231b3b80d8