summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/drs
Commit message (Collapse)AuthorAgeFilesLines
...
* Generate a diagnostic when a catch handler cannot execute due to class ↵Aaron Ballman2015-04-081-2/+2
| | | | | | hierarchy inversion with regards to other catch handlers for the same block. llvm-svn: 234375
* Mark DR777 only as fixed in clang SVN.Benjamin Kramer2015-03-271-1/+1
| | | | llvm-svn: 233391
* [Sema] Implement DR777Benjamin Kramer2015-03-271-0/+20
| | | | | | | | A parameter pack after a default argument is now valid. PR23029. llvm-svn: 233377
* C++14: Disable sized deallocation by default due to ABI breakageReid Kleckner2015-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are no widely deployed standard libraries providing sized deallocation functions, so we have to punt and ask the user if they want us to use sized deallocation. In the future, when such libraries are deployed, we can teach the driver to detect them and enable this feature. N3536 claimed that a weak thunk from sized to unsized deallocation could be emitted to avoid breaking backwards compatibility with standard libraries not providing sized deallocation. However, this approach and other variations don't work in practice. With the weak function approach, the thunk has to have default visibility in order to ensure that it is overridden by other DSOs providing sized deallocation. Weak, default visibility symbols are particularly expensive on MachO, so John McCall was considering disabling this feature by default on Darwin. It also changes behavior ELF linking behavior, causing certain otherwise unreferenced object files from an archive to be pulled into the link. Our second approach was to use an extern_weak function declaration and do an inline conditional branch at the deletion call site. This doesn't work because extern_weak only works on MachO if you have some archive providing the default value of the extern_weak symbol. Arranging to provide such an archive has the same challenges as providing the symbol in the standard library. Not to mention that extern_weak doesn't really work on COFF. Reviewers: rsmith, rjmccall Differential Revision: http://reviews.llvm.org/D8467 llvm-svn: 232788
* Mark DR1940 as implementedDavid Majnemer2015-02-191-0/+9
| | | | llvm-svn: 229829
* Mark DR1947 as implementedDavid Majnemer2015-02-191-0/+8
| | | | llvm-svn: 229828
* Mark DR1948 as implementedDavid Majnemer2015-02-191-0/+6
| | | | llvm-svn: 229827
* Mark DR1994 as a duplicate of DR529David Majnemer2015-02-191-0/+2
| | | | llvm-svn: 229826
* Mark DR1968 as implementedDavid Majnemer2015-02-191-0/+8
| | | | llvm-svn: 229825
* DR1467: If aggregate initialization encounters an initializer list for whichRichard Smith2015-02-161-0/+7
| | | | | | | | subobject initialization is not possible, be sure to note the overall initialization as having failed so that overload resolution knows that the relevant candidate is not viable. llvm-svn: 229353
* Partial revert of r229336; this wasn't intended to go in.Aaron Ballman2015-02-151-2/+2
| | | | llvm-svn: 229338
* Removing LLVM_EXPLICIT, as MSVC 2012 was the last reason for requiring the ↵Aaron Ballman2015-02-151-2/+2
| | | | | | macro. NFC; Clang edition. llvm-svn: 229336
* Update cxx_dr_status to cover dr1748 and add test.Richard Smith2015-02-141-0/+35
| | | | llvm-svn: 229229
* More for DR1467: In C++, when initializing an element of an aggregate,Richard Smith2015-02-121-0/+3
| | | | | | | | | always use the normal copy-initialization rules. Remove a special case that tries to stay within the list initialization checker here; that makes us do the wrong thing when list-initialization of an aggregate would not perform aggregate initialization. llvm-svn: 228897
* Improve the "braces around scalar init" warning to determine whether to warnRichard Smith2015-02-121-1/+1
| | | | | | | | based on whether "redundant" braces are ever reasonable as part of the initialization of the entity, rather than whether the initialization is "top-level". In passing, add a warning flag for it. llvm-svn: 228896
* PR22465: when performing list-initialization for a class type C, if we see anRichard Smith2015-02-051-0/+10
| | | | | | | | | | initializer of the form {x}, where x is of type C or a type derived from C, perform *non-list* initialization of the entity from x, but create a CXXConstructExpr that knows that we used list-initialization syntax. Plus some fixes to ensure we mangle correctly in this and related cases. llvm-svn: 228276
* Re-arrange DR test cases, and update DR status page.Larisse Voufo2015-01-284-146/+170
| | | | llvm-svn: 227279
* Implement the remaining portion of DR1467 from r227022. I may have ↵Larisse Voufo2015-01-271-10/+134
| | | | | | overlooked a few things, but this implementation comes straight from the DR resolution itself. llvm-svn: 227224
* DR1902: if overload resolution recurses, and the inner overload resolutionRichard Smith2015-01-271-0/+38
| | | | | | | selects a deleted function, the outer function is still a candidate even though the initialization sequence is "otherwise ill-formed". llvm-svn: 227169
* First steps in implementing DR1467: List-initialization of aggregate from ↵Larisse Voufo2015-01-241-0/+123
| | | | | | | | | | same-type object. Only the first two items for now, changing Sections 8.5.4 [dcl.init.list] paragraph 3 and 13.3.1.7 [over.match.list] paragraph 1, so that defining class objects and character arrays using uniform initialization syntax is actually treated as list initialization and before it is treated aggregate initialization. llvm-svn: 227022
* PR6037Nathan Sidwell2015-01-191-1/+1
| | | | | | Warn on inaccessible direct base llvm-svn: 226423
* PR22208: On FreeBSD systems, __STDC_MB_MIGHT_NEQ_WC__ is expected to be definedRichard Smith2015-01-131-0/+2
| | | | | | | | | | | even though every basic source character literal has the same numerical value as a narrow or wide character literal. It appears that the FreeBSD folks are trying to use this macro to mean something other than what the relevant standards say it means, but their usage is conforming, so put up with it. llvm-svn: 225751
* DR1048: drop top-level cv-qualifiers when deducing the return type of aRichard Smith2014-12-191-0/+18
| | | | | | lambda-expression in C++11, to match the C++14 rules. llvm-svn: 224620
* PR21969: Improve diagnostics for a conversion function that has any pieces of aRichard Smith2014-12-191-1/+1
| | | | | | declared return type (including a trailing-return-type in C++14). llvm-svn: 224561
* Add missing testcase from r224388.Richard Smith2014-12-171-0/+19
| | | | llvm-svn: 224401
* DR1684: a constexpr member function need not be a member of a literal class ↵Richard Smith2014-12-163-5/+5
| | | | | | type. llvm-svn: 224388
* Diagnose function template definitions inside functionsReid Kleckner2014-12-151-1/+1
| | | | | | | | | | | | | | | The parser can only be tricked into parsing a function template definition by inserting a typename keyword before the function template declaration. This used to make us crash, and now it's fixed. While here, remove an unneeded boolean parameter from ParseDeclGroup. This boolean always corresponded to non-typedef declarators at file scope. ParseDeclGroup already has precise diagnostics for the function definition typedef case, so we can let that through. Fixes PR21839. llvm-svn: 224287
* DR1891, PR21787: a lambda closure type has no default constructor, rather thanRichard Smith2014-12-101-0/+24
| | | | | | having a deleted default constructor. llvm-svn: 223953
* [c++1z] Most of N4268 (allow constant evaluation for non-type template ↵Richard Smith2014-11-264-16/+40
| | | | | | | | | arguments). We don't yet support pointer-to-member template arguments that have undergone pointer-to-member conversions, mostly because we don't have a mangling for them yet. llvm-svn: 222807
* PR21437, final part of DR1330: delay-parsing of exception-specifications. ThisRichard Smith2014-11-131-6/+6
| | | | | | | is a re-commit of Doug's r154844 (modernized and updated to fit into current Clang). llvm-svn: 221918
* [c++1z] Implement nested-namespace-definitions.Richard Smith2014-11-081-2/+8
| | | | | | | | | | | | | This allows 'namespace A::B { ... }' as a shorthand for 'namespace A { namespace B { ... } }'. We already supported this correctly for error recovery; promote that support to a full implementation. This is not the right implementation: we do not maintain source fidelity because we desugar the nested namespace definition in the parser. This is tricky to avoid, since the definition genuinely does inject one named entity per level in the namespace name. llvm-svn: 221574
* PR21327 / C++ DR1652 / C++ DR73: comparing a past-the-end pointer for oneRichard Smith2014-10-211-1/+1
| | | | | | | | complete object to a pointer to the start of another complete object does not evaluate to the constant 'false'. All other comparisons between the addresses of subobjects of distinct complete objects still do. llvm-svn: 220343
* Per comments on PR12350, move DR244 back from 'done' to 'partial' and add ↵Richard Smith2014-10-171-1/+23
| | | | | | tests showing what we get wrong. llvm-svn: 220009
* Tests for DR600-640.Richard Smith2014-09-291-0/+347
| | | | llvm-svn: 218591
* Run DR tests in C++17 mode too.Richard Smith2014-09-2812-12/+24
| | | | llvm-svn: 218580
* Don't perform ADL when looking up operator=; there is no non-member form ofRichard Smith2014-09-231-4/+4
| | | | | | | | | that function, and apart from being slow, this is unnecessary: ADL can trigger instantiations that are not permitted here. The standard isn't *completely* clear here, but this seems like the intent, and in any case this approach is permitted by [temp.inst]p7. llvm-svn: 218330
* Tests for DR581-600.Richard Smith2014-09-151-0/+140
| | | | llvm-svn: 217844
* Tests for DR573-580.Richard Smith2014-09-111-0/+126
| | | | llvm-svn: 217606
* Reword switch/goto diagnostics "protected scope" diagnostics. Making up a termRichard Smith2014-09-064-7/+7
| | | | | | | | "protected scope" is very unhelpful here and actively confuses users. Instead, simply state the nature of the problem in the diagnostic: we cannot jump from here to there. The notes explain nicely why not. llvm-svn: 217293
* clang/test/CXX/drs/dr5xx.cpp: Fix up assumption of thiscall. It affects not ↵NAKAMURA Takumi2014-09-051-2/+2
| | | | | | | | x64 but x86. Note, i686-cygwin doesn't use thiscall. llvm-svn: 217234
* Remove suppression of dr547 test and instead test that deduction succeeds if weRichard Smith2014-09-051-6/+14
| | | | | | | | use __thiscall. (This doesn't actually work for MSVC; they don't allow the __thiscall qualifier here, but it's sufficient to demonstrate that we do implement the intent of the DR.) llvm-svn: 217213
* clang/test/CXX/drs/dr5xx.cpp: Suppress dr547 also for MinGWHans Wennborg2014-09-041-1/+2
| | | | | | This is a follow-up to r216841. llvm-svn: 217204
* Avoid test failure on platforms where size_t is long long (and thus can't beRichard Smith2014-09-021-3/+4
| | | | | | directly written in strictly-conforming source code). llvm-svn: 216969
* Tests for DR550-572.Richard Smith2014-09-022-1/+189
| | | | llvm-svn: 216953
* clang/test/CXX/drs/dr5xx.cpp: Suppress dr547 for targeting MSVC x86 for now, ↵NAKAMURA Takumi2014-08-311-0/+2
| | | | | | | | | | | | | | | | | | | due to incompatibility of attribute(thiscall). With targeting i686-win32, error: 'error' diagnostics seen but not expected: File clang/test/CXX/drs/dr5xx.cpp Line 521: implicit instantiation of undefined template 'dr547::X<void () __attribute__((thiscall)) const>' File clang/test/CXX/drs/dr5xx.cpp Line 518: implicit instantiation of undefined template 'dr547::X<void () __attribute__((thiscall)) const>' File clang/test/CXX/drs/dr5xx.cpp Line 518: implicit instantiation of undefined template 'dr547::X<void () __attribute__((thiscall)) const>' error: 'note' diagnostics seen but not expected: File clang/test/CXX/drs/dr5xx.cpp Line 516: template is declared here File clang/test/CXX/drs/dr5xx.cpp Line 521: in instantiation of function template specialization 'dr547::f<void () __attribute__((thiscall)) const, dr547::S>' requested here File clang/test/CXX/drs/dr5xx.cpp Line 516: template is declared here File clang/test/CXX/drs/dr5xx.cpp Line 516: template is declared here 7 errors generated. llvm-svn: 216841
* Tests for DR525-550.Richard Smith2014-08-311-0/+316
| | | | llvm-svn: 216834
* Sema: Disallow taking the address of a bitfield coming from preincrementDavid Majnemer2014-07-311-0/+1
| | | | | | | | | | | | | | Clang forgot that '++s.m' was a bitfield l-value and permit it's address to be taken; this would crash at CodeGen-time. Instead, propagate the object-kind when we see the prefix increment/decrement. This fixes PR20496. Differential Revision: http://reviews.llvm.org/D4733 llvm-svn: 214386
* Improve diagnostic on default-initializing const variables (PR20208).Nico Weber2014-07-232-2/+2
| | | | | | | | This tweaks the diagnostic wording slighly, and adds a fixit on a note. An alternative would be to add the fixit directly on the diagnostic, see the review thread linked to from the bug for a few notes on that approach. llvm-svn: 213725
* Implement DR990 and DR1070. Aggregate initialization initializes uninitializedRichard Smith2014-06-032-0/+78
| | | | | | | | | elements from {}, rather than value-initializing them. This permits calling an initializer-list constructor or constructing a std::initializer_list object. (It would also permit initializing a const reference or rvalue reference if that weren't explicitly prohibited by other rules.) llvm-svn: 210091
* List DR532 as implemented on the defect report status page by renaming the ↵Nikola Smiljanic2014-06-031-2/+2
| | | | | | namespace. llvm-svn: 210080
OpenPOWER on IntegriCloud