]> granicus.if.org Git - clang/log
clang
14 years agoDefineImplicitCopyConstructor now uses SetBaseOrMemberInitializers to create implicit...
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102279 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen building implicit base initializers, add a derived-to-base cast that points...
Anders Carlsson [Sat, 24 Apr 2010 22:02:54 +0000 (22:02 +0000)]
When building implicit base initializers, add a derived-to-base cast that points to the exact base specifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102277 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRename GetAddressOfBaseClass to OldGetAddressOfBaseClass.
Anders Carlsson [Sat, 24 Apr 2010 21:51:08 +0000 (21:51 +0000)]
Rename GetAddressOfBaseClass to OldGetAddressOfBaseClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102275 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGet rid of the old GetNonVirtualBaseClassOffset and change all call sites to use...
Anders Carlsson [Sat, 24 Apr 2010 21:27:51 +0000 (21:27 +0000)]
Get rid of the old GetNonVirtualBaseClassOffset and change all call sites to use the new version.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102274 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange CodeGenFunction::GetAddressOfDerivedClass to take a BasePath.
Anders Carlsson [Sat, 24 Apr 2010 21:23:59 +0000 (21:23 +0000)]
Change CodeGenFunction::GetAddressOfDerivedClass to take a BasePath.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102273 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoConvert more call sites over to the new GetAddressOfBaseClass.
Anders Carlsson [Sat, 24 Apr 2010 21:12:55 +0000 (21:12 +0000)]
Convert more call sites over to the new GetAddressOfBaseClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102272 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen we attempt to create a temporary object of class type, be sure
Douglas Gregor [Sat, 24 Apr 2010 21:09:25 +0000 (21:09 +0000)]
When we attempt to create a temporary object of class type, be sure
that the type we're copying is complete.

Boost.Regex now builds, although it's failing its regression tests
with our favorite "Sema doesn't consider destructor as used."
assertion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102271 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a new GetAddressOfBaseClass overload that takes a base path and. Use it for deriv...
Anders Carlsson [Sat, 24 Apr 2010 21:06:20 +0000 (21:06 +0000)]
Add a new GetAddressOfBaseClass overload that takes a base path and. Use it for derived-to-base casts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102270 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen we are performing copy initialization of a class type via its
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102269 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoHeaders: Hide intptr_t and uintptr_t definitions behind _INTPTR_T and _UINTPTR_T
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102264 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix pasto, add a comment.
Benjamin Kramer [Sat, 24 Apr 2010 20:26:20 +0000 (20:26 +0000)]
Fix pasto, add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102263 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFactor code. No functionality change.
Benjamin Kramer [Sat, 24 Apr 2010 20:19:58 +0000 (20:19 +0000)]
Factor code. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102262 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd base paths for CK_BaseToDerived and CK_BaseToDerivedMemberPointer.
Anders Carlsson [Sat, 24 Apr 2010 19:36:51 +0000 (19:36 +0000)]
Add base paths for CK_BaseToDerived and CK_BaseToDerivedMemberPointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102261 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd base paths to CK_UncheckedDerivedToBase and CK_DerivedToBaseMemberPointer.
Anders Carlsson [Sat, 24 Apr 2010 19:22:20 +0000 (19:22 +0000)]
Add base paths to CK_UncheckedDerivedToBase and CK_DerivedToBaseMemberPointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102260 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoActually produce base paths for CastExprs of kind CK_DerivedToBase.
Anders Carlsson [Sat, 24 Apr 2010 19:06:50 +0000 (19:06 +0000)]
Actually produce base paths for CastExprs of kind CK_DerivedToBase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102259 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd BasePath arguments to all cast expr constructors.
Anders Carlsson [Sat, 24 Apr 2010 18:38:56 +0000 (18:38 +0000)]
Add BasePath arguments to all cast expr constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102258 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDriver/Darwin: Fix Objective-C non-fragile ABI and dispatch method defaults, which...
Daniel Dunbar [Sat, 24 Apr 2010 18:37:41 +0000 (18:37 +0000)]
Driver/Darwin: Fix Objective-C non-fragile ABI and dispatch method defaults, which were wrong in numerous places.
 - <rdar://problem/7903449>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102257 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen we take the address of a declaration to bind it to a non-type
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102256 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoNeXT: Clean up dispatch method policy selection.
Daniel Dunbar [Sat, 24 Apr 2010 17:56:46 +0000 (17:56 +0000)]
NeXT: Clean up dispatch method policy selection.
 - Replace -cc1 level -fobjc-legacy-dispatch with -fobjc-dispatch-method={legacy,non-legacy,mixed}.

 - Lift "mixed" vs "non-mixed" policy choice up to driver level, instead of being buried in CGObjCMac.cpp.

 - No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102255 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSimplify.
Daniel Dunbar [Sat, 24 Apr 2010 17:56:39 +0000 (17:56 +0000)]
Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102254 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPass the base specifiers through to CheckDerivedToBaseConversion. No functionality...
Anders Carlsson [Sat, 24 Apr 2010 17:11:09 +0000 (17:11 +0000)]
Pass the base specifiers through to CheckDerivedToBaseConversion. No functionality change yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102250 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCastExpr should not hold a pointer to the base path. More cleanup.
Anders Carlsson [Sat, 24 Apr 2010 16:57:13 +0000 (16:57 +0000)]
CastExpr should not hold a pointer to the base path. More cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102249 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTweak test case slightly
Douglas Gregor [Sat, 24 Apr 2010 16:40:35 +0000 (16:40 +0000)]
Tweak test case slightly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102248 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoBe more careful around dependent nested-name-specifiers, complaining
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102247 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoisValue is set to false by default.
Anders Carlsson [Sat, 24 Apr 2010 16:36:20 +0000 (16:36 +0000)]
isValue is set to false by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102246 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRename InheritancePath to BasePath, rename CastExpr::CXXBaseVector to CXXBaseSpecifie...
Anders Carlsson [Sat, 24 Apr 2010 16:34:21 +0000 (16:34 +0000)]
Rename InheritancePath to BasePath, rename CastExpr::CXXBaseVector to CXXBaseSpecifierArray. More to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102245 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoKeep track of when DependentNameTypes have no associated keyword
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!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102243 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate prototypes.
Benjamin Kramer [Sat, 24 Apr 2010 08:26:17 +0000 (08:26 +0000)]
Update prototypes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102241 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a place in inline asm lowering which was creating a TruncInst with a
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102238 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRecommit r102215, this time being more careful to only set the "principal
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102231 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach clang -fixit to modify files in-place, or -fixit=suffix to create new
Nick Lewycky [Sat, 24 Apr 2010 01:30:46 +0000 (01:30 +0000)]
Teach clang -fixit to modify files in-place, or -fixit=suffix to create new
files with the additional suffix in the middle.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102230 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert accidental check-in.
Devang Patel [Sat, 24 Apr 2010 00:49:16 +0000 (00:49 +0000)]
Revert accidental check-in.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102226 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert r102215. This causes clang crash while compiling a test case from gdb testsuite.
Devang Patel [Sat, 24 Apr 2010 00:40:35 +0000 (00:40 +0000)]
Revert r102215. This causes clang crash while compiling a test case from gdb testsuite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102224 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWith -fno-constant-cfstrrings, class NSConstantString
Fariborz Jahanian [Fri, 23 Apr 2010 23:19:04 +0000 (23:19 +0000)]
With -fno-constant-cfstrrings, class NSConstantString
must be there or it is error (Next runtime).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102223 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRework Parser-Sema interface for Objective-C @catch exception object
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102222 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImprove the AST representation of Objective-C @try/@catch/@finally
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102221 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMore -fno-constant-cfstrings API work.
Fariborz Jahanian [Fri, 23 Apr 2010 22:33:39 +0000 (22:33 +0000)]
More -fno-constant-cfstrings API work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102219 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd an InheritancePath parameter to the ImplicitCastExpr constructor.
Anders Carlsson [Fri, 23 Apr 2010 22:18:37 +0000 (22:18 +0000)]
Add an InheritancePath parameter to the ImplicitCastExpr constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102218 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTransition the last acceptable-result filter kind in LookupResult over to use
John McCall [Fri, 23 Apr 2010 21:37:18 +0000 (21:37 +0000)]
Transition the last acceptable-result filter kind in LookupResult over to use
a simple IDNS mask by introducing a namespace for non-member operators.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102215 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake Parser::ConsumeAndStoreUntil() more consistent with Parser::SkipUntil().
Argyrios Kyrtzidis [Fri, 23 Apr 2010 21:20:12 +0000 (21:20 +0000)]
Make Parser::ConsumeAndStoreUntil() more consistent with Parser::SkipUntil().

ConsumeAndStoreUntil would stop at tok::unknown when caching an inline method
definition while SkipUntil would go past it while parsing the method.

Fixes PR 6903.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102214 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDestroy the inheritance path.
Anders Carlsson [Fri, 23 Apr 2010 21:02:34 +0000 (21:02 +0000)]
Destroy the inheritance path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102211 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd an inheritance path member variable to CastExpr. For now it's always null but...
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102210 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTurn CXXMethodVector into a generic class template.
Anders Carlsson [Fri, 23 Apr 2010 19:53:03 +0000 (19:53 +0000)]
Turn CXXMethodVector into a generic class template.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102208 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoNeXT/EH: When generating the rethrow code for a finally block, make sure to
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102204 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoNeXT/EH: Tidy up EH code a bit, don't emit the catch block EH handler if it is unreac...
Daniel Dunbar [Fri, 23 Apr 2010 19:12:24 +0000 (19:12 +0000)]
NeXT/EH: Tidy up EH code a bit, don't emit the catch block EH handler if it is unreachable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102203 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRecommit my change to how C++ does elaborated type lookups, now with
John McCall [Fri, 23 Apr 2010 18:46:30 +0000 (18:46 +0000)]
Recommit my change to how C++ does elaborated type lookups, now with
two bugfixes which fix selfhost and (hopefully) the nightly tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102198 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImprove on my previous diagnostics: per Doug's comment.
Fariborz Jahanian [Fri, 23 Apr 2010 17:52:02 +0000 (17:52 +0000)]
Improve on my previous diagnostics: per Doug's comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102190 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMore work toward implementing
Fariborz Jahanian [Fri, 23 Apr 2010 17:41:07 +0000 (17:41 +0000)]
More work toward implementing
NeXt's -fno-constant-cfstrings - wip.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102189 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement PR6845. We allow matching constraints to have different
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102188 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTrying to improve on a diagnostics for properties.
Fariborz Jahanian [Fri, 23 Apr 2010 17:22:07 +0000 (17:22 +0000)]
Trying to improve on a diagnostics for properties.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102187 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRequire a complete type for the lhs of member pointer dereference operations if the...
Sebastian Redl [Fri, 23 Apr 2010 17:18:26 +0000 (17:18 +0000)]
Require a complete type for the lhs of member pointer dereference operations if the type isn't exactly the same as the container class. Fixes PR6783.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102186 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix typo
Chris Lattner [Fri, 23 Apr 2010 16:31:30 +0000 (16:31 +0000)]
fix typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102183 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorename test
Chris Lattner [Fri, 23 Apr 2010 16:30:17 +0000 (16:30 +0000)]
rename test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102182 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodavid conrad points out that {|} in inline assembly on arm are not asm
Chris Lattner [Fri, 23 Apr 2010 16:29:58 +0000 (16:29 +0000)]
david conrad points out that {|} in inline assembly on arm are not asm
variants.  This fixes neon inline asm which my patch for PR6780 broke.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102181 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen instantiating a typedef of an anonymous tag type, note in the tag
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102180 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCleanup.
Anders Carlsson [Fri, 23 Apr 2010 16:24:12 +0000 (16:24 +0000)]
Cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102179 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoHandle copy initialization in BuildImplicitMemberInitializer. Not used yet.
Anders Carlsson [Fri, 23 Apr 2010 16:04:08 +0000 (16:04 +0000)]
Handle copy initialization in BuildImplicitMemberInitializer. Not used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102178 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd GNU C++ include paths for Fedora 11,12 x86_64,
Chris Lattner [Fri, 23 Apr 2010 15:55:20 +0000 (15:55 +0000)]
add GNU C++ include paths for Fedora 11,12 x86_64,
patch by mikem!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102177 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert "C++ doesn't really use "namespaces" for different kinds of names the same...
Daniel Dunbar [Fri, 23 Apr 2010 13:07:39 +0000 (13:07 +0000)]
Revert "C++ doesn't really use "namespaces" for different kinds of names the same", which seems to break most C++ nightly test apps.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102174 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoconcepts is not a keyword here and fix copy-pasto.
Nick Lewycky [Fri, 23 Apr 2010 06:09:40 +0000 (06:09 +0000)]
concepts is not a keyword here and fix copy-pasto.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102172 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoStrip cv-qualifiers when building C++ constructor and destructor
Douglas Gregor [Fri, 23 Apr 2010 04:51:46 +0000 (04:51 +0000)]
Strip cv-qualifiers when building C++ constructor and destructor
names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102171 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoHandle compound assignment expressions (i += j) as lvalues, which is
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102170 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd another 'catch all' access diagnostic.
Anders Carlsson [Fri, 23 Apr 2010 03:41:35 +0000 (03:41 +0000)]
Add another 'catch all' access diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102169 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEmit a lame diagnostic when we can't mangle operator names
Douglas Gregor [Fri, 23 Apr 2010 03:19:53 +0000 (03:19 +0000)]
Emit a lame diagnostic when we can't mangle operator names

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102168 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMangle dependent template names such as the nested-name-specifier in
Douglas Gregor [Fri, 23 Apr 2010 03:10:43 +0000 (03:10 +0000)]
Mangle dependent template names such as the nested-name-specifier in

  T::apply <U>::type

Fixes PR6899, although I want to dig a little deeper into the FIXME
for dependent template names that refer to operators.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102167 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd an ImplicitInitializerKind enum and pass it to BuildImplicitBaseInitializer and...
Anders Carlsson [Fri, 23 Apr 2010 03:10:23 +0000 (03:10 +0000)]
Add an ImplicitInitializerKind enum and pass it to BuildImplicitBaseInitializer and BuildImplicitMemberInitializer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102166 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a think-o that broke self-host.
Anders Carlsson [Fri, 23 Apr 2010 03:07:47 +0000 (03:07 +0000)]
Fix a think-o that broke self-host.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102165 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoC++ doesn't really use "namespaces" for different kinds of names the same
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102164 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange the 'declared at' diagnostic to say 'declared here'.
Anders Carlsson [Fri, 23 Apr 2010 02:20:12 +0000 (02:20 +0000)]
Change the 'declared at' diagnostic to say 'declared here'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102163 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFactor code to initialize an implicit member out into a separate function.
Anders Carlsson [Fri, 23 Apr 2010 02:15:47 +0000 (02:15 +0000)]
Factor code to initialize an implicit member out into a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102162 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen parsing a cast-expression that starts with a scope annotation,
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102161 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoI hate default statements. Fixes PR6874.
Douglas Gregor [Fri, 23 Apr 2010 02:02:43 +0000 (02:02 +0000)]
I hate default statements. Fixes PR6874.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102160 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove calls to isDependentContext, since we handle that case earlier in the code...
Anders Carlsson [Fri, 23 Apr 2010 02:00:02 +0000 (02:00 +0000)]
Remove calls to isDependentContext, since we handle that case earlier in the code. Make BuildImplicitBaseInitializer return a boolean instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102159 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTemplate instantiation for @try and @finally (but not @catch, yet).
Douglas Gregor [Thu, 22 Apr 2010 23:59:56 +0000 (23:59 +0000)]
Template instantiation for @try and @finally (but not @catch, yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102147 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake TemplateDecl and ObjCContainerDecl abstract
Douglas Gregor [Thu, 22 Apr 2010 23:35:25 +0000 (23:35 +0000)]
Make TemplateDecl and ObjCContainerDecl abstract

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102145 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoKill off IDNS_ObjCImplementation and IDNS_ObjCCategoryName; they
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102143 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTemplate instantiation for the Objective-C "fast enumeration"
Douglas Gregor [Thu, 22 Apr 2010 23:10:45 +0000 (23:10 +0000)]
Template instantiation for the Objective-C "fast enumeration"
statement, i.e.,

  for (element in collection) {
    // do something
  }

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102138 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTemplate instantiation for Objective-C++ @synchronized statements.
Douglas Gregor [Thu, 22 Apr 2010 22:01:21 +0000 (22:01 +0000)]
Template instantiation for Objective-C++ @synchronized statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102134 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement template instantiation for Objective-C++ @throw statements.
Douglas Gregor [Thu, 22 Apr 2010 21:44:01 +0000 (21:44 +0000)]
Implement template instantiation for Objective-C++ @throw statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102133 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCheck for -fno-constant-cfstrings consistency
Fariborz Jahanian [Thu, 22 Apr 2010 21:01:59 +0000 (21:01 +0000)]
Check for -fno-constant-cfstrings consistency
in pch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102130 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSupport for -fno-constant-cfstrings option - wip.
Fariborz Jahanian [Thu, 22 Apr 2010 20:26:39 +0000 (20:26 +0000)]
Support for -fno-constant-cfstrings option - wip.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102112 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse the naming class from the overloaded lookup when access-checking an
John McCall [Thu, 22 Apr 2010 18:44:12 +0000 (18:44 +0000)]
Use the naming class from the overloaded lookup when access-checking an
address of overloaded function, instead of assuming that a nested name
specifier was used.  A nested name specifier is not required for static
functions.

Fixes PR6886.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102107 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoanother tweak for haiku support, patch by Paul Davey!
Chris Lattner [Thu, 22 Apr 2010 17:48:00 +0000 (17:48 +0000)]
another tweak for haiku support, patch by Paul Davey!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102098 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSome Objective-C++ types and expressions will never change during
Douglas Gregor [Thu, 22 Apr 2010 17:28:13 +0000 (17:28 +0000)]
Some Objective-C++ types and expressions will never change during
template instantiation, since they cannot be dependent or have
dependent parts. Handle them the simple way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102094 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen a dependent Objective-C++ message send was able to resolve the
Douglas Gregor [Thu, 22 Apr 2010 17:01:48 +0000 (17:01 +0000)]
When a dependent Objective-C++ message send was able to resolve the
method being called at template definition time, retain that method
and pass it through to type-checking. We will not perform any lookup
for the method during template instantiation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102081 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove the SelectorLoc argument to Sema::BuildInstanceMesssage and
Douglas Gregor [Thu, 22 Apr 2010 16:50:51 +0000 (16:50 +0000)]
Remove the SelectorLoc argument to Sema::BuildInstanceMesssage and
Sema::BuildClassMessage; we weren't using it, and template
instantiation was faking it anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102074 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoExpand the one use of TransformPointerLikeType and eliminate this macro. No functiona...
Douglas Gregor [Thu, 22 Apr 2010 16:46:21 +0000 (16:46 +0000)]
Expand the one use of TransformPointerLikeType and eliminate this macro. No functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102073 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement template instantiation for Objective-C++ message sends. We
Douglas Gregor [Thu, 22 Apr 2010 16:44:27 +0000 (16:44 +0000)]
Implement template instantiation for Objective-C++ message sends. We
support dependent receivers for class and instance messages, along
with dependent message arguments (of course), and check as much as we
can at template definition time.

This commit also deals with a subtle aspect of template instantiation
in Objective-C++, where the type 'T *' can morph from a dependent
PointerType into a non-dependent ObjCObjectPointer type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102071 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoARM/APCS: Don't respect bit-field types when laying out structures.
Daniel Dunbar [Thu, 22 Apr 2010 16:14:54 +0000 (16:14 +0000)]
ARM/APCS: Don't respect bit-field types when laying out structures.
 - This fixes the last known ABI issues with ARM/APCS.

 - I've run the first 1k ABITests with '--no-unsigned --no-vector --no-complex'
   on {armv6, armv7} x {-mno-thumb, -mthumb}, and the first 10k tests for armv7
   -mthumb, for both function return types and single argument calls. These all
   pass now (they failed horribly before without --no-bitfield).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102070 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIRgen: Fix another case where we generated an invalid access component when we
Daniel Dunbar [Thu, 22 Apr 2010 15:22:33 +0000 (15:22 +0000)]
IRgen: Fix another case where we generated an invalid access component when we
immediately narrowed the access size. Fix this (and previous case) by just
choosing a better access size up-front.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102068 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIRgen: Fix case where we might generate an access component with width == 0, if
Daniel Dunbar [Thu, 22 Apr 2010 14:56:10 +0000 (14:56 +0000)]
IRgen: Fix case where we might generate an access component with width == 0, if
we have to narrow the access side immediately (can happen with packed,
-fno-bitfield-type-align).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102067 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen checking whether to diagnose an initialized "extern" variable,
Douglas Gregor [Thu, 22 Apr 2010 14:36:26 +0000 (14:36 +0000)]
When checking whether to diagnose an initialized "extern" variable,
look for the const on the base type rather than on the top-level
type. Fixes PR6495 properly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102066 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRecord nested-name-specifiers of when we create
Douglas Gregor [Thu, 22 Apr 2010 14:24:35 +0000 (14:24 +0000)]
Record nested-name-specifiers of when we create
elaborated-type-specifiers. Patch by Enea Zaffanella!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102065 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRe-land the patch that merges two diagnostics into one now that it passes self-host :)
Anders Carlsson [Thu, 22 Apr 2010 05:40:53 +0000 (05:40 +0000)]
Re-land the patch that merges two diagnostics into one now that it passes self-host :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102050 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoNeuter this testcase a little. The way LLVM writes labels for anonymous blocks
John McCall [Thu, 22 Apr 2010 03:27:09 +0000 (03:27 +0000)]
Neuter this testcase a little.  The way LLVM writes labels for anonymous blocks
makes it impossible to check labels.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102048 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSuppress compiler warning.
Daniel Dunbar [Thu, 22 Apr 2010 03:17:06 +0000 (03:17 +0000)]
Suppress compiler warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102047 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIRgen: Set alignment correctly on bit-field accesses.
Daniel Dunbar [Thu, 22 Apr 2010 03:17:04 +0000 (03:17 +0000)]
IRgen: Set alignment correctly on bit-field accesses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102046 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIRgen: Rewrite bit-field access policy to not access data beyond the bounds of the...
Daniel Dunbar [Thu, 22 Apr 2010 02:35:46 +0000 (02:35 +0000)]
IRgen: Rewrite bit-field access policy to not access data beyond the bounds of the structure, which we also now verify as part of the post-layout consistency checks.
 - This fixes some pedantic bugs with packed structures, as well as major problems with -fno-bitfield-type-align.

 - Fixes PR5591, PR5567, and all known -fno-bitfield-type-align issues.

 - Review appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102045 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIRgen: Fix CGRecordLayout::print to print the bit-field infos in a consistent order.
Daniel Dunbar [Thu, 22 Apr 2010 02:35:36 +0000 (02:35 +0000)]
IRgen: Fix CGRecordLayout::print to print the bit-field infos in a consistent order.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102044 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert "Unify two diagnostics into one.", it breaks with an assertion failure on...
Daniel Dunbar [Thu, 22 Apr 2010 02:35:33 +0000 (02:35 +0000)]
Revert "Unify two diagnostics into one.", it breaks with an assertion failure on bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102043 91177308-0d34-0410-b5e6-96231b3b80d8