[all-commits] [llvm/llvm-project] 4d2af8: [LifetimeSafety] Track dereference operators behin...
Utkarsh Saxena via All-commits
all-commits at lists.llvm.org
Mon Jan 19 12:10:12 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4d2af858f6a2c74e42837d60e840242f67157e99
https://github.com/llvm/llvm-project/commit/4d2af858f6a2c74e42837d60e840242f67157e99
Author: Utkarsh Saxena <usx at google.com>
Date: 2026-01-19 (Mon, 19 Jan 2026)
Changed paths:
M clang/include/clang/Analysis/Analyses/LifetimeSafety/LifetimeAnnotations.h
M clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
M clang/lib/Analysis/LifetimeSafety/LifetimeAnnotations.cpp
M clang/lib/Sema/CheckExprLifetime.cpp
M clang/test/Sema/Inputs/lifetime-analysis.h
M clang/test/Sema/warn-lifetime-analysis-nocfg.cpp
Log Message:
-----------
[LifetimeSafety] Track dereference operators behind a flag (#176794)
Add a parameter to `shouldTrackImplicitObjectArg` to differentiate
between lifetime safety analysis and statement-local analysis.
The statement-local analysis was experiencing false positives when
tracking dereference operators for GSL pointers, so this change allows
for more aggressive tracking in the full analysis while being more
conservative in the statement-local analysis.
- Added a `RunningUnderLifetimeSafety` boolean parameter to
`shouldTrackImplicitObjectArg` function to distinguish between lifetime
safety analysis and Sema's statement-local analysis
- Enhanced tracking of dereference operators for GSL pointers in STL:
- Now tracks both `operator*` and `operator->` when running under
lifetime safety analysis
- Avoids tracking these operators in statement-local analysis to prevent
false positives
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list