[PATCH] D26838: [analyzer] Enforce super-region classes for various memory regions through compile-time and run-time type checks.

Artem Dergachev via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 17 23:29:31 PST 2016


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

Put a lot of compile-time and run-time checks on classes of super regions of all `SubRegion` classes, in order to maintain the existing status quo.
This should make understanding the hierarchy easier, and probably help us catch some bugs.

This is an API-breaking change (we now require explicit casts to specific region sub-classes), but in practice very few checkers are affected.


https://reviews.llvm.org/D26838

Files:
  include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
  include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
  lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp
  lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
  lib/StaticAnalyzer/Core/MemRegion.cpp
  lib/StaticAnalyzer/Core/RegionStore.cpp
  lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
  lib/StaticAnalyzer/Core/Store.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26838.78475.patch
Type: text/x-patch
Size: 25952 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161118/891a4361/attachment-0001.bin>


More information about the cfe-commits mailing list