[clang-tools-extra] [clang-tidy] Extend bugprone-narrowing-conversions with time_t narrowing option (PR #209856)
Radovan Božić via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 24 03:25:12 PDT 2026
bozicrHT wrote:
Hi @zeyi2, thanks for the review!
I have one design question: would conservative fix-it hints be appropriate for this check, or should this PR remain diagnostics-only?
I was considering only very limited local-variable cases, such as changing `int i = t;` to `time_t i = t;` when the initializer involves `time_t`. I would avoid fix-its for function parameters, return types, fields, macro expanded code, and anything that may affect API/ABI.
Would that be useful for `bugprone-narrowing-conversions`, or too much for this check?
https://github.com/llvm/llvm-project/pull/209856
More information about the cfe-commits
mailing list