[-Wunsafe-buffer-usage] Create Fix-Its only if they are emitted
authorZiqing Luo <ziqing@udel.edu>
Thu, 23 Feb 2023 22:43:21 +0000 (14:43 -0800)
committerZiqing Luo <ziqing@udel.edu>
Thu, 23 Feb 2023 22:47:43 +0000 (14:47 -0800)
commitf78c34346635e25919e2777b1b1cbb9627d5ad43
tree249a8b9466c5a6f577bebb8d7c0913c4da0c40ae
parent17b2e73cb477d42771fbc68a215dde648f3eaaef
[-Wunsafe-buffer-usage] Create Fix-Its only if they are emitted

`-Wunsafe-buffer-usage` diagnostics shall not emit fix-its if fix-its
are globally disabled.

Commit on behalf of jkorous (Jan Korous)

Reviewed by: NoQ (Artem Dergachev)

Differential revision: https://reviews.llvm.org/D143697
clang/lib/Analysis/UnsafeBufferUsage.cpp
clang/lib/Sema/AnalysisBasedWarnings.cpp