[all-commits] [llvm/llvm-project] 6f659b: [clang][dataflow] For bugprone-unchecked-optional-...
Jan Voung via All-commits
all-commits at lists.llvm.org
Mon Mar 17 13:04:36 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6f659b0060d615435ceec53de407a8084656bc98
https://github.com/llvm/llvm-project/commit/6f659b0060d615435ceec53de407a8084656bc98
Author: Jan Voung <jvoung at google.com>
Date: 2025-03-17 (Mon, 17 Mar 2025)
Changed paths:
M clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp
M clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h
M clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
M clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp
Log Message:
-----------
[clang][dataflow] For bugprone-unchecked-optional-access report range (#131055)
Report the range in diagnostics, in addition to the location
in case the range helps disambiguate a little in chained `->`
expressions.
```
b->a->f->x = 1;
^~~~~~~
```
instead of just:
```
b->a->f->x = 1;
^
```
As a followup we should probably also report the location/range
of an `->` if that operator is used. Like:
```
b->a->f->x = 1;
^~
```
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