tra added inline comments.
================ Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:296 +def warn_drv_dwarf_version_limited_by_target : Warning< + "debug information option '%0' is not supported. It needs DWARF-%2 but target '%1' only provides DWARF-%3.">, + InGroup<UnsupportedTargetOpt>; ---------------- dblaikie wrote: > Probably worth testing the rest of this error message to check the versions > and target names all show up as intended (looks like the test currently > glosses over the differences between this warning and the other error?) - and > also testing that it's emitted as a warning, whereas the other/pre-existing > diagnostic was emitted as an error (oh, I guess perhaps it already is, just > in another file - could you check that it is tested narrowly/ensured it's an > error elsewhere?) > Probably worth testing the rest of this error message to check the versions > and target names all show up as intended Done. > (looks like the test currently glosses over the differences between this > warning and the other error?) - and also testing that it's emitted as a > warning, whereas the other/pre-existing diagnostic was emitted as an error > (oh, I guess perhaps it already is, just in another file - could you check > that it is tested narrowly/ensured it's an error elsewhere?) The error case is already tested in https://github.com/llvm-mirror/clang/blob/master/test/Driver/debug-options.c#L355 ================ Comment at: clang/test/Driver/cuda-unsupported-debug-options.cu:18 +// RUN: %clang -### -target x86_64-linux-gnu -c %s -gdwarf-5 -gembed-source 2>&1 | FileCheck %s --check-prefix=DWARF-CLAMP +// CHECK: debug information option '{{-gz|-fdebug-info-for-profiling|-gsplit-dwarf|-glldb|-gcodeview|-gmodules|-gembed-source|-fdebug-macro|-ggnu-pubnames|-gdwarf-aranges|-fdebug-types-section}}' is not supported{{.*}} target 'nvptx64-nvidia-cuda' // CHECK-NOT: debug information option '{{.*}}' is not supported for target 'x86 ---------------- dblaikie wrote: > What's the purpose of the {{.*}} in this line? The wildcard eats the differences between two warnings -- a generic one: - `warning: debug information option '-glldb' is not supported for target 'nvptx64-nvidia-cuda'` and the more specific one for `-gembed-source` : - `warning: debug information option '-gembed-source' is not supported. It needs DWARF-5 but target 'nvptx64-nvidia-cuda' only provides DWARF-2.` ================ Comment at: clang/test/Driver/openmp-unsupported-debug-options.c:17 // RUN: %clang -### -target x86_64-linux-gnu -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -c %s -g -gcolumn-info -fdebug-types-section 2>&1 | FileCheck %s -// CHECK: debug information option '{{-gz|-fdebug-info-for-profiling|-gsplit-dwarf|-glldb|-gcodeview|-gmodules|-gembed-source|-fdebug-macro|-ggnu-pubnames|-gdwarf-aranges|-fdebug-types-section}}' is not supported for target 'nvptx64-nvidia-cuda' [-Wunsupported-target-opt] +// CHECK: debug information option '{{-gz|-fdebug-info-for-profiling|-gsplit-dwarf|-glldb|-gcodeview|-gmodules|-gembed-source|-fdebug-macro|-ggnu-pubnames|-gdwarf-aranges|-fdebug-types-section}}' is not supported{{.*}} target 'nvptx64-nvidia-cuda'{{.*}} [-Wunsupported-target-opt] // CHECK-NOT: debug information option '{{.*}}' is not supported for target 'x86 ---------------- dblaikie wrote: > also curious about the {{.*}} here too - but I guess it's the same answer as > the other spot? Yes, same here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92617/new/ https://reviews.llvm.org/D92617 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits