aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2010-04-12Implement C++ [temp.local]p4, which specifies how we eliminateDouglas Gregor
name-lookup ambiguities when there are multiple base classes that are all specializations of the same class template. This is part of a general cleanup for ambiguities in template-name lookup. Fixes PR6717. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101065 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12Fix null dereference in 'WriteSourceLocation' when the FileEntry is null.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101060 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12Add some API code for future work.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101052 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12IRgen: Add CGRecordLayout::dump, and dump (irgen) record layouts as part of ↵Daniel Dunbar
-fdump-record-layouts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101051 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12fix PR6819Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101050 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12tighten the check for cast of super to avoid rejecting valid code,Chris Lattner
rdar://7853261 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101048 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12When creating the implicitly-declared special member functions, beDouglas Gregor
sure to introduce them into the current Scope (when we have one) in addition to the DeclContext for the class, so that they can be found by name lookup for inline members of the class. Fixes PR6570. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101047 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12Issue warning when 'weak_import' attribute is applied on a class onlyFariborz Jahanian
when it is not supported in versions of MacOs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101044 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12Fix a crash-on-invalid involving name lookup of tag names, where weDouglas Gregor
ended up finding a function template that we didn't expect. Recover more gracefully, and fix a similar issue for class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101040 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12Be sure to instantiate the parameters of a function, even when theDouglas Gregor
function's type is (strictly speaking) non-dependent. This ensures that, e.g., default function arguments get instantiated properly. And, since I couldn't resist, collapse the two implementations of function-parameter instantiation into calls to a single, new function (Sema::SubstParmVarDecl), since the two had nearly identical code (and each had bugs the other didn't!). More importantly, factored out the semantic analysis of a parameter declaration into Sema::CheckParameter, which is called both by Sema::ActOnParamDeclarator (when parameters are parsed) and when a parameter is instantiated. Previously, we were missing some Objective-C and address-space checks on instantiated function parameters. Fixes PR6733. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101029 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12fix a bug I noticed by inspection, correcting two reject-valid bugs.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101026 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12fix a rejects-valid bug that I introduced, pointed out Chris Lattner
by David Chisnall git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101024 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12use pointer comparison instead of isStrChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101022 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12fix a rejects-valid testcase involving super that I dreamt up.Chris Lattner
This also fixes cases where super is used in a block in a method which isn't valid. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101021 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12change Scope::WithinElse to be a normal scope flag, widen theChris Lattner
fields to two 16-bit values instead of using bitfields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101020 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12Have the parser decide whether a message to super is a variable orChris Lattner
type, instead of having sema do it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101016 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12fix a fixme, stop evaluating getCurMethodDecl() repeatedly Chris Lattner
in "LookupInObjCMethod". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101014 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12other half of r101005Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101006 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12Have the CXXBaseOrMemberInitializer keep track of whether an initializer ↵Anders Carlsson
initializes a virtual base or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101004 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11Fix another bug where we wouldn't generate secondary vtables for ↵Anders Carlsson
construction vtables in some cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100998 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11More renames.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100991 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11Rename a function parameter.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100990 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11Clarify an assertion.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100986 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11Fix a bug where we were adding too many vcall offsets in some cases.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100985 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11add haiku support, patch by Paul Davey!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100982 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11Fix CFG bug where bases of member expressions were not always evaluated in a ↵Ted Kremenek
lvalue context. Fixes <rdar://problem/7813989>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100966 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11Fix bug in AddStmtChoice:asLValue() where 'AsLValueNotAlwaysAdd' would not ↵Ted Kremenek
be treated as indicating an lvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100965 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11Sort visitor methods. No functionality change.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100964 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11fix PR6811 by not parsing 'super' as a magic expression inChris Lattner
LookupInObjCMethod. Doing so allows all sorts of invalid code to slip through to codegen. This patch does not change the AST representation of super, though that would now be a natural thing to do since it can only be in the receiver position and in the base of a ObjCPropertyRefExpr. There are still several ugly areas handling super in the parser, but this is definitely a step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100959 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11actually the interface grossness in the previous patch was due toChris Lattner
typo correction. However, now that the code has been factored out of LookupMemberExpr, it can recurse to itself instead of to LookupMemberExpr! Remove grossness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100958 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11factor the code that handles "expr.field" when expr is aChris Lattner
pointer to an objc interface out to a method in SemaExprObjC. This is *much* uglier than it should be due to grossness in LookupMemberExpr :( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100957 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11fix a problem causing us to lose the ''s around objc interface namesChris Lattner
in a diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100956 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10Enable an assert and remove a now unnecessary assert.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100953 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10Fix another vbase layout bug.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100952 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10Add a simple debug-only verification pass to the record layout builder.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100951 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10Fix a bug where we would add the same function twice in a vtable.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100949 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10revert 100942, pending discussion.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100946 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10Rename VtableComponent and VtableBuilder.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100945 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10Rename -dump-record-layouts to -fdump-record-layouts now that the option ↵Anders Carlsson
behaves like aa flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100943 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10Fix for PR6811.David Chisnall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100942 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10Simplify the virtual base layout code and fix a bug where we wouldn't store ↵Anders Carlsson
the offset for a virtual base. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100940 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10fix PR6805: llvm.objectsize changed to take an i1 instead of an i32.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100938 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10Driver: Only add extra -L paths on darwin if they exist. Unfortunately, thisDaniel Dunbar
means it isn't really possible to write the test case for this code, but this is the kind of thing that really requires testing against the installed compiler anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100935 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10Driver: Ignore -fobjc-gc and -fobjc-gc-only for platforms which don't ↵Daniel Dunbar
support them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100930 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10A bunch of string-related microoptimizations in Mangler.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100928 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10Fix use after free. Incrementing an use_iterator after its user is erased is ↵Benjamin Kramer
unsafe. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100926 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10When a member pointer is dereferenced, the class it points into must be ↵Sebastian Redl
complete. Enforce this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100925 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10Doug pointed out that we have a perfectly reasonable expression here toJohn McCall
serve as a source of source locations for the can't-yet-mangle diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100924 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10Diagnose more cases of initializing distinct members of an anonymous unionJohn McCall
member. Use a better diagnostic for this case. Also fix a bug with nested anonymous structs/unions for -Wreorder; this last was PR6575. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100923 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10Diagnose misordered initializers in constructor templates immediately instead ofJohn McCall
when they're instantiated. Merge the note into the -Wreorder warning; it doesn't really contribute much, and it was splitting a thought across diagnostics anyway. Don't crash in the parser when a constructor's initializers end in a comma and there's no body; the recovery here is still terrible, but anything's better than a crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100922 91177308-0d34-0410-b5e6-96231b3b80d8