Skip to content

Commit ff537a9

Browse files
committed
fix diagnostic; add error test
1 parent c70cfaf commit ff537a9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

clang/include/clang/Basic/DiagnosticDriverKinds.td

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,7 @@ def warn_drv_fraw_string_literals_in_cxx11 : Warning<
394394
"ignoring '-f%select{no-|}0raw-string-literals', which is only valid for C and C++ standards before C++11">,
395395
InGroup<UnusedCommandLineArgument>;
396396

397-
def err_drv_libclc_not_found : Error<
398-
"no libclc library '%0' found in the clang resource directory or in LIBRARY_PATH">;
397+
def err_drv_libclc_not_found : Error<"no libclc library '%0' found in the clang resource directory">;
399398

400399
def err_drv_invalid_malign_branch_EQ : Error<
401400
"invalid argument '%0' to -malign-branch=; each element must be one of: %1">;

clang/test/Driver/opencl-libclc.cl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// RUN: %clang -### -target amdgcn-amd-amdhsa --no-offloadlib --libclc-lib=:%S/Inputs/libclc/libclc.bc %s 2>&1 | FileCheck %s
22
// RUN: %clang -### -target amdgcn-amd-amdhsa --no-offloadlib --libclc-lib=:%S/Inputs/libclc/subdir/libclc.bc %s 2>&1 | FileCheck %s --check-prefix CHECK-SUBDIR
33

4+
// RUN: not %clang -### -target amdgcn-amd-amdhsa --no-offloadlib --libclc-lib=:%S/Inputs/libclc/subdir/not-here.bc %s 2>&1 | FileCheck %s --check-prefix CHECK-ERROR
5+
46
// CHECK: -mlink-builtin-bitcode{{.*}}Inputs{{/|\\\\}}libclc{{/|\\\\}}libclc.bc
57
// CHECK-SUBDIR: -mlink-builtin-bitcode{{.*}}Inputs{{/|\\\\}}libclc{{/|\\\\}}subdir{{/|\\\\}}libclc.bc
8+
9+
// CHECK-ERROR: no libclc library{{.*}}not-here.bc' found in the clang resource directory

0 commit comments

Comments
 (0)