aboutsummaryrefslogtreecommitdiff
path: root/go/ssa
diff options
context:
space:
mode:
Diffstat (limited to 'go/ssa')
-rw-r--r--go/ssa/builder_test.go4
-rw-r--r--go/ssa/example_test.go2
-rw-r--r--go/ssa/source_test.go8
-rw-r--r--go/ssa/ssautil/switch_test.go4
4 files changed, 9 insertions, 9 deletions
diff --git a/go/ssa/builder_test.go b/go/ssa/builder_test.go
index 8a81d3abf..d69ca85c6 100644
--- a/go/ssa/builder_test.go
+++ b/go/ssa/builder_test.go
@@ -42,7 +42,7 @@ func main() {
// Create a single-file main package.
var conf loader.Config
- f, err := conf.ParseFile("<input>", test, 0)
+ f, err := conf.ParseFile("<input>", test)
if err != nil {
t.Error(err)
return
@@ -211,7 +211,7 @@ func TestTypesWithMethodSets(t *testing.T) {
for _, test := range tests {
// Create a single-file main package.
var conf loader.Config
- f, err := conf.ParseFile("<input>", test.input, 0)
+ f, err := conf.ParseFile("<input>", test.input)
if err != nil {
t.Errorf("test %q: %s", test.input[:15], err)
continue
diff --git a/go/ssa/example_test.go b/go/ssa/example_test.go
index 71ec90caa..c2d3a8ffb 100644
--- a/go/ssa/example_test.go
+++ b/go/ssa/example_test.go
@@ -43,7 +43,7 @@ func main() {
var conf loader.Config
// Parse the input file.
- file, err := conf.ParseFile("hello.go", hello, 0)
+ file, err := conf.ParseFile("hello.go", hello)
if err != nil {
fmt.Print(err) // parse error
return
diff --git a/go/ssa/source_test.go b/go/ssa/source_test.go
index ee371c8ba..0ad982023 100644
--- a/go/ssa/source_test.go
+++ b/go/ssa/source_test.go
@@ -24,8 +24,8 @@ import (
)
func TestObjValueLookup(t *testing.T) {
- var conf loader.Config
- f, err := conf.ParseFile("testdata/objlookup.go", nil, parser.ParseComments)
+ conf := loader.Config{ParserMode: parser.ParseComments}
+ f, err := conf.ParseFile("testdata/objlookup.go", nil)
if err != nil {
t.Error(err)
return
@@ -186,8 +186,8 @@ func checkVarValue(t *testing.T, prog *ssa.Program, pkg *ssa.Package, ref []ast.
// Ensure that, in debug mode, we can determine the ssa.Value
// corresponding to every ast.Expr.
func TestValueForExpr(t *testing.T) {
- var conf loader.Config
- f, err := conf.ParseFile("testdata/valueforexpr.go", nil, parser.ParseComments)
+ conf := loader.Config{ParserMode: parser.ParseComments}
+ f, err := conf.ParseFile("testdata/valueforexpr.go", nil)
if err != nil {
t.Error(err)
return
diff --git a/go/ssa/ssautil/switch_test.go b/go/ssa/ssautil/switch_test.go
index a68f4644e..86d5bfb26 100644
--- a/go/ssa/ssautil/switch_test.go
+++ b/go/ssa/ssautil/switch_test.go
@@ -15,8 +15,8 @@ import (
)
func TestSwitches(t *testing.T) {
- var conf loader.Config
- f, err := conf.ParseFile("testdata/switches.go", nil, parser.ParseComments)
+ conf := loader.Config{ParserMode: parser.ParseComments}
+ f, err := conf.ParseFile("testdata/switches.go", nil)
if err != nil {
t.Error(err)
return