tools/go/pointer/testdata
Dominik Honnef a99f4ece36 go/pointer: implement extended queries
The existing API for querying values only allows directly querying
pointer-like values, or pointers to such values. The new, extended
queries make it possible to destructure values and access arbitrarily
nested pointers, such as fields in structs, or specific values in
tuples.

We use single Go expressions as the queries, which we further restrict
to a subset of the language (indexing, field access, pointer
dereferences and channel receives).

Instead of adding another map to Result, we return a *Pointer and
populate it during analysis. This does mean that a Config cannot be
reused for multiple analyses, as it now holds analysis-specific state.
That is, however, not a big problem as reusing one Config had little
use.

Since the new API can do everything the old could, it deprecates
AddQuery and AddIndirectQuery.

Change-Id: I4b2ae7d85c462bc7faa6bab76456106e76be5a65
Reviewed-on: https://go-review.googlesource.com/37635
Reviewed-by: Alan Donovan <adonovan@google.com>
2017-03-06 04:11:41 +00:00
..
a_test.go go.tools/go/loader: permit Create* methods to specify the ad-hoc package's path 2014-01-22 09:59:19 -05:00
another.go go/pointer: fix two crashes caused by 'print()'. 2014-11-20 13:33:20 -05:00
arrayreflect.go go.tools: fix various typos 2014-05-02 14:38:08 -07:00
arrays.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
channels.go x/tools/go: gofmt -s -w 2017-02-15 21:43:35 +00:00
chanreflect.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
chanreflect1.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
context.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
conv.go go.tools/go/pointer: eliminate TODOs regarding sound treatment of unsafe.Pointer. 2014-07-08 10:11:36 -04:00
extended.go go/pointer: implement extended queries 2017-03-06 04:11:41 +00:00
finalizer.go go/pointer: implement pointer equivalence via hash-value numbering, a pre-solver optimization. 2014-06-16 15:46:07 -04:00
flow.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
fmtexcerpt.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
func.go go.tools/go/ssa: improve printing of anonymous functions. 2014-07-31 17:37:41 -04:00
funcreflect.go go.tools/ssa: create thunks for method expressions T.f. 2014-06-11 13:10:26 -04:00
hello.go go.tools: fix various typos 2014-05-02 14:38:08 -07:00
interfaces.go go.tools/ssa: create thunks for method expressions T.f. 2014-06-11 13:10:26 -04:00
issue9002.go go/pointer: fix panic due to bogus constraint from value,ok receive operation. 2014-10-27 13:55:52 -04:00
mapreflect.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
maps.go go/pointer: fix bug in constraint generation of "for _, v := range map" 2015-10-26 16:28:05 +00:00
panic.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
recur.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
reflect.go go.tools/go/pointer: fix solver nontermination bug due to reflective type construction cycles. 2014-05-30 16:27:51 -04:00
rtti.go x/tools: s/oracle/guru/g in various comments 2016-10-13 18:54:04 +00:00
structreflect.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
structs.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
timer.go go.tools/go/pointer: add test file missing from CL 112610043 (rev 32ae05502022) 2014-07-23 12:28:56 -04:00