[all-commits] [llvm/llvm-project] 9bd0db: [-Wunsafe-buffer-usage] Bug fix: Handles the asser...
Malavika Samak via All-commits
all-commits at lists.llvm.org
Mon Apr 24 16:10:32 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9bd0db80784e30d40a4a65f1b47109c833f05b54
https://github.com/llvm/llvm-project/commit/9bd0db80784e30d40a4a65f1b47109c833f05b54
Author: MalavikaSamak <malavika2 at apple.com>
Date: 2023-04-24 (Mon, 24 Apr 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] Bug fix: Handles the assertion violations for code within macros
When macros get expanded, the source location for the expanded code received by the Fixable
gadgets is invalid. We do not want to emit fixits for macro expanded code and it currently
crashes the analysis. This patch fixes the assertion violations that were introduced for
handling code with such invalid locations.
Reviewed by: NoQ, ziqingluo-90, jkorous
Differential revision: https://reviews.llvm.org/D146450
More information about the All-commits
mailing list