[PATCH] D12973: [Static Analyzer] General type checker based on dynamic type information.

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 18 10:19:34 PDT 2015


xazax.hun created this revision.
xazax.hun added reviewers: zaks.anna, dcoughlin, jordan_rose.
xazax.hun added a subscriber: cfe-commits.

This patch adds a checker that utilizes the information that was collected by DynamicTypePropagation and warns when the static type contradicts the dynamic type.

This checker also replaces the AST matching logic in ObjCGenericsChecker's return type checking which was error prone and fragile. As a positive side effect this change also reduced the false negative cases.

http://reviews.llvm.org/D12973

Files:
  lib/StaticAnalyzer/Checkers/CMakeLists.txt
  lib/StaticAnalyzer/Checkers/Checkers.td
  lib/StaticAnalyzer/Checkers/DynamicTypeChecker.cpp
  lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp
  test/Analysis/dynamic_type_check.m
  test/Analysis/generics.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12973.35099.patch
Type: text/x-patch
Size: 53842 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150918/63e17d8b/attachment-0001.bin>


More information about the cfe-commits mailing list