Commit Graph

28 Commits

Author SHA1 Message Date
Richard Smith b4d2a15d17 If a defaulted special member is implicitly deleted, check whether it's
overriding a non-deleted virtual function. The existing check for this doesn't
catch this case, because it fires before we mark the method as deleted.

llvm-svn: 178563
2013-04-02 19:38:47 +00:00
Bill Wendling 5ea6a89e52 Try to get buildbots to pass these tests.
llvm-svn: 175784
2013-02-21 19:44:18 +00:00
Bill Wendling 4467d79ad4 Attempt to clean up tests for non-X86 platforms.
llvm-svn: 175652
2013-02-20 19:30:01 +00:00
Bill Wendling cc5224ceb8 Remove target-specific features.
llvm-svn: 175610
2013-02-20 08:01:34 +00:00
Bill Wendling c33fc4c004 Modify the tests to use attribute group references instead of listing the
function attributes.

llvm-svn: 175606
2013-02-20 07:22:19 +00:00
Richard Smith 66f3ac9d21 Rework implementation of DR1492: Apply the resolution to operator delete too,
since it also has an implicit exception specification. Downgrade the error to
an extwarn, since at least for operator delete, system headers like to declare
it as 'noexcept' whereas the implicit definition does not have an explicit
exception specification. Move the exception specification for user-declared
'operator delete' functions from the type-as-written into the type, to reflect
reality and to allow us to detect whether there was an implicit exception spec
or not.

llvm-svn: 166372
2012-10-20 08:26:51 +00:00
Andy Gibbs c6e68daac0 Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive.
llvm-svn: 166280
2012-10-19 12:44:48 +00:00
Richard Smith 1ee6352788 DR1492: In a definition of a destructor, the exception specification must be
explicitly specified iff it was specified in the declaration.

llvm-svn: 166071
2012-10-16 23:30:16 +00:00
Richard Smith c5f98f343b [class.copy]p23: Fix an assertion caused by incorrect argument numbering in a
diagnostic, add a test for this paragraph, and tighten up the diagnostic wording
a little.

llvm-svn: 155784
2012-04-29 06:32:34 +00:00
Richard Smith 6f1e2c6d19 Finish PR10217: Ensure we say that a special member was implicitly, not
explicitly, deleted in all relevant cases, and explain why.

llvm-svn: 153894
2012-04-02 20:59:25 +00:00
Richard Smith 852265ff1c PR10217: Provide diagnostics explaining why an implicitly-deleted special
member function is deleted.

llvm-svn: 153773
2012-03-30 20:53:28 +00:00
Richard Smith 921bd20ddd Ensure that we delete destructors in the right cases. Specifically:
- variant members with nontrivial destructors make the containing class's
   destructor deleted
 - check for a virtual destructor after checking for overridden methods in the
   base class(es)
 - check for an inaccessible operator delete for a class with a virtual
   destructor.

Do not try to call an anonymous union field's destructor from the destructor of
the containing class.

llvm-svn: 151483
2012-02-26 09:11:52 +00:00
David Blaikie 1d578782fa Support decltype in pseudo destructors and dependent destructor calls.
Reviewed by Eli Friedman.

llvm-svn: 146738
2011-12-16 16:03:09 +00:00
David Blaikie 08608f6744 Fix/test decltype dtor calls with invalid base expression.
llvm-svn: 146354
2011-12-12 04:13:55 +00:00
David Blaikie ecd8a94acf Decltype in non-pseudo (& non-dependent) dtor calls.
llvm-svn: 146155
2011-12-08 16:13:53 +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
Eli Friedman 9ed3cde1fa Start fixing up clang tests to work on the clang-native-arm-cortex-a9 builder.
llvm-svn: 132691
2011-06-06 21:23:05 +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
Sebastian Redl 8035d1c435 Fix PR9941 again, this time for templates.
llvm-svn: 131640
2011-05-19 16:25:27 +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
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
Sebastian Redl b900f04ccc Implement implicit exception specifications of destructors.
llvm-svn: 131528
2011-05-18 05:20:56 +00:00
Douglas Gregor db9d664244 Rvalue references for *this:
- Add ref-qualifiers to the type system; they are part of the
  canonical type. Print & profile ref-qualifiers
  - Translate the ref-qualifier from the Declarator chunk for
    functions to the function type. 
  - Diagnose mis-uses of ref-qualifiers w.r.t. static member
  functions, free functions, constructors, destructors, etc.
  - Add serialization and deserialization of ref-qualifiers.

llvm-svn: 124281
2011-01-26 05:01:58 +00:00
John McCall 3faf1cf3ea Add a test case for P%7346, which was fixed by not doing the operator
delete lookup until the end of the class definition.

llvm-svn: 110176
2010-08-04 01:07:02 +00:00
John McCall deb646ebb5 Only look up an 'operator delete' on the definition of a destructor, not on
a declaration.

llvm-svn: 110175
2010-08-04 01:04:25 +00:00
John McCall 66a8759400 Look through using declarations when deciding whether to use an operator
delete for a virtual destructor.  Diagnose ambiguities.

Fixes PR7803.

llvm-svn: 110173
2010-08-04 00:31:26 +00:00
Daniel Dunbar 8fbe78f6fc Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Sebastian Redl 931e0bd331 Pretend destructors are const and volatile. This allows calling them with const and/or volatile objects. Fixes PR5548.
llvm-svn: 89244
2009-11-18 20:55:52 +00:00