[c++14] Implement missed piece of N3323: use "converted constant" rules
authorRichard Smith <richard@metafoo.co.uk>
Wed, 19 Aug 2020 19:46:52 +0000 (12:46 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Wed, 19 Aug 2020 22:45:51 +0000 (15:45 -0700)
commitc1c1bed5d0828f1905f1e9a09a32c02f05de9b41
tree989f63499257c9a6c0d8e909c7a15790b1b0593f
parent6f339367195e7464df87571062529bbe20157bdf
[c++14] Implement missed piece of N3323: use "converted constant" rules
for array bounds, not "integer constant" rules.

For an array bound of class type, this causes us to perform an implicit
conversion to size_t, instead of looking for a unique conversion to
integral or unscoped enumeration type. This affects which cases are
valid when a class has multiple implicit conversion functions to
different types.
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaExprCXX.cpp
clang/lib/Sema/SemaOverload.cpp
clang/lib/Sema/SemaType.cpp
clang/test/SemaCXX/cxx1y-contextual-conversion-tweaks.cpp