Eli Friedman
27ef75b0be
Handle an edge case involving the conditional operator and throw expressions. PR10582.
...
llvm-svn: 142047
2011-10-15 02:10:40 +00:00
Anton Korobeynikov
f82017f3fe
Missed tests for half FP support
...
llvm-svn: 142017
2011-10-14 23:32:50 +00:00
Eli Friedman
fde961dbf3
PR11124: Don't overwrite memory outside of a base class when performing zero-initialization before running its constructor.
...
llvm-svn: 141933
2011-10-14 02:27:24 +00:00
Richard Smith
9ca5c42582
Update all tests other than Driver/std.cpp to use -std=c++11 rather than
...
-std=c++0x. Patch by Ahmed Charles!
llvm-svn: 141900
2011-10-13 22:29:44 +00:00
Douglas Gregor
c7a3107baf
When performing a user-defined conversion via a constructor, be sure
...
to check whether the constructor is accessible. Fixes
<rdar://problem/10202900>.
llvm-svn: 141588
2011-10-10 22:41:00 +00:00
John McCall
0710e551ef
Record layout requires not just a definition, but a complete
...
definition. Assert this. Change IR generation to not try to
aggressively emit the IR translation of a record during its
own definition. Fixes PR10912.
llvm-svn: 141350
2011-10-07 02:39:22 +00:00
Eli Friedman
ed47406871
Move test, so it actually tests what it is supposed to (given that we don't have an AST verifier).
...
llvm-svn: 140620
2011-09-27 18:55:06 +00:00
Peter Collingbourne
085095f1ac
Move vtable dumper call to VTableBuilder ctor
...
llvm-svn: 140508
2011-09-26 01:57:00 +00:00
Peter Collingbourne
71c26936a0
Remove CodeGenVTables::ComputeVTableRelatedInformation dependency on CodeGen
...
llvm-svn: 140503
2011-09-26 01:56:36 +00:00
Sebastian Redl
12757ab4cb
Treat list-initialization of scalars as a first-class citizen in C++11.
...
Allow empty initializer lists for scalars, which mean value-initialization.
Constant evaluation for single-element and empty initializer lists for scalars.
Codegen for empty initializer lists for scalars.
Test case comes in next commit.
llvm-svn: 140459
2011-09-24 17:48:14 +00:00
Douglas Gregor
8a556ce512
Explicitly-defaulted copy/move constructors are not "implicit", but
...
they still need the logic to cope with array member
initialization. Fixes PR10720.
llvm-svn: 140302
2011-09-22 15:15:51 +00:00
John McCall
30909031a7
Enforce access control for conversion operators used in contextual
...
conversions (rather than just call-arguments).
llvm-svn: 140244
2011-09-21 08:36:56 +00:00
Bill Wendling
f0724e8e06
Throw the switch to convert clang to the new exception handling model!
...
This model uses the 'landingpad' instruction, which is pinned to the top of the
landing pad. (A landing pad is defined as the destination of the unwind branch
of an invoke instruction.) All of the information needed to generate the correct
exception handling metadata during code generation is encoded into the
landingpad instruction.
The new 'resume' instruction takes the place of the llvm.eh.resume intrinsic
call. It's lowered in much the same way as the intrinsic is.
llvm-svn: 140049
2011-09-19 20:31:14 +00:00
John McCall
28a5b326e1
In apple-kext mode, use external linkage for explicit template instantiations
...
instead of internal linkage.
llvm-svn: 140030
2011-09-19 18:05:26 +00:00
Richard Smith
20104048be
PR10304: Do not call destructors for data members from union destructors. Prior to C++11, this
...
has no effect since any such destructors must be trivial, and in C++11 such destructors must not
be called.
llvm-svn: 139997
2011-09-18 12:11:43 +00:00
Richard Smith
4037235429
Fix PR10531. Attach an initializer to anonymous unions, since the default constructor might not be trivial (if there is an in-class initializer for some member) and might be deleted.
...
llvm-svn: 139991
2011-09-18 00:06:34 +00:00
Devang Patel
ecaf9ac0bb
Emit debug info for c++0x nullptr.
...
llvm-svn: 139752
2011-09-14 23:14:14 +00:00
Eli Friedman
84d2812111
Re-commit r139643.
...
Make clang use Acquire loads and Release stores where necessary.
llvm-svn: 139650
2011-09-13 22:21:56 +00:00
Eli Friedman
acca089617
Revert r139643 while I look into it; it's breaking selfhost.
...
llvm-svn: 139648
2011-09-13 22:08:16 +00:00
Eli Friedman
f92b2e0714
Make clang use Acquire loads and Release stores where necessary.
...
llvm-svn: 139643
2011-09-13 21:31:32 +00:00
Devang Patel
ba15240e83
Update test to fix windows buildbot.
...
llvm-svn: 139513
2011-09-12 18:11:52 +00:00
Devang Patel
98ca8aeca6
Fix debug info encodings for char16_t and char32_t.
...
llvm-svn: 139502
2011-09-12 17:11:58 +00:00
Devang Patel
964d758d17
Emit debug info for wchar_t.
...
llvm-svn: 139443
2011-09-10 00:44:49 +00:00
Douglas Gregor
e0e9630e07
When extracting the callee declaration from a call expression, be sure
...
to look through SubstNonTypeTemplateParmExprs. Then, update the IR
generation of CallExprs to actually use CallExpr::getCalleeDecl()
rather than attempting to mimick its behavior (badly).
Fixes <rdar://problem/10063539>.
llvm-svn: 139185
2011-09-06 21:41:04 +00:00
Eli Friedman
cf9b1f6524
Rearrange code so that we pass the right pointer to delete[] when an exception is thrown constructing the array elements in an array new expression. Fixes PR10870.
...
llvm-svn: 139158
2011-09-06 18:53:03 +00:00
Richard Smith
3f9211d322
PR10506: Extend test for temporary cleanups in range-based for loop to cover the dependent case.
...
llvm-svn: 139109
2011-09-04 23:52:03 +00:00
Nick Lewycky
0112b11f5c
Don't try to emit unsupported templated friend declarations. They're unsupported
...
and may very well be dependent-types, triggering an assertion in debug info
codegen.
llvm-svn: 138970
2011-09-01 21:49:51 +00:00
John McCall
3480ef24d1
The size of struct UnwindException varies by platform with no
...
apparent general rule. Just special-case it as appropriate.
PR10789.
llvm-svn: 138792
2011-08-30 01:42:09 +00:00
John McCall
154a2fd3cb
Be sure to emit lvalue-to-rvalue casts for loads from x-values.
...
Doing this happens to disrupt the pattern that ARC was looking for
for move optimizations, so we need to fix that simultaneously.
llvm-svn: 138789
2011-08-30 00:57:29 +00:00
John McCall
29ad95b232
The lvalue-to-rvalue on structs in C++ is actually part
...
of default argument promotion and needs to happen unconditionally.
This is particularly semantically important in C++0x.
llvm-svn: 138691
2011-08-27 01:09:30 +00:00
John McCall
46759f4f46
Since the 'is aliased' bit is critical for correctness in C++, it
...
really shouldn't be optional. Fix the remaining place where a
temporary was being passed as potentially-aliased memory.
Fixes PR10756.
llvm-svn: 138627
2011-08-26 07:31:35 +00:00
John McCall
a8a39bc346
An initialization does not alias.
...
llvm-svn: 138624
2011-08-26 05:38:08 +00:00
John McCall
35e4f0cd0f
The allocated exception slot does not alias anything; should fix self-host.
...
llvm-svn: 138615
2011-08-26 00:46:38 +00:00
John McCall
a5efa7386a
Track whether an AggValueSlot is potentially aliased, and do not
...
emit call results into potentially aliased slots. This allows us
to properly mark indirect return slots as noalias, at the cost
of requiring an extra memcpy when assigning an aggregate call
result into a l-value. It also brings us into compliance with
the x86-64 ABI.
llvm-svn: 138599
2011-08-25 23:04:34 +00:00
Chandler Carruth
4e6bd3955f
Remove this test. It requires C++ standard library headers, which we'd
...
like to avoid within the Clang test suite, it doesn't verify the output
at all so it only servers as a test that Clang doesn't crash, and
finally all it does is declare a function that returns a vector and call
it. Probably the biggest thing being tested here is Clang's parsing of
the vector template, and we have lots of good template parsing tests. We
don't need another in codegen.
llvm-svn: 138197
2011-08-20 06:30:57 +00:00
NAKAMURA Takumi
d0dc49e640
test/CodeGenCXX/2003-11-25-ReturningOpaqueByValue.cpp: Mark XFAIL: win32.
...
FIXME: Avoid using system headers. clang cannot handle MS <vector> yet.
llvm-svn: 138190
2011-08-20 05:38:29 +00:00
Eric Christopher
50507663a6
Remove this file, it's not much of a test and string headers cause
...
problems on windows.
llvm-svn: 138166
2011-08-20 00:22:40 +00:00
Eric Christopher
aab7dffa12
Migrate, FileCheckize and update:
...
2003-11-02-WeakLinkage.cpp
2003-11-18-PtrMemConstantInitializer.cpp
2003-11-25-ReturningOpaqueByValue.cpp
2003-11-27-MultipleInheritanceThunk.cpp
2003-11-29-DuplicatedCleanupTest.cpp
2003-12-08-ArrayOfPtrToMemberFunc.cpp
2004-01-11-DynamicInitializedConstant.cpp
from llvm/test/FrontendC++.
llvm-svn: 138162
2011-08-20 00:17:18 +00:00
Eric Christopher
6672b33511
Migrate, FileCheckize and update:
...
2004-03-08-ReinterpretCastCopy.cpp
2004-03-09-UnmangledBuiltinMethods.cpp
2004-03-15-CleanupsAndGotos.cpp
2004-06-08-LateTemplateInstantiation.cpp
2004-09-27-CompilerCrash.cpp
2004-09-27-DidntEmitTemplate.cpp
2004-11-27-ExceptionCleanupAssertion.cpp
2004-11-27-FriendDefaultArgCrash.cpp
2005-01-03-StaticInitializers.cpp
from llvm/test/FrontendC++.
llvm-svn: 138157
2011-08-20 00:09:39 +00:00
Eric Christopher
19eb735e27
Modify the check line to be happier on windows.
...
llvm-svn: 138152
2011-08-19 23:46:18 +00:00
Eric Christopher
862f8ecf55
Remove dead file.
...
llvm-svn: 138150
2011-08-19 23:45:03 +00:00
Eric Christopher
3bf8310d42
Migrate, FileCheckize and update:
...
2005-02-11-AnonymousUnion.cpp
2005-02-13-BadDynamicInit.cpp
2005-02-14-BitFieldOffset.cpp
2005-02-19-BitfieldStructCrash.cpp
2005-02-19-UnnamedVirtualThunkArgument.cpp
2005-02-20-BrokenReferenceTest.cpp
2006-03-01-GimplifyCrash.cpp
2006-03-06-C++RecurseCrash.cpp
2006-09-12-OpaqueStructCrash.cpp
2006-10-30-ClassBitfield.cpp
2006-11-20-GlobalSymbols.cpp
2006-11-20-GlobalSymbols.ll
2006-11-30-ConstantExprCrash.cpp
from llvm/test/FrontendC++.
llvm-svn: 138148
2011-08-19 23:41:35 +00:00
Eric Christopher
925d593b60
Try removing xfail and xtarget to see if this brings back a couple of bots.
...
llvm-svn: 138139
2011-08-19 23:17:46 +00:00
Eric Christopher
a8cd70e21a
Migrate 2007-01-02-UnboundedArray.cpp from llvm/test/FrontendC++.
...
llvm-svn: 138138
2011-08-19 23:15:04 +00:00
Eric Christopher
17db038966
Migrate:
...
2007-01-06-PtrMethodInit.cpp
2007-04-05-PackedBitFields-1.cpp
2007-04-05-PackedBitFieldsOverlap-2.cpp
2007-04-05-PackedBitFieldsOverlap.cpp
2007-04-05-PackedBitFieldsSmall.cpp
2007-04-05-StructPackedFieldUnpacked.cpp
2007-04-10-PackedUnion.cpp
2007-04-14-FNoBuiltin.cpp
2007-05-03-VectorInit.cpp
2007-07-29-RestrictPtrArg.cpp
2007-07-29-RestrictRefArg.cpp
2007-09-10-RecursiveTypeResolution.cpp
from llvm/test/FrontendC++ and FileCheckize where appropriate.
llvm-svn: 138134
2011-08-19 23:08:33 +00:00
Eric Christopher
7e88fdfecc
Remove 2008-10-29-WrongOffset.cpp since it requires a header file on all
...
platforms.
llvm-svn: 138118
2011-08-19 22:25:04 +00:00
Eric Christopher
5478583ac1
Migrate 2007-10-01-StructResize.cpp from llvm/test/FrontendC++.
...
llvm-svn: 138117
2011-08-19 22:25:02 +00:00
Eric Christopher
cae25b58fc
Migrate 2008-01-12-VecInit.cpp from llvm/test/FrontendC++.
...
llvm-svn: 138114
2011-08-19 22:16:30 +00:00
Eric Christopher
88279b7eb6
Migrate 2008-05-07-CrazyOffsetOf.cpp from llvm/test/FrontendC++.
...
llvm-svn: 138113
2011-08-19 22:16:28 +00:00
Eric Christopher
fd4d7156ea
Migrate 2008-10-29-WrongOffset.cpp from llvm/test/FrontendC++.
...
llvm-svn: 138112
2011-08-19 22:16:25 +00:00