llvm-project/clang/lib/Analysis
ziqingluo-90 6a0f2e539b [-Wunsafe-buffer-usage] Add Fixable for dereference of simple ptr arithmetic
For each expression `e` of the form `*(DRE + n)` (or `*(n + DRE)`), where
`DRE` has a pointer type and `n` is an integer literal, `e` will be
transformed to `DRE[n]` (or `n[DRE]` respectively), if
- `e` is at the left-hand side of an assignment or is an lvalue being casted to an rvalue; and
- the variable referred by `DRE` is going to be transformed to be of `std::span` type.

Reviewed by: jkorous, NoQ

Differential revision: https://reviews.llvm.org/D142795
2023-03-20 17:07:03 -07:00
..
FlowSensitive [clang] Use *{Map,Set}::contains (NFC) 2023-03-15 18:06:34 -07:00
plugins
AnalysisDeclContext.cpp
BodyFarm.cpp
CalledOnceCheck.cpp
CallGraph.cpp
CFG.cpp [clang] Use *{Map,Set}::contains (NFC) 2023-03-15 18:06:34 -07:00
CFGReachabilityAnalysis.cpp
CFGStmtMap.cpp
CloneDetection.cpp
CMakeLists.txt
CocoaConventions.cpp
CodeInjector.cpp
ConstructionContext.cpp
Consumed.cpp
Dominators.cpp
ExprMutationAnalyzer.cpp [clang] Use *{Set,Map}::contains (NFC) 2023-03-14 19:17:18 -07:00
IssueHash.cpp
LiveVariables.cpp
MacroExpansionContext.cpp
ObjCNoReturn.cpp
PathDiagnostic.cpp
PostOrderCFGView.cpp
ProgramPoint.cpp
ReachableCode.cpp [clang][Sema] Avoid duplicate diagnostics for unreachable fallthrough attribute 2023-03-14 08:43:35 -04:00
RetainSummaryManager.cpp
ThreadSafety.cpp [clang] Use *{Set,Map}::contains (NFC) 2023-03-14 19:17:18 -07:00
ThreadSafetyCommon.cpp
ThreadSafetyLogical.cpp
ThreadSafetyTIL.cpp
UninitializedValues.cpp [clang] fix -Wuninitialized for asm goto outputs on indirect edges. 2023-02-16 17:58:35 -08:00
UnsafeBufferUsage.cpp [-Wunsafe-buffer-usage] Add Fixable for dereference of simple ptr arithmetic 2023-03-20 17:07:03 -07:00