[Analyzer] ConversionChecker: track back the cast expression
authorGabor Marton <gabor.marton@ericsson.com>
Wed, 15 Sep 2021 16:32:19 +0000 (18:32 +0200)
committerGabor Marton <gabor.marton@ericsson.com>
Thu, 16 Sep 2021 09:42:54 +0000 (11:42 +0200)
commit96ec9b6ff2f0bb9078306e3857f09974603ccbe4
tree04cc1bb94bd65c9cc09c6ac21e1edf8fd1f9f7be
parentbd590a5f895f50ceb7669de1b4a69bbcc8adb38b
[Analyzer] ConversionChecker: track back the cast expression

Adding trackExpressionValue to the checker so it tracks the value of the
implicit cast's DeclRefExpression up to initialization/assignment. This
way the report becomes cleaner.

Differential Revision: https://reviews.llvm.org/D109836
clang/lib/StaticAnalyzer/Checkers/ConversionChecker.cpp
clang/test/Analysis/conversion-tracking-notes.c [new file with mode: 0644]
clang/test/Analysis/conversion.c