summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/address-space-references.cpp
diff options
context:
space:
mode:
authorAnastasia Stulova <anastasia.stulova@arm.com>2019-12-13 12:30:59 +0000
committerAnastasia Stulova <anastasia.stulova@arm.com>2019-12-13 12:35:18 +0000
commited8dadb37c7e1a7f4889d868ac9b19bfe7762237 (patch)
treec5fac490def5552344784dcf4392347ade4eec75 /clang/test/SemaCXX/address-space-references.cpp
parentbe15dfa88fb1ed94d12f374797f98ede6808f809 (diff)
downloadbcm5719-llvm-ed8dadb37c7e1a7f4889d868ac9b19bfe7762237.tar.gz
bcm5719-llvm-ed8dadb37c7e1a7f4889d868ac9b19bfe7762237.zip
[Sema] Improve diagnostic about addr spaces for overload candidates
Allow sending address spaces into diagnostics to simplify and improve error reporting. Improved wording of diagnostics for address spaces in overloading. Tags: #clang Differential Revision: https://reviews.llvm.org/D71111
Diffstat (limited to 'clang/test/SemaCXX/address-space-references.cpp')
-rw-r--r--clang/test/SemaCXX/address-space-references.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/SemaCXX/address-space-references.cpp b/clang/test/SemaCXX/address-space-references.cpp
index 5c297e76c41..f79ffab2bd1 100644
--- a/clang/test/SemaCXX/address-space-references.cpp
+++ b/clang/test/SemaCXX/address-space-references.cpp
@@ -3,10 +3,10 @@
typedef int __attribute__((address_space(1))) int_1;
typedef int __attribute__((address_space(2))) int_2;
-void f0(int_1 &); // expected-note{{candidate function not viable: address space mismatch in 1st argument ('int'), parameter type must be 'int_1 &' (aka '__attribute__((address_space(1))) int &')}} \
-// expected-note{{candidate function not viable: address space mismatch in 1st argument ('int_2' (aka '__attribute__((address_space(2))) int')), parameter type must be 'int_1 &' (aka '__attribute__((address_space(1))) int &')}}
-void f0(const int_1 &); // expected-note{{candidate function not viable: address space mismatch in 1st argument ('int'), parameter type must be 'const int_1 &' (aka 'const __attribute__((address_space(1))) int &')}} \
-// expected-note{{candidate function not viable: address space mismatch in 1st argument ('int_2' (aka '__attribute__((address_space(2))) int')), parameter type must be 'const int_1 &' (aka 'const __attribute__((address_space(1))) int &')}}
+void f0(int_1 &); // expected-note{{candidate function not viable: cannot bind reference in generic address space to object in address space '1' in 1st argument}} \
+// expected-note{{candidate function not viable: cannot bind reference in address space '2' to object in address space '1' in 1st argument}}
+void f0(const int_1 &); // expected-note{{candidate function not viable: cannot bind reference in generic address space to object in address space '1' in 1st argument}} \
+// expected-note{{candidate function not viable: cannot bind reference in address space '2' to object in address space '1' in 1st argument}}
void test_f0() {
int i;
OpenPOWER on IntegriCloud