[PATCH] D67113: ICK_Function_Conversion and ICK_Qualification are third kind conversions
Aaron Puchert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 3 10:38:57 PDT 2019
aaronpuchert created this revision.
aaronpuchert added a reviewer: rsmith.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Not sure if this has any effect, but it was inconsistent before.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D67113
Files:
clang/lib/Sema/SemaExprCXX.cpp
clang/lib/Sema/SemaOverload.cpp
Index: clang/lib/Sema/SemaOverload.cpp
===================================================================
--- clang/lib/Sema/SemaOverload.cpp
+++ clang/lib/Sema/SemaOverload.cpp
@@ -5339,7 +5339,6 @@
// conversions are fine.
switch (SCS.Second) {
case ICK_Identity:
- case ICK_Function_Conversion:
case ICK_Integral_Promotion:
case ICK_Integral_Conversion: // Narrowing conversions are checked elsewhere.
case ICK_Zero_Queue_Conversion:
@@ -5385,6 +5384,7 @@
case ICK_Function_To_Pointer:
llvm_unreachable("found a first conversion kind in Second");
+ case ICK_Function_Conversion:
case ICK_Qualification:
llvm_unreachable("found a third conversion kind in Second");
Index: clang/lib/Sema/SemaExprCXX.cpp
===================================================================
--- clang/lib/Sema/SemaExprCXX.cpp
+++ clang/lib/Sema/SemaExprCXX.cpp
@@ -4252,12 +4252,14 @@
case ICK_Lvalue_To_Rvalue:
case ICK_Array_To_Pointer:
case ICK_Function_To_Pointer:
- case ICK_Function_Conversion:
- case ICK_Qualification:
case ICK_Num_Conversion_Kinds:
case ICK_C_Only_Conversion:
case ICK_Incompatible_Pointer_Conversion:
llvm_unreachable("Improper second standard conversion");
+
+ case ICK_Function_Conversion:
+ case ICK_Qualification:
+ llvm_unreachable("Improper third standard conversion");
}
switch (SCS.Third) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67113.218487.patch
Type: text/x-patch
Size: 1387 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190903/fd7d1921/attachment-0001.bin>
More information about the cfe-commits
mailing list