[analyzer] Fix JSON dumps for location contexts.
authorArtem Dergachev <artem.dergachev@gmail.com>
Wed, 19 Jun 2019 23:33:48 +0000 (23:33 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Wed, 19 Jun 2019 23:33:48 +0000 (23:33 +0000)
commitf9f6cdb1a8d05585256f6f2285aa684e557e5676
tree280c24cf5efd46d1367f614dfe0c278ed51a55fe
parent3bb7b2ec7f7bcb913dc4a44fdbe14af508acefb7
[analyzer] Fix JSON dumps for location contexts.

Location context ID is a property of the location context, not of an item
within it. It's useful to know the id even when there are no items
in the context, eg. for the purposes of figuring out how did contents
of the Environment for the same location context changed across states.

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

llvm-svn: 363895
clang/lib/Analysis/AnalysisDeclContext.cpp
clang/lib/StaticAnalyzer/Core/Environment.cpp
clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
clang/test/Analysis/dump_egraph.cpp
clang/test/Analysis/expr-inspection.c