Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCLomatic] Refine warning message for SYCLomatic parser to use "dpct/c2s ignoring argument:" instead of "error: unknown argument" #2524

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion clang/include/clang/Basic/DiagnosticDriverKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,9 @@ def err_arch_unsupported_isa

def err_drv_I_dash_not_supported : Error<
"'%0' not supported, please use -iquote instead">;
def err_drv_unknown_argument : Error<"unknown argument: '%0'">;
// SYCLomatic_CUSTOMIZATION begin
def err_drv_unknown_argument : Error<"dpct/c2s ignoring argument: '%0'">;
// SYCLomatic_CUSTOMIZATION end
def err_drv_unknown_argument_with_suggestion : Error<
"unknown argument '%0'; did you mean '%1'?">;
def warn_drv_unknown_argument_clang_cl : Warning<
Expand Down
9 changes: 9 additions & 0 deletions clang/test/dpct/parse_error_msgs/parse_error_msgs.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// RUN: dpct --format-range=none -out-root %T/ %s --cuda-include-path="%cuda-path/include" --extra-arg="-forward-unknown-to-host-compiler" > log.txt 2>&1
// RUN: FileCheck --input-file %T/parse_error_msgs.dp.cpp --match-full-lines %s
// RUN: grep -srn "dpct/c2s ignoring argument: .-forward-unknown-to-host-compile." ./log.txt

#include "cuda.h"

// CHECK: void g() {}
__global__ void g() {}