MaskRay added inline comments.
================ Comment at: clang/lib/Driver/ToolChains/Clang.cpp:7228 + } else { + Args.ClaimAllArgs(options::OPT_fgpu_approx_transcendentals); + Args.ClaimAllArgs(options::OPT_fno_gpu_approx_transcendentals); ---------------- You can use `Args.claimAllArgs(options::OPT_fgpu_approx_transcendentals, options::OPT_fno_gpu_approx_transcendentals);` ================ Comment at: clang/test/Driver/hip-options.hip:184 + +// APPROX: clang{{.*}} "-triple" "amdgcn-amd-amdhsa" {{.*}} "-fgpu-approx-transcendentals" +// APPROX: clang{{.*}} "-triple" "x86_64-unknown-linux-gnu" {{.*}} "-fgpu-approx-transcendentals" ---------------- Just test `-cc1`: `// APPROX: "-cc1"{{.*}} "-triple" "amdgcn-amd-amdhsa" {{.*}} "-fgpu-approx-transcendentals"` Testing `clang` requires `-no-canonical-prefixes` https://maskray.me/blog/2021-03-28-compiler-driver-and-cross-compilation#misc ================ Comment at: clang/test/Driver/hip-options.hip:209 + +// APPROXNEG-NOT: warning ---------------- If `%t` happens to be in a path with `warning` as a substring, this will spuriously fail. Suggest `%clang -fdriver-only -Werror... 2>&1 | count 0` to test that there is no warning/error. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154797/new/ https://reviews.llvm.org/D154797 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits