summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX
Commit message (Collapse)AuthorAgeFilesLines
...
* Correct incoherent function versus function template partial ordering for ↵Richard Smith2014-05-171-1/+9
| | | | | | conversion operators (the comparison could claim that two conversion operators are both better than each other). Actually implement DR495, rather than passing its test by chance because the declarations happened to be in the "lucky" order. llvm-svn: 209054
* Tweak diagnostic wording for init list narrowingAlp Toker2014-05-175-106/+106
| | | | | | | | | The conventional form is '<action> to silence this warning'. Also call the diagnostic an 'issue' rather than a 'message' because the latter term is more widely used with reference to message expressions. llvm-svn: 209052
* PR19742: cv-qualifiers and ref-qualifiers aren't allowed on functions withinRichard Smith2014-05-142-4/+24
| | | | | | | pointer and reference types, even if those types are produced by template instantiation. llvm-svn: 208825
* clang/test/CXX/drs/dr4xx.cpp: Use env(1) to satisfy lit internal runner.NAKAMURA Takumi2014-05-121-3/+3
| | | | llvm-svn: 208532
* disable asan's detect_stack_use_after_return when running CXX/drs/dr4xx.cpp ↵Kostya Serebryany2014-05-121-3/+3
| | | | | | (temporary workaround for PR19722); This should make the asan bootstrap bot green again llvm-svn: 208521
* Revert "Sema: Implement DR244"David Majnemer2014-05-032-4/+4
| | | | | | | | This was accidentally committed. This reverts commit r207892. llvm-svn: 207893
* Sema: Implement DR244David Majnemer2014-05-032-4/+4
| | | | | | | | | Naming the destructor using a typedef-name for the class-name is well-formed. This fixes PR19620. llvm-svn: 207892
* Sema: Implement DR477David Majnemer2014-04-302-3/+7
| | | | | | | | | | | | Summary: Friend declarations shouldn't mention explicit or virtual. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3562 llvm-svn: 207682
* CodeGen: Fix linkage of reference temporariesDavid Majnemer2014-04-281-2/+2
| | | | | | | | | | | | | | | Summary: A reference temporary should inherit the linkage of the variable it initializes. Otherwise, we may hit cases where a reference temporary wouldn't have the same value in all translation units. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3515 llvm-svn: 207451
* Don't emit an ExtWarn on declarations of variable template specializations;Richard Smith2014-04-171-4/+4
| | | | | | | we'll already have issued the relevant diagnostic when we saw the declaration of the primary template. llvm-svn: 206441
* Implement [over.match.oper]p3 properly, by filtering the non-candidates outRichard Smith2014-04-171-6/+4
| | | | | | | when building the candidate set, rather than trying to contort name lookup into handling this. llvm-svn: 206436
* PR19452: Implement more of [over.match.oper]p3's restrictions on which ↵Richard Smith2014-04-171-2/+28
| | | | | | non-member overloaded operators can be found when no operand is of class type. We used to fail to implement this rule if there was an operand of dependent type. llvm-svn: 206435
* Tests for DR501-525.Richard Smith2014-04-132-1/+182
| | | | llvm-svn: 206123
* PR19346: Adding 0 to a null pointer has defined behavior in C++. Allow it in ↵Richard Smith2014-04-081-1/+3
| | | | | | constant expressions. llvm-svn: 205757
* If a using-declaration names a class member, but appears outside a class, tryRichard Smith2014-04-021-1/+95
| | | | | | to suggest a different syntax to get the same effect. llvm-svn: 205467
* Render anonymous entities as '(anonymous <thing>)' (and lambdas as '(lambda ↵David Blaikie2014-04-021-1/+1
| | | | | | | | | | | | at ... )') For namespaces, this is consistent with mangling and GCC's debug info behavior. For structs, GCC uses <anonymous struct> but we prefer consistency between all anonymous entities but don't want to confuse them with template arguments, etc, so we'll just go with parens in all cases. llvm-svn: 205398
* More tests for DR1.Richard Smith2014-04-011-2/+18
| | | | llvm-svn: 205339
* Add failing testcase for DR305. Looks like we didn't implement the resolutionRichard Smith2014-04-011-1/+20
| | | | | | here in the simple-template-id case. llvm-svn: 205273
* Sema: Implement DR317David Majnemer2014-03-301-5/+5
| | | | | | | | | | | | | | | 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
* Tests for dr475-dr500.Richard Smith2014-03-302-0/+364
| | | | llvm-svn: 205127
* PR19252: Fix crash if alignas is used with an auto-typed variable. Don't checkRichard Smith2014-03-271-0/+1
| | | | | | the type of the variable until it's known. llvm-svn: 204887
* Tests for DR450-475.Richard Smith2014-03-191-0/+230
| | | | llvm-svn: 204217
* Creating a printing policy for "half":Yunzhong Gao2014-03-181-1/+1
| | | | | | | | | | | | Since "half" is an OpenCL keyword and clang accepts __fp16 as an extension for other languages, error messages and metadata (and hence debug info) should refer to the half-precision floating point as "__fp16" instead of "half" when compiling for non-OpenCL languages. This patch creates a new printing policy for half in a similar manner to what is done for bool and wchar_t. Differential Revision: http://llvm-reviews.chandlerc.com/D2952 llvm-svn: 204164
* Remove 'REQUIRES: LP64' from these tests and use a more targeted fix.Richard Smith2014-03-182-4/+5
| | | | llvm-svn: 204096
* Don't fold together the name lookup entries for two declarations if they areRichard Smith2014-03-172-11/+23
| | | | | | declared in different namespaces in the same inline namespace set. llvm-svn: 204082
* Remove unused variable from test.Richard Smith2014-03-171-1/+1
| | | | llvm-svn: 204051
* clang/test/CXX/drs: Add "REQUIRES:LP64" to a couple of tests in r204033. ↵NAKAMURA Takumi2014-03-172-0/+2
| | | | | | [PR8833] llvm-svn: 204038
* Tests for DR400-450.Richard Smith2014-03-172-0/+589
| | | | llvm-svn: 204033
* Tests for DR389-399.Richard Smith2014-03-131-0/+238
| | | | llvm-svn: 203771
* DR1346: a parenthesized braced-init-list cannot be used as the initializer whenRichard Smith2014-03-123-1/+55
| | | | | | performing auto type deduction. llvm-svn: 203683
* Tests for DR381-388.Richard Smith2014-03-111-0/+102
| | | | llvm-svn: 203549
* Replace "can not" with "cannot" in diagnostics messages.Ismail Pazarbasi2014-03-0710-36/+36
| | | | llvm-svn: 203302
* Tests for DR370-380.Richard Smith2014-03-051-0/+108
| | | | | | | Also promote a couple of Warnings on ill-formed code found by this testing to ExtWarns. llvm-svn: 203021
* Merge using-decl-pr17575.cpp into existing test case.Peter Collingbourne2014-03-051-0/+6
| | | | llvm-svn: 202925
* Add tests for newly-resolved core issues <= 370.Richard Smith2014-03-044-2/+81
| | | | llvm-svn: 202889
* Normalize line endingsDavid Majnemer2014-03-022-156/+156
| | | | | | | Some files had CRLF line terminators, some only had a mixture of CRLF and LF. Switch to LF. llvm-svn: 202659
* PR16074, implement warnings to catch pointer to boolean true and pointer toRichard Trieu2014-02-263-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | null comparison when the pointer is known to be non-null. This catches the array to pointer decay, function to pointer decay and address of variables. This does not catch address of function since this has been previously used to silence a warning. Pointer to bool conversion is under -Wbool-conversion. Pointer to null comparison is under -Wtautological-pointer-compare, a sub-group of -Wtautological-compare. void foo() { int arr[5]; int x; // warn on these conditionals if (foo); if (arr); if (&x); if (foo == null); if (arr == null); if (&x == null); if (&foo); // no warning } llvm-svn: 202216
* [Win32 ABI] Defer operator delete checks until vtable is marked usedHans Wennborg2014-02-242-43/+3
| | | | | | | | | | 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
* Implement DR577David Majnemer2014-02-192-5/+2
| | | | | | | | 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
* PR13110: Add a -Wignored-qualifiers warning when ignoring a const, volatile, orRichard Smith2014-02-192-7/+6
| | | | | | _Atomic qualifier applied to a reference type. llvm-svn: 201620
* More tests for r201536.Richard Smith2014-02-181-0/+14
| | | | llvm-svn: 201610
* PR18876: The special-case rule that ignores the destruction of a top-levelRichard Smith2014-02-181-14/+18
| | | | | | | | temporary in a decltype expression only applies if that temporary was created by a function call, not by a function-style cast or other flavour of expression. llvm-svn: 201542
* Tests for DR351-370, plus update DR status page to match the latest core ↵Richard Smith2014-02-101-0/+264
| | | | | | issue list. llvm-svn: 201106
* Improve diagnostic for using non-class/namespace/scoped enum in a nested ↵David Blaikie2014-02-092-2/+3
| | | | | | | | | | | | | | | name specifier. Rather than simply saying "X is not a class or namespace", clarify what X is by providing the aka type in the case where X is a type, or pointing to the named declaration if there's an unambiguous one to refer to. In the ambiguous case, the ambiguities are already enumerated (though could be clarified by describing what kind of entities they are) Included a few FIXMEs in tests where some further improvements could be made. llvm-svn: 201038
* PR16638, DR1552: the exception specification on an implicitly-declaredRichard Smith2014-02-071-8/+12
| | | | | | | | | | | 'operator delete' or 'operator delete[]' is an explicit exception specification. Therefore we should diagnose 'void operator delete(void*)' instead of 'void operator delete(void*) noexcept'. This diagnostic remains an ExtWarn, since in practice people don't always include the exception specification in such a declaration. llvm-svn: 201002
* DR101, PR12770: If a function is declared in the same context as aRichard Smith2014-02-062-8/+22
| | | | | | | | 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
* Add implicit declarations of allocation functions when looking them up forRichard Smith2014-02-042-2/+4
| | | | | | | | redeclaration, not just when looking them up for a use -- we need the implicit declaration to appropriately check various properties of them (notably, whether they're deleted). llvm-svn: 200729
* Tests for DR331-350.Richard Smith2014-02-031-0/+197
| | | | llvm-svn: 200678
* Implement DR329. We already did the right thing here in C++98 mode, but r104014Richard Smith2014-02-032-23/+7
| | | | | | (which implemented the DR) was disabled in C++11. llvm-svn: 200673
* Tests for DR321-330.Richard Smith2014-02-031-0/+85
| | | | llvm-svn: 200672
OpenPOWER on IntegriCloud