aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/complex-conversion.cpp
diff options
context:
space:
mode:
authorMatheus Izvekov <mizvekov@gmail.com>2021-10-10 15:28:37 +0200
committerMatheus Izvekov <mizvekov@gmail.com>2022-09-16 16:36:00 +0200
commit67e22983115451ef5512ad2813dd337762c52da3 (patch)
tree12fd9b0474443ba095c4f67493fcc099308c4dec /clang/test/SemaCXX/complex-conversion.cpp
parent89e4cb603d96dcb962ec76aa5e91d6ce86ffe63b (diff)
downloadllvm-67e22983115451ef5512ad2813dd337762c52da3.zip
llvm-67e22983115451ef5512ad2813dd337762c52da3.tar.gz
llvm-67e22983115451ef5512ad2813dd337762c52da3.tar.bz2
[clang] use getCommonSugar in an assortment of places
For this patch, a simple search was performed for patterns where there are two types (usually an LHS and an RHS) which are structurally the same, and there is some result type which is resolved as either one of them (typically LHS for consistency). We change those cases to resolve as the common sugared type between those two, utilizing the new infrastructure created for this purpose. Signed-off-by: Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D111509
Diffstat (limited to 'clang/test/SemaCXX/complex-conversion.cpp')
-rw-r--r--clang/test/SemaCXX/complex-conversion.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/complex-conversion.cpp b/clang/test/SemaCXX/complex-conversion.cpp
index e8f0995..6cb63b1 100644
--- a/clang/test/SemaCXX/complex-conversion.cpp
+++ b/clang/test/SemaCXX/complex-conversion.cpp
@@ -15,4 +15,8 @@ void func(float Real, _Complex float Complex) {
// Conversion to bool doesn't actually discard the imaginary part.
take<bool>(Complex);
+
+ using B = _Complex double;
+ B c;
+ c *= double();
}