[flang-commits] [clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

kadir çetinkaya via flang-commits flang-commits at lists.llvm.org
Wed Jan 15 02:22:26 PST 2025


https://github.com/kadircet requested changes to this pull request.

> but I'd really love to hear from @kadircet as to whether this PR fully addresses the issues found before: https://github.com/llvm/llvm-project/pull/70976#discussion_r1775918960

I think it mostly does (left some comments in places that it might break).

it'd be nice to also document this new behavioral change in https://clang.llvm.org/docs/AttributeReference.html#diagnose-if.

--- 

TBH I find it somewhat confusing to have a severity in `diagnose_if` and an existing diagnostic group, which already has its own severity. It isn't obvious to me how the severity for such a diagnotic should be configured. Does the command line options take precedence, or the annotation in code? IME mostly the latter takes over in clang, but, IIUC, we're doing the opposite here. Since I was late the RFC, I am not pushing back on the change, but just wanted to share my thoughts. So feel free to ignore.

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


More information about the flang-commits mailing list