Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CXX / temp / temp.fct.spec / temp.deduct / temp.deduct.conv / p3.cpp
bloba5916ba65377ab22950dbefa11bf29698de1c20b
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
3 struct AnyPtr {
4 template<typename T>
5 operator T*() const;
6 };
8 // If A is a cv-qualified type, the top level cv-qualifiers of A's type
9 // are ignored for type deduction.
10 void test_cvquals(AnyPtr ap) {
11 int* const ip = ap;
12 const float * const volatile fp = ap;
15 // If A is a reference type, the type referred to by A is used for
16 // type deduction.
17 void test_ref_arg(AnyPtr ap) {
18 const int* const &ip = ap;
19 double * const &dp = ap;
22 struct AnyRef {
23 template<typename T>
24 operator T&() const;
27 void test_ref_param(AnyRef ar) {
28 int &ir = ar;
29 const float &fr = ar;
30 int i = ar;