Douglas Gregor [Sun, 25 Apr 2010 21:15:30 +0000 (21:15 +0000)]
When name lookup finds a single declaration that was imported via a
using declaration, look at its underlying declaration to determine the
lookup result kind (e.g., overloaded, unresolved). Fixes at least one
issue in Boost.Bimap.
Douglas Gregor [Sun, 25 Apr 2010 20:55:08 +0000 (20:55 +0000)]
Improve the diagnostic when we find something we did not expect in a
member expression (p-> or x.), by showing the type we looked into and
what we did actually find.
Daniel Dunbar [Sun, 25 Apr 2010 20:39:32 +0000 (20:39 +0000)]
IRgen/NeXT: Fix several alignment issues with Objective-C metadata symbols:
- Fix some places that had the alignment hard coded.
- Use ABI type alignment, not preferred type alignment -- neither of this is exactly right, as we really want the C type alignment as required by the runtime, but the ABI alignment is a more correct choice.
This should be equivalent for x86_64, but fixes the alignment for ARM.
Daniel Dunbar [Sun, 25 Apr 2010 20:39:01 +0000 (20:39 +0000)]
IRgen/NeXT: Reuse EmitImageInfo for both fragile and non-fragile ABI. This fixes Clang to correctly emit the "CorrectedSynthesize" bit when using the non-fragile ABI.
Douglas Gregor [Sun, 25 Apr 2010 00:55:24 +0000 (00:55 +0000)]
When copying a temporary object to initialize an entity for which the
temporary needs to be bound, bind the copy object. Otherwise, we won't
end up calling the destructor for the copy. Fixes Boost.Optional.
Douglas Gregor [Sat, 24 Apr 2010 23:45:46 +0000 (23:45 +0000)]
When we create a temporary of class type that we don't immediately
bind, check accessibility of the destructor and mark the declaration
as referenced. Fixes a bunch of Boost.Regex failures.
Anders Carlsson [Sat, 24 Apr 2010 22:25:18 +0000 (22:25 +0000)]
DefineImplicitCopyConstructor now uses SetBaseOrMemberInitializers to create implicit base initializers. (Member initializers are still handled by CodeGenFunction::SynthesizeCXXCopyConstructor for now).
Douglas Gregor [Sat, 24 Apr 2010 20:54:38 +0000 (20:54 +0000)]
When we are performing copy initialization of a class type via its
copy constructor, suppress user-defined conversions on the
argument. Otherwise, we can end up in a recursion loop where the
bind the argument of the copy constructor to another copy constructor call,
whose argument is then a copy constructor call...
Found by Boost.Regex which, alas, still isn't building.
Daniel Dunbar [Sat, 24 Apr 2010 20:32:12 +0000 (20:32 +0000)]
Headers: Hide intptr_t and uintptr_t definitions behind _INTPTR_T and _UINTPTR_T
defines, for increased compatibility with Darwin gcc.
- This is a bit of a hack, since platform compatibility issues don't belong
here, but I don't think this hurts anyone either.
Douglas Gregor [Sat, 24 Apr 2010 18:20:53 +0000 (18:20 +0000)]
When we take the address of a declaration to bind it to a non-type
template parameter, by sure to mark that declaration as
"referenced". The Boost.Iterator library now passes all tests.
Douglas Gregor [Sat, 24 Apr 2010 16:38:41 +0000 (16:38 +0000)]
Be more careful around dependent nested-name-specifiers, complaining
when they are not complete (since we could not match them up to
anything) and ensuring that enum parsing can cope with dependent
elaborated-type-specifiers. Fixes PR6915 and PR6649.
Douglas Gregor [Sat, 24 Apr 2010 15:35:55 +0000 (15:35 +0000)]
Keep track of when DependentNameTypes have no associated keyword
(e.g., no typename, enum, class, etc.), e.g., because the context is
one that is known to refer to a type. Patch from Enea Zaffanella!
Dan Gohman [Sat, 24 Apr 2010 04:55:02 +0000 (04:55 +0000)]
Fix a place in inline asm lowering which was creating a TruncInst with a
pointer operand. This fixes an abort on
MultiSource/Applications/ClamAV/libclamav_mbox.c.
John McCall [Sat, 24 Apr 2010 01:30:58 +0000 (01:30 +0000)]
Recommit r102215, this time being more careful to only set the "principal
declaration" (i.e. the only which will actually be looked up) to have the
non-member-operator bit.
Douglas Gregor [Fri, 23 Apr 2010 23:01:43 +0000 (23:01 +0000)]
Rework Parser-Sema interface for Objective-C @catch exception object
arguments. Rather than having the parser call ActOnParamDeclarator
(which is a bit of a hack), call a new ActOnObjCExceptionDecl
action. We'll be moving more functionality into this handler to
perform earlier checking of @catch.
Douglas Gregor [Fri, 23 Apr 2010 22:50:49 +0000 (22:50 +0000)]
Improve the AST representation of Objective-C @try/@catch/@finally
statements. Instead of the @try having a single @catch, where all of
the @catch's were chained (using an O(n^2) algorithm nonetheless),
@try just holds an array of its @catch blocks. The resulting AST is
slightly more compact (not important) and better represents the actual
language semantics (good).
Anders Carlsson [Fri, 23 Apr 2010 20:40:38 +0000 (20:40 +0000)]
Add an inheritance path member variable to CastExpr. For now it's always null but for derived-to-base and base-to-derived cast expressions it will contain the full base path. This is needed to avoid ambiguities.
Daniel Dunbar [Fri, 23 Apr 2010 19:12:32 +0000 (19:12 +0000)]
NeXT/EH: When generating the rethrow code for a finally block, make sure to
chain outwards when inside a nested exception scope.
- A real test for this is going into LLVM test-suite.
Chris Lattner [Fri, 23 Apr 2010 17:27:29 +0000 (17:27 +0000)]
Implement PR6845. We allow matching constraints to have different
input and output types when the smaller value isn't mentioned in the
asm string. Extend this support from integers to also allowing
fp values to be mismatched (if not mentioned in the asm string).
Douglas Gregor [Fri, 23 Apr 2010 16:25:07 +0000 (16:25 +0000)]
When instantiating a typedef of an anonymous tag type, note in the tag
declaration that this typedef gives the tag a name. Fixes a problem
uncovered by Boost.GIL (Generic Image Library).
Douglas Gregor [Fri, 23 Apr 2010 04:16:32 +0000 (04:16 +0000)]
Handle compound assignment expressions (i += j) as lvalues, which is
permitted in C++ but not in C. Fixes PR6900. Clang can now handle all
of Boost.Lambda's regression tests.
John McCall [Fri, 23 Apr 2010 02:41:41 +0000 (02:41 +0000)]
C++ doesn't really use "namespaces" for different kinds of names the same
way that C does. Among other differences, elaborated type specifiers
are defined to skip "non-types", which, as you might imagine, does not
include typedefs. Rework our use of IDNS masks to capture the semantics
of different kinds of declarations better, and remove most current lookup
filters. Removing the last remaining filter is more complicated and will
happen in a separate patch.
Fixes PR 6885 as well some spectrum of unfiled bugs.
Douglas Gregor [Fri, 23 Apr 2010 02:08:13 +0000 (02:08 +0000)]
When parsing a cast-expression that starts with a scope annotation,
try to annotate as a type first to determine whether we have a
functional-style cast. Patch by Eli Friedman, fixes PR6830.
Douglas Gregor [Thu, 22 Apr 2010 23:19:50 +0000 (23:19 +0000)]
Kill off IDNS_ObjCImplementation and IDNS_ObjCCategoryName; they
aren't and never were used. There's a gap in the bit pattern for IDNS
now, but I'm sure *someone* will fill it.