summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-08-10 01:09:18 +0000
committerJustin Lebar <jlebar@google.com>2016-08-10 01:09:18 +0000
commit7d078bddbd79142d350ed6ecee378d6d0a4e7a88 (patch)
tree8b4e3e5fe8b3cea2af96e2016f7d3c798762a104 /clang/test
parent2ef3dabd45305117a237ce28babdfee651aad5fc (diff)
downloadbcm5719-llvm-7d078bddbd79142d350ed6ecee378d6d0a4e7a88.tar.gz
bcm5719-llvm-7d078bddbd79142d350ed6ecee378d6d0a4e7a88.zip
[CUDA] Print a "previous-decl" note when calling an illegal member fn.
Summary: When we emit err_ref_bad_target, we should emit a "'method' declared here" note. We already do so in most places, just not in BuildCallToMemberFunction. Reviewers: tra Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23240 llvm-svn: 278195
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCUDA/method-target.cu6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/SemaCUDA/method-target.cu b/clang/test/SemaCUDA/method-target.cu
index 3fabfc359b7..505664586bf 100644
--- a/clang/test/SemaCUDA/method-target.cu
+++ b/clang/test/SemaCUDA/method-target.cu
@@ -6,7 +6,7 @@
// Test 1: host method called from device function
struct S1 {
- void method() {}
+ void method() {} // expected-note {{'method' declared here}}
};
__device__ void foo1(S1& s) {
@@ -29,7 +29,7 @@ __device__ void foo2(S2& s, int i, float f) {
// Test 3: device method called from host function
struct S3 {
- __device__ void method() {}
+ __device__ void method() {} // expected-note {{'method' declared here}};
};
void foo3(S3& s) {
@@ -63,7 +63,7 @@ __device__ void foo5(S5& s, S5& t) {
// Test 6: call method through pointer
struct S6 {
- void method() {}
+ void method() {} // expected-note {{'method' declared here}};
};
__device__ void foo6(S6* s) {
OpenPOWER on IntegriCloud