Commit Graph

68 Commits

Author SHA1 Message Date
Richard Smith c7f9bb1757 Tests for DR501-525.
llvm-svn: 206123
2014-04-13 00:40:32 +00:00
Richard Smith 651512995e More tests for DR1.
llvm-svn: 205339
2014-04-01 18:32:16 +00:00
Richard Smith 5557f6d678 Add failing testcase for DR305. Looks like we didn't implement the resolution
here in the simple-template-id case.

llvm-svn: 205273
2014-04-01 01:58:11 +00:00
David Majnemer ee4f4025c3 Sema: Implement DR317
Summary:
Declaring a function as inline after it has been defined is in violation
of [dcl.fct.spec]p4.  The program would get a strong definition instead
of getting a function with linkonce_odr linkage.

Reviewers: rsmith

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3220

llvm-svn: 205129
2014-03-30 06:44:54 +00:00
Richard Smith 6190ee65e1 Tests for dr475-dr500.
llvm-svn: 205127
2014-03-30 06:05:29 +00:00
Richard Smith 17710217fa Tests for DR450-475.
llvm-svn: 204217
2014-03-19 08:04:12 +00:00
Richard Smith 6a70c6420f Remove 'REQUIRES: LP64' from these tests and use a more targeted fix.
llvm-svn: 204096
2014-03-18 00:30:09 +00:00
Richard Smith 650459721a Remove unused variable from test.
llvm-svn: 204051
2014-03-17 16:53:13 +00:00
NAKAMURA Takumi 23b5eaf706 clang/test/CXX/drs: Add "REQUIRES:LP64" to a couple of tests in r204033. [PR8833]
llvm-svn: 204038
2014-03-17 11:55:46 +00:00
Richard Smith ba41a73993 Tests for DR400-450.
llvm-svn: 204033
2014-03-17 08:20:10 +00:00
Richard Smith 4a558a44a0 Tests for DR389-399.
llvm-svn: 203771
2014-03-13 08:40:37 +00:00
Richard Smith 66204ecff9 DR1346: a parenthesized braced-init-list cannot be used as the initializer when
performing auto type deduction.

llvm-svn: 203683
2014-03-12 17:42:45 +00:00
Richard Smith b81b196a58 Tests for DR381-388.
llvm-svn: 203549
2014-03-11 07:49:32 +00:00
Ismail Pazarbasi 025f428c73 Replace "can not" with "cannot" in diagnostics messages.
llvm-svn: 203302
2014-03-07 22:36:23 +00:00
Richard Smith faf156ad15 Tests for DR370-380.
Also promote a couple of Warnings on ill-formed code found by this testing to
ExtWarns.

llvm-svn: 203021
2014-03-05 22:54:58 +00:00
Richard Smith 2f0e4e78b2 Add tests for newly-resolved core issues <= 370.
llvm-svn: 202889
2014-03-04 21:14:30 +00:00
Hans Wennborg 3d79154aec [Win32 ABI] Defer operator delete checks until vtable is marked used
We were previously checking at every destructor declaration, but that was a bit
excessive. Since the deleting destructor is emitted with the vtable, do the
check when the vtable is marked used.

Differential Revision: http://llvm-reviews.chandlerc.com/D2851

llvm-svn: 202046
2014-02-24 15:58:24 +00:00
David Majnemer f703b588b8 Implement DR577
DR18 previously forebode typedefs to be used as parameter types if they
were of type 'void'.  DR577 allows 'void' to be used as a function
parameter type regardless from where it came.

llvm-svn: 201631
2014-02-19 03:00:56 +00:00
Richard Smith 4025944307 PR13110: Add a -Wignored-qualifiers warning when ignoring a const, volatile, or
_Atomic qualifier applied to a reference type.

llvm-svn: 201620
2014-02-19 00:13:27 +00:00
Richard Smith cc4a72ecd2 Tests for DR351-370, plus update DR status page to match the latest core issue list.
llvm-svn: 201106
2014-02-10 19:53:17 +00:00
Richard Smith 18819307d3 DR101, PR12770: If a function is declared in the same context as a
using-declaration, and they declare the same function (either because
the using-declaration is in the same namespace as the declaration it
imports, or because they're both extern "C"), they do not conflict.

llvm-svn: 200897
2014-02-06 01:31:33 +00:00
Richard Smith c94410bc8d Tests for DR331-350.
llvm-svn: 200678
2014-02-03 06:34:23 +00:00
Richard Smith 91dfaacd38 Implement DR329. We already did the right thing here in C++98 mode, but r104014
(which implemented the DR) was disabled in C++11.

llvm-svn: 200673
2014-02-03 02:37:59 +00:00
Richard Smith 9f38709193 Tests for DR321-330.
llvm-svn: 200672
2014-02-03 02:13:49 +00:00
Richard Smith 6938adbd16 Tests for DR301-320.
llvm-svn: 200671
2014-02-03 01:23:27 +00:00
Richard Smith 6a6a4bbdd4 PR17052 / DR1560 (+DR1550): In a conditional expression between a glvalue and a
throw-expression, the result is also a glvalue and isn't unnecessarily coerced
to a prvalue.

llvm-svn: 200189
2014-01-27 04:19:56 +00:00
Hans Wennborg c9bd88e681 Remove the -cxx-abi command-line flag.
This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples,
Itanium otherwise. It's no longer possible to do weird combinations.

To be able to run a test with a specific ABI without constraining it to a
specific triple, new substitutions are added to lit: %itanium_abi_triple and
%ms_abi_triple can be used to get the current target triple adjusted to the
desired ABI. For example, if the test suite is running with the i686-pc-win32
target, %itanium_abi_triple will expand to i686-pc-mingw32.

Differential Revision: http://llvm-reviews.chandlerc.com/D2545

llvm-svn: 199250
2014-01-14 19:35:09 +00:00
Hans Wennborg 9125b08b52 Update tests in preparation for using the MS ABI for Win32 targets
In preparation for making the Win32 triple imply MS ABI mode,
make all tests pass in this mode, or make them use the Itanium
mode explicitly.

Differential Revision: http://llvm-reviews.chandlerc.com/D2401

llvm-svn: 199130
2014-01-13 19:48:13 +00:00
Alp Toker 6ed7251683 Revert "Don't require -re suffix on -verify directives with regexes."
This patch was submitted to the list for review and didn't receive a LGTM.

(In fact one explicit objection and one query were raised.)

This reverts commit r197295.

llvm-svn: 197299
2013-12-14 01:07:05 +00:00
Hans Wennborg 9b395ef284 Don't require -re suffix on -verify directives with regexes.
Differential Revision: http://llvm-reviews.chandlerc.com/D2392

llvm-svn: 197295
2013-12-14 00:46:53 +00:00
Hans Wennborg cda4b6dd00 Change semantics of regex expectations in the diagnostic verifier
Previously, a line like

  // expected-error-re {{foo}}

treats the entirety of foo as a regex. This is inconvenient when matching type
names containing regex characters. For example, to match
"void *(class test8::A::*)(void)" inside such a regex, one would have to type
"void \*\(class test8::A::\*\)\(void\)".

This patch changes the semantics of expected-error-re to only treat the parts
of the directive wrapped in double curly braces as regexes. This avoids the
escaping problem and leads to nicer patterns for those cases; see e.g. the
change to test/Sema/format-strings-scanf.c.

(The balanced search for closing }} of a directive also makes us handle the
full directive in test\SemaCXX\constexpr-printing.cpp:41 and :53.)

Differential Revision: http://llvm-reviews.chandlerc.com/D2388

llvm-svn: 197092
2013-12-11 23:40:50 +00:00
Richard Smith ab44d5badf Implement DR1460: fix handling of default initializers in unions; don't allow
more than one such initializer in a union, make mem-initializers override
default initializers for other union members, handle anonymous unions with
anonymous struct members better. Fix a couple of semi-related bugs exposed by
the tests for same.

llvm-svn: 196892
2013-12-10 08:25:00 +00:00
Richard Smith a230224be4 Implement DR482: namespace members can be redeclared with a qualified name
within their namespace, and such a redeclaration isn't required to be a
definition any more.

Update DR status page to say Clang 3.4 instead of SVN and add new Clang 3.5
category (but keep Clang 3.4 yellow for now).

llvm-svn: 196481
2013-12-05 07:51:02 +00:00
Richard Smith 72bfbd8615 Fix several crash-on-invalids when using template-ids that aren't
simple-template-ids (eg, 'operator+<int>') in weird places.

llvm-svn: 196333
2013-12-04 00:28:23 +00:00
Richard Smith 30f5336ba8 Fix buildbot.
llvm-svn: 195703
2013-11-26 00:40:46 +00:00
Richard Smith 458eb55e55 Fix test failure on targets where size_t is unsigned int.
llvm-svn: 195673
2013-11-25 18:23:23 +00:00
Richard Smith ce42084402 Tests for core issues 270-300.
llvm-svn: 195626
2013-11-25 08:07:41 +00:00
Hans Wennborg 84fe12d1e9 Provide better diagnostic wording for initializers on static
data member definitions when the variable has an initializer
in its declaration.

For the following code:

  struct S {
    static const int x = 42;
  };
  const int S::x = 42;

This patch changes the diagnostic from:

  a.cc:4:14: error: redefinition of 'x'
  const int S::x = 42;
               ^
  a.cc:2:20: note: previous definition is here
    static const int x = 42;
                     ^
to:

  a.cc:4:18: error: static data member 'x' already has an initializer
  const int S::x = 42;
                   ^
  a.cc:2:24: note: previous initialization is here
    static const int x = 42;
                         ^

Differential Revision: http://llvm-reviews.chandlerc.com/D2235

llvm-svn: 195306
2013-11-21 03:17:44 +00:00
NAKAMURA Takumi 060f87fe73 clang/test/CXX/drs/dr2xx.cpp: Suppress this for targeting LLP64 due to __SIZE_TYPE__.
Line 559: 'long long' is a C++11 extension
  Line 566: 'long long' is a C++11 extension
  Line 674: 'long long' is a C++11 extension

See also PR13819.

llvm-svn: 195005
2013-11-18 12:58:38 +00:00
Richard Smith 5327b86430 Tests for core issues 251-270.
llvm-svn: 194989
2013-11-18 05:24:03 +00:00
Richard Smith 3cde3d245a Tests for core issue 241-250.
llvm-svn: 194951
2013-11-17 06:39:43 +00:00
Richard Smith 7101fd0e56 Tests for core issues 224-240.
llvm-svn: 194946
2013-11-17 02:50:30 +00:00
Richard Smith b09a4fe192 Tests for core issue 216-223.
llvm-svn: 194795
2013-11-15 08:55:01 +00:00
Richard Smith 00f5d8927b DR408: If a static data member of incomplete array type is declared in a class
template, that member has a dependent type (even if we can see the definition
of the member of the primary template), because the array size could change in
a member specialization.

Patch by Karthik Bhat!

llvm-svn: 194740
2013-11-14 22:40:45 +00:00
Richard Smith 8c98c1e704 Tests for core issue 201-215.
llvm-svn: 194458
2013-11-12 09:16:15 +00:00
NAKAMURA Takumi 421753fea7 clang/test/CXX/drs/dr1xx.cpp: Add explicit triple x86_64-unknown-unknown to satisfy check7a and check8a since r194240.
For i686 targets and LLP64 targets, we can see;
  error: 'error' diagnostics seen but not expected:
    File clang/test/CXX/drs/dr1xx.cpp Line 761: 'check7a' declared as an array with a negative size
    File clang/test/CXX/drs/dr1xx.cpp Line 765: 'check8a' declared as an array with a negative size
  2 errors generated.

llvm-svn: 194246
2013-11-08 05:16:50 +00:00
Richard Smith c8f7fd10a9 Tests for core issue 170-200.
llvm-svn: 194240
2013-11-08 02:05:54 +00:00
Richard Smith 786d8a26f2 Tests for CWG issue 165-170.
llvm-svn: 194215
2013-11-07 19:26:14 +00:00
Richard Smith 14bdd7a925 Tests for DR150 - DR165.
llvm-svn: 194192
2013-11-07 06:24:09 +00:00
Richard Smith 8b86f2d401 Implement final resolution of DR1402: implicitly-declared move operators that
would be deleted are still declared, but are ignored by overload resolution.

Also, don't delete such members if a subobject has no corresponding move
operation and a non-trivial copy. This causes us to implicitly declare move
operations in more cases, but risks move-assigning virtual bases multiple
times in some circumstances (a warning for that is to follow).

llvm-svn: 193969
2013-11-04 01:48:18 +00:00