[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types in DynamicTypeMap

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 15 17:27:15 PDT 2019


Charusso created this revision.
Charusso added reviewers: NoQ, xazax.hun.
Charusso added a project: clang.
Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware.
Charusso added a comment.
Charusso added a parent revision: D66267: [analyzer] TrackConstraintBRVisitor: Do not track unknown values.

@xazax.hun It is somehow performance critical code as we have too many casts in the LLVM. I would really appreciate it if you could review it.


This patch extends the `DynamicTypeInfo` to hold information about the
dynamic type what could not be due to failed casts. With that improvement
the checker could use the `DynamicTypeMap` to store information about the
dynamic types. It improves the path-feasibility to prevent false positives.


Repository:
  rC Clang

https://reviews.llvm.org/D66325

Files:
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeInfo.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeMap.h
  clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp
  clang/lib/StaticAnalyzer/Core/DynamicTypeMap.cpp
  clang/test/Analysis/cast-value-logic.cpp
  clang/test/Analysis/cast-value-notes.cpp
  clang/test/Analysis/cast-value.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66325.215514.patch
Type: text/x-patch
Size: 33228 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190816/ece24420/attachment-0001.bin>


More information about the cfe-commits mailing list