[llvm] [TableGen] Emit better error message for duplicate Subtarget features. (PR #102090)

Haojian Wu via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 7 02:56:01 PDT 2024


hokein wrote:

Hi, I see a flaky issue when integrating this change into our internal codebase.

The newly-added test is flaky under ASAN. Sometimes it passes, sometimes it fails.
The symptom I observed is that the line number of the emitted warning is non-deterministic:

1) Line 10: `[[@LINE+2]]:5: error: Feature 'NameA' already defined.` (expected: 12)
2) Line 11: `[[@LINE-3]]:5: note: Previous definition here.` (expected: 8)

Under ASAN, the line number of the first diagnostic can sometimes be 8, and the second one can be 12—they just swap. It is very subtle, and I don't see any problem in your patch.

https://github.com/llvm/llvm-project/pull/102090


More information about the llvm-commits mailing list