]> granicus.if.org Git - clang/commit
[analyzer] Nullability: fix notes around synthesized ObjC property accessors.
authorArtem Dergachev <artem.dergachev@gmail.com>
Mon, 5 Jun 2017 12:40:03 +0000 (12:40 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Mon, 5 Jun 2017 12:40:03 +0000 (12:40 +0000)
commitd6f929a22be467bf8cf89eafd5e022a081a45488
tree1b5bbdd4ad39d7120d3ce359d3940da2c22c97d1
parentd5e54601f1177956d8206c08b1c8d7d5fd8e2407
[analyzer] Nullability: fix notes around synthesized ObjC property accessors.

Nullable-to-nonnull checks used to crash when the custom bug visitor was trying
to add its notes to autosynthesized accessors of Objective-C properties.

Now we avoid this, mostly automatically outside of checker control, by
moving the diagnostic to the parent stack frame where the accessor has been
called.

Differential revision: https://reviews.llvm.org/D32437

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304710 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
lib/StaticAnalyzer/Core/PathDiagnostic.cpp
test/Analysis/nullability-notes.m [new file with mode: 0644]