summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/conv/conv.prom
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
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-192-0/+2
| | | | | | 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
OpenPOWER on IntegriCloud