]> granicus.if.org Git - clang/commit
[analyzer] Assert that nonloc::SymbolVal always wraps a non-Loc-type symbol.
authorArtem Dergachev <artem.dergachev@gmail.com>
Tue, 17 Jul 2018 00:22:27 +0000 (00:22 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Tue, 17 Jul 2018 00:22:27 +0000 (00:22 +0000)
commit7ba800497502025d63e18a62d295af6c7971f492
treebabc9af33230f00c284f0d2b8e2391ed87dd0792
parentbd8c87930bc3817282e4c040c16a90a66ca7f267
[analyzer] Assert that nonloc::SymbolVal always wraps a non-Loc-type symbol.

In the current SVal hierarchy there are multiple ways of representing certain
values but few are actually used and expected to be seen by the code.

In particular, a value of a symbolic pointer is always represented by a
loc::MemRegionVal that wraps a SymbolicRegion that wraps the pointer symbol
and never by a nonloc::SymbolVal that wraps that symbol directly.

Assert the aforementioned fact. Fix one minor violation of it.

Differential Revision: https://reviews.llvm.org/D48205

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337227 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp