Douglas Gregor
a912197fff
Downgrade the error about re-opening an inline namespace as non-inline
...
to a warning, since apparently libstdc++'s debug mode does this (and
we can recover safely). Add a Fix-It to insert the "inline", just for kicks.
llvm-svn: 131732
2011-05-20 15:48:31 +00:00
Douglas Gregor
4385d8b0a2
Diagnose unexpanded parameter packs in return statements. This
...
manifested in a crash with blocks in PR9953, but it was a ticking time
bomb for normal functions, too. Fixes PR9953.
llvm-svn: 131731
2011-05-20 15:32:55 +00:00
Benjamin Kramer
85e1664fb2
sandybridge is now called corei7-avx
...
llvm-svn: 131729
2011-05-20 15:11:23 +00:00
Douglas Gregor
86394411d9
Clean up two comments
...
llvm-svn: 131727
2011-05-20 15:00:53 +00:00
Sebastian Redl
645d958035
Fix PR9941 for out-of-line template destructors too.
...
llvm-svn: 131722
2011-05-20 05:57:18 +00:00
Matt Beaumont-Gay
6c307aee7b
Undo enough of r131143 to make private copy ctor diags say "copy constructor" again
...
llvm-svn: 131706
2011-05-19 23:44:42 +00:00
Ted Kremenek
f377cb82f9
Teach RegionStore not to symbolic array values whose indices it cannot reason about.
...
llvm-svn: 131702
2011-05-19 23:37:58 +00:00
Devang Patel
e7ce54074f
Fix location of setter/getter synthesized for a property.
...
llvm-svn: 131701
2011-05-19 23:37:41 +00:00
Alexis Hunt
7957fdb60a
Revert r131672 until __underlying_type is properly implemented in the
...
template case.
llvm-svn: 131692
2011-05-19 22:52:25 +00:00
Alexis Hunt
d6cbf0d4be
Implement a __has_feature for __underlying_type
...
llvm-svn: 131672
2011-05-19 20:48:13 +00:00
Joerg Sonnenberger
3028e46e57
Correction for r131662, the GNU as option is --fatal-warnings.
...
llvm-svn: 131671
2011-05-19 20:46:39 +00:00
Joerg Sonnenberger
b487d2d815
Support -fatal-warnings for the assembler frontend
...
llvm-svn: 131662
2011-05-19 18:42:29 +00:00
Sebastian Redl
8035d1c435
Fix PR9941 again, this time for templates.
...
llvm-svn: 131640
2011-05-19 16:25:27 +00:00
David Chisnall
b8f65e25d8
- Fixes openSUSE detection for 11.4 and upcoming 12.1
...
- Adds gcc 4.6 to gcc list so that linking will work on openSUSE 12.1
Patch by İsmail Dönmez!
llvm-svn: 131637
2011-05-19 13:26:33 +00:00
David Chisnall
f62a8d0fb7
Add paths used by openSuSE 12.1
...
Patch by Ismail Dönmez!
llvm-svn: 131636
2011-05-19 12:04:49 +00:00
Alexis Hunt
4a2570792c
Implement __underlying_type for libc++.
...
llvm-svn: 131633
2011-05-19 05:37:45 +00:00
Sebastian Redl
623ea82a6b
Reapply r121528, fixing PR9941 by delaying the exception specification check for destructors until the class is complete and destructors have been adjusted.
...
llvm-svn: 131632
2011-05-19 05:13:44 +00:00
Ted Kremenek
5f06955aa0
Teach static analyzer to analyze Objective-C methods in category implementations.
...
llvm-svn: 131614
2011-05-19 00:56:53 +00:00
Eli Friedman
2f1e9e618c
Make __builtin_shufflevector and -ftrapv work correctly together. PR9945.
...
llvm-svn: 131611
2011-05-19 00:37:32 +00:00
Alexis Hunt
1647354ec9
After consultation with doug, revert r131515.
...
llvm-svn: 131574
2011-05-18 20:57:13 +00:00
Alexis Hunt
d0cdd1fab1
Revert r121528 as it breaks a simple testcase, which leads to, among
...
other things, libcxx not building.
llvm-svn: 131573
2011-05-18 20:57:11 +00:00
Roman Divacky
c161735bdf
Add ARMTargetCodeGenInfo::initDwarfEHRegSizeTable() defining 16 32bit regs.
...
llvm-svn: 131558
2011-05-18 19:36:54 +00:00
Sebastian Redl
b900f04ccc
Implement implicit exception specifications of destructors.
...
llvm-svn: 131528
2011-05-18 05:20:56 +00:00
Alexis Hunt
e77a28f7e1
Implement an additional fix for infinite recursion of deleted special
...
member functions by making sure that they're on the record before
checking for deletion.
Also make sure source locations are valid to avoid crashes.
Unfortunately, the declare-all-implicit-members approach is still
required in order to ensure that dependency loops do not result in
incorrectly deleting functions (since they are to be deleted at the
declaration point per the standard).
Fixes PR9917
llvm-svn: 131520
2011-05-18 03:41:58 +00:00
Alexis Hunt
2430a6fb91
Force declaration of implicit members in C++0x mode.
...
I hear at least one person crying out in anguish, but it's unfortunately
necessary to avoid infinite loops with mutually dependent constructors
trying to call each other and determine if they are deleted.
It might be possible to go back to the old behavior if we can implement
part-of-file lookups efficiently, or if a solution is discovered by
which we can safely detect and avoid infinite recusion.
llvm-svn: 131515
2011-05-18 01:06:45 +00:00
Eric Christopher
b29614b357
Add some support for RHEL5 systems.
...
llvm-svn: 131505
2011-05-17 23:06:53 +00:00
Bill Wendling
28b9e8b3a8
Conditionalize the use of 4.4 or 4.2 format based on the target.
...
<rdar://problem/8107317>
llvm-svn: 131504
2011-05-17 23:06:23 +00:00
Fariborz Jahanian
ccdfa39005
Code cleanup of my last patch.
...
llvm-svn: 131499
2011-05-17 22:46:11 +00:00
Fariborz Jahanian
7bd3d1c49b
Patch to fix IR-gen crash generating structure ABI which implements
...
user specified string class via -fconstant-string-class option.
pr9914.
llvm-svn: 131496
2011-05-17 22:21:16 +00:00
Argyrios Kyrtzidis
8b7252a8b3
Fix a nasty bug where inside StringLiteralParser:
...
1. We would assume that the length of the string literal token was at least 2
2. We would allocate a buffer with size length-2
And when the stars aligned (one of which would be an invalid source location due to stale PCH)
The length would be 0 and we would try to allocate a 4GB buffer.
Add checks for this corner case and a bunch of asserts.
(We really really should have had an assert for 1.).
Note that there's no test case since I couldn't get one (it was major PITA to reproduce),
maybe later.
llvm-svn: 131492
2011-05-17 22:09:56 +00:00
Argyrios Kyrtzidis
f15eac1110
Do some safety checks.
...
llvm-svn: 131491
2011-05-17 22:09:53 +00:00
Eli Friedman
af9b325d23
For calls returning first-class aggregates, store by element instead of creating aggregate stores in common cases. This is more friendly to fast-isel.
...
llvm-svn: 131490
2011-05-17 21:08:01 +00:00
John McCall
3597b6340c
Revert r131434, my commit disabling the complete-object constructor
...
optimization for abstract classes; there was a misunderstanding, and
it turns out that there are no kexts which rely on this.
llvm-svn: 131489
2011-05-17 21:05:49 +00:00
Alexis Hunt
604aeb3849
Fix some minor bugs and add a lot more test cases for defaulted
...
constructors, including two more FIXMEs (one of which I don't actually
understand).
llvm-svn: 131487
2011-05-17 20:44:43 +00:00
Rafael Espindola
35ab91cc89
Fix comment.
...
llvm-svn: 131478
2011-05-17 19:06:58 +00:00
Rafael Espindola
f934f98ad2
The logic about -static is darwin only. For now assume that all non
...
darwin assembler can handle cfi. Add a test.
llvm-svn: 131464
2011-05-17 16:26:17 +00:00
Argyrios Kyrtzidis
d42411fa19
Revert r131447, see if it fixes the buildbot.
...
llvm-svn: 131450
2011-05-17 02:17:52 +00:00
Argyrios Kyrtzidis
ceee5e8133
Inside isEmptyRecord function, for CXXRecordDecl just check the isEmpty bit.
...
llvm-svn: 131447
2011-05-17 00:46:40 +00:00
Argyrios Kyrtzidis
49b35de2a1
Reapply the commits that r131401 reverted and add a fix for PR9927.
...
llvm-svn: 131446
2011-05-17 00:46:38 +00:00
Devang Patel
f9076f3b45
Set up appropriate context for member function.
...
Radar 9440721
llvm-svn: 131441
2011-05-17 00:20:09 +00:00
Alexis Hunt
8b4551844c
Implement some tests for defaulted constructors. To do this I had to
...
suppress an error we were previously emitting on valid union code.
llvm-svn: 131440
2011-05-17 00:19:05 +00:00
Ted Kremenek
c249c411c2
Fix crash on C++ code when compiling with -finstrument-functions.
...
llvm-svn: 131435
2011-05-16 23:49:20 +00:00
John McCall
2ccfe89b3e
Emit complete-object constructors for abstract classes in kext mode for
...
reasons that honestly really, really need to be looked into.
llvm-svn: 131434
2011-05-16 23:34:46 +00:00
Alexis Hunt
97ab554c1c
Implement the new C++0x rules for non-trivial things in unions so that
...
my defaulted constructor tests stop yelling at me about them.
llvm-svn: 131432
2011-05-16 22:41:40 +00:00
Manuel Klimek
c9675152b3
Pulls the common part of the clang-check example into Tooling, to allow new tools to be implemented without duplicating the boilerplate.
...
llvm-svn: 131425
2011-05-16 21:33:46 +00:00
Joerg Sonnenberger
637603a7cc
Make the triple an explicit argument of FindTargetProgramPath.
...
Preserve the original triple in the NetBSD toolchain when using -m32 or
-m64 and the resulting effective target is different from the triple it
started with. This allows -m32 to use the same assembler/linking in
cross-compiling mode and avoids confusion about passing down target
specific flags in that case like --32.
llvm-svn: 131404
2011-05-16 13:35:02 +00:00
Rafael Espindola
c0d4cb17c1
Revert 131377, 131369 and 131365.
...
131365 caused PR9927.
llvm-svn: 131401
2011-05-16 12:30:54 +00:00
Anders Carlsson
d6f1518cc9
Fix another regression from the "skip vtable pointer initialization"
...
optimization. Make sure to require a vtable when trying to get the address
of a VTT, otherwise we would never end up emitting the VTT.
llvm-svn: 131400
2011-05-16 04:08:36 +00:00
John McCall
7ec4b4342c
Don't actually emit calls to the reserved global placement new and delete
...
operators; their semantics are guaranteed by the language.
If someone wants to argue that freestanding compiles shouldn't recognize
this, I might be convinceable.
llvm-svn: 131395
2011-05-16 01:05:12 +00:00
Alexis Hunt
f9933e80f2
main() exists in hosted, not freestanding implementations. Fixes the
...
build.
llvm-svn: 131390
2011-05-15 20:59:31 +00:00