From 97754f4c0b711368566702a00d2f49fa40c7b59a Mon Sep 17 00:00:00 2001 From: Andrew Savonichev Date: Wed, 7 Nov 2018 13:07:18 +0000 Subject: [PATCH] [OpenCL] Fix diagnostic message about overload candidates Summary: I wonder if there are some extension which need to be disabled to get overloadable candidate available. Reviewers: asavonic, Anastasia Reviewed By: Anastasia Subscribers: yaxunl, sidorovd, cfe-commits Differential Revision: https://reviews.llvm.org/D54152 llvm-svn: 346311 --- clang/include/clang/Basic/DiagnosticSemaKinds.td | 2 +- clang/test/SemaOpenCL/extension-begin.cl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index dc616e72a4a8..2436975c0648 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -3681,7 +3681,7 @@ def warn_diagnose_if_succeeded : Warning<"%0">, InGroup, def note_ovl_candidate_disabled_by_function_cond_attr : Note< "candidate disabled: %0">; def note_ovl_candidate_disabled_by_extension : Note< - "candidate unavailable as it requires OpenCL extension '%0' to be disabled">; + "candidate unavailable as it requires OpenCL extension '%0' to be enabled">; def err_addrof_function_disabled_by_enable_if_attr : Error< "cannot take address of function %0 because it has one or more " "non-tautological enable_if conditions">; diff --git a/clang/test/SemaOpenCL/extension-begin.cl b/clang/test/SemaOpenCL/extension-begin.cl index 4910aebdac60..276e6d7f10b0 100644 --- a/clang/test/SemaOpenCL/extension-begin.cl +++ b/clang/test/SemaOpenCL/extension-begin.cl @@ -40,7 +40,7 @@ void test_f2(void) { PointerOfA test_A_pointer; // expected-error {{use of type 'PointerOfA' (aka 'const struct A *') requires my_ext extension to be enabled}} f(); // expected-error {{use of declaration 'f' requires my_ext extension to be enabled}} g(0); // expected-error {{no matching function for call to 'g'}} - // expected-note@extension-begin.h:18 {{candidate unavailable as it requires OpenCL extension 'my_ext' to be disabled}} + // expected-note@extension-begin.h:18 {{candidate unavailable as it requires OpenCL extension 'my_ext' to be enabled}} // expected-note@extension-begin.h:23 {{candidate function not viable: requires 0 arguments, but 1 was provided}} }