[clang] [Clang][DirectX] Always use Diagnostic Printer (PR #135655)
Farzon Lotfi via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 14 17:02:35 PDT 2025
================
@@ -2,7 +2,6 @@
// RUN: not %clang_cc1 %s -o - -S -triple=amdgcn-amd-amdhsa 2>&1 | FileCheck %s
void test_amdgcn_fence_failure() {
-
- // CHECK: error: Unsupported atomic synchronization scope
+ // CHECK: error: <unknown>:0:0: in function _Z25test_amdgcn_fence_failurev void (): Unsupported atomic synchronization scope
----------------
farzonl wrote:
My change doesn't get rid of the location we still prefix it, but `<unknown>:0:0` is also prefixed and that I agree is problematic. I suppose this wasn't a problem for the `Context==nullptr` case because in that on `Diags.Report(Loc, DiagType)` might be an empty string?
Before change:
```
<llvm-project_dir>/clang/test/Sema/builtin-amdgcn-fence-failure.cpp:4:6: error: Unsupported atomic synchronization scope
```
After change:
```
<llvm-project_dir>/clang/test/Sema/builtin-amdgcn-fence-failure.cpp:4:6: error: <unknown>:0:0: in function _Z25test_amdgcn_fence_failurev void (): Unsupported atomic synchronization scope
```
https://github.com/llvm/llvm-project/pull/135655
More information about the cfe-commits
mailing list