summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2019-10-19 00:34:54 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2019-10-19 00:34:54 +0000
commitb300d3566a7bb528c0ca2994a74dcab46f50eb97 (patch)
treef397399f29ec1c40c18d88303ac917c4c91c180b /test
parentae6164e81a997145838d60883a373e79de1b8e78 (diff)
downloadclang-b300d3566a7bb528c0ca2994a74dcab46f50eb97.tar.gz
Sema: Create a no-op implicit cast for lvalue function conversions.
This fixes an assertion failure in the case where an implicit conversion for a function call involves an lvalue function conversion, and makes the AST for initializations involving implicit lvalue function conversions more accurate. Differential Revision: https://reviews.llvm.org/D66437 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375313 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGenCXX/implicit-function-conversion.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CodeGenCXX/implicit-function-conversion.cpp b/test/CodeGenCXX/implicit-function-conversion.cpp
new file mode 100644
index 0000000000..2d14c6ae51
--- /dev/null
+++ b/test/CodeGenCXX/implicit-function-conversion.cpp
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-unknown-linux -std=c++17 | FileCheck %s
+
+double a(double) noexcept;
+int b(double (&)(double));
+
+// CHECK: call i32 @_Z1bRFddE(double (double)* @_Z1ad)
+int c = b(a);