[all-commits] [llvm/llvm-project] b58e52: [-Wunsafe-buffer-usage] Stop generating incorrect ...
Ziqing Luo via All-commits
all-commits at lists.llvm.org
Mon Aug 21 16:39:34 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b58e52889808e0e8da55ac77f651762f202aa4c5
https://github.com/llvm/llvm-project/commit/b58e52889808e0e8da55ac77f651762f202aa4c5
Author: Ziqing Luo <ziqing at udel.edu>
Date: 2023-08-21 (Mon, 21 Aug 2023)
Changed paths:
M clang/lib/Analysis/UnsafeBufferUsage.cpp
M clang/test/SemaCXX/warn-unsafe-buffer-usage-fixits-local-var-span.cpp
Log Message:
-----------
[-Wunsafe-buffer-usage] Stop generating incorrect fix-its for variable declarations with unsupported specifiers
We have to give up on fixing a variable declaration if it has
specifiers that are not supported yet. We could support these
specifiers incrementally using the same approach as how we deal with
cv-qualifiers. If a fixing variable declaration has a storage
specifier, instead of trying to find out the source location of the
specifier or to avoid touching it, we add the keyword to a
canonicalized place in the fix-it text that replaces the whole
declaration.
Reviewed by: NoQ (Artem Dergachev), jkorous (Jan Korous)
Differential revision: https://reviews.llvm.org/D156192
More information about the All-commits
mailing list