summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/conv
Commit message (Collapse)AuthorAgeFilesLines
* Specify an explicit underlying type for this enum to fix WindowsRichard Smith2018-06-291-1/+1
| | | | | | | | | | buildbots. On Windows targets, enums always get an underlying type of 'int', even if they have wider enumerators. (This is non-conforming, but it's effectively part of the target ABI.) llvm-svn: 336013
* PR37979: integral promotions in C++ treat enum bit-fields like enums,Richard Smith2018-06-281-0/+19
| | | | | | | | | | | | | | | | | not like bit-fields. We used to get this right "by accident", because conversions for the selected built-in overloaded operator would convert the enum bit-field to its corresponding underlying type early. But after DR1687 that no longer happens. Technically this change should also apply to C, where bit-fields only have special promotion rules if the bit-field's declared type is _Bool, int, signed int, or unsigned int, but for GCC compatibility we only look at the bit-width and not the underlying type when performing bit-field integral promotions in C. llvm-svn: 335925
* Driver: hoist the `wchar_t` handling to the driverSaleem Abdulrasool2017-10-061-1/+1
| | | | | | | | | | | | | | | | Move the logic for determining the `wchar_t` type information into the driver. Rather than passing the single bit of information of `-fshort-wchar` indicate to the frontend the desired type of `wchar_t` through a new `-cc1` option of `-fwchar-type` and indicate the signedness through `-f{,no-}signed-wchar`. This replicates the current logic which was spread throughout Basic into the `RenderCharacterOptions`. Most of the changes to the tests are to ensure that the frontend uses the correct type. Add a new test set under `test/Driver/wchar_t.c` to ensure that we calculate the proper types for the various cases. llvm-svn: 315126
* [c++1z] P0003R5: Removing dynamic exception specifications.Richard Smith2016-12-081-2/+2
| | | | | | | | | | | | | | | | | | We continue to support dynamic exception specifications in C++1z as an extension, but produce an error-by-default warning when we encounter one. This allows users to opt back into the feature with a warning flag, and implicitly opts system headers back into the feature should they happen to use it. There is one semantic change implied by P0003R5 but not implemented here: violating a throw() exception specification should now call std::terminate directly instead of calling std::unexpected(), but since P0003R5 also removes std::unexpected() and std::set_unexpected, and the default unexpected handler calls std::terminate(), a conforming C++1z program cannot tell that we are still calling it. The upside of this strategy is perfect backwards compatibility; the downside is that we don't get the more efficient 'noexcept' codegen for 'throw()'. llvm-svn: 289019
* clang/test/CXX/conv/conv.fctptr/p1.cpp: Appease for targeting i686-win32.NAKAMURA Takumi2016-10-161-1/+1
| | | | | | | error: 'error' diagnostics seen but not expected: File clang\test\CXX\conv\conv.fctptr\p1.cpp Line 16: assigning to 'void (S::*)() __attribute__((thiscall)) noexcept' from incompatible type 'void (S::*)() __attribute__((thiscall))': different exception specifications llvm-svn: 284352
* P0012R1: Make exception specifications be part of the type system. ThisRichard Smith2016-10-161-0/+43
| | | | | | | implements the bulk of the change (modifying the type system to include exception specifications), but not all the details just yet. llvm-svn: 284337
* PR6037Nathan Sidwell2015-01-191-1/+1
| | | | | | Warn on inaccessible direct base llvm-svn: 226423
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-194-0/+4
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
* Make the wchar_t promotion test consistent across different hosts by ↵David Blaikie2012-09-201-2/+2
| | | | | | | | | | | | specifying a target triple. This test behavior differs depending (at least) on whether sizeof(wchar_t) == sizeof(int) or not. When they are equal, the first redeclaration will fail because decltype(+L'x') is unsigned int instead of the expected int. This occurs on ARM. llvm-svn: 164315
* Fix incorrect comment.Richard Smith2012-09-131-1/+1
| | | | llvm-svn: 163850
* Fix up after r163846. Sorry!Richard Smith2012-09-131-3/+4
| | | | llvm-svn: 163849
* Implement C++11 [conv.prom]p4: an enumeration with a fixed underlying type hasRichard Smith2012-09-131-0/+17
| | | | | | | | | integral promotions to both its underlying type and to its underlying type's promoted type. This matters now that boolean conversions aren't permitted in converted constant expressions (a la DR1407): an enumerator with a fixed underlying type of bool still can be. llvm-svn: 163841
* Compute the promoted integer type of fixed-width enums correctly. Found by ↵Eli Friedman2011-10-261-0/+9
| | | | | | inspection. llvm-svn: 143021
* Correctly perform integral promotions on wchar_t/char16_t/char32_t in C++. ↵Eli Friedman2011-10-261-0/+16
| | | | | | <rdar://problem/10309088>. llvm-svn: 143019
* Drop an unjustified limitation from Type::isObjectType(). Fixes PR7801 and ↵Sebastian Redl2010-08-051-0/+6
| | | | | | doesn't seem to break anything. llvm-svn: 110295
* Turn access control on by default in -cc1.John McCall2010-04-091-1/+1
| | | | | | | | Remove -faccess-control from -cc1; add -fno-access-control. Make the driver pass -fno-access-control by default. Update a bunch of tests to be correct under access control. llvm-svn: 100880
* When pretty-printing tag types, only print the tag if we're in C (andJohn McCall2010-03-101-8/+8
| | | | | | | | | | therefore not creating ElaboratedTypes, which are still pretty-printed with the written tag). Most of these testcase changes were done by script, so don't feel too sorry for my fingers. llvm-svn: 98149
* Improve access control diagnostics. Perform access control on member-pointerJohn McCall2010-02-101-4/+4
| | | | | | | conversions. Fix an access-control bug where privileges were not considered at intermediate points along the inheritance path. Prepare for friends. llvm-svn: 95775
* Reset the found-virtual-base state unless the *current* base produces a path,John McCall2010-02-091-0/+65
| | | | | | | | not *any* base up to now has produced a path. Fixes PR 6254. I'll do the access-control part of this patch RSN. llvm-svn: 95638
* Top-level const changes do not make a qualification conversion. Fixes PR6089.Sebastian Redl2010-02-031-0/+18
llvm-svn: 95239
OpenPOWER on IntegriCloud