Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions compiler/testdata/pragma.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ func foobarImport()
func foobarExportModule() {
}

// This function should not: it's only a declaration and not a definition.
//
//go:section .special_function_section
func undefinedFunctionNotInSection()

//go:section .special_global_section
Expand All @@ -116,9 +113,6 @@ var multipleGlobalPragmas uint32
//go:noescape
func doesNotEscapeParam(a *int, b []int, c chan int, d *[0]byte)

// The //go:noescape pragma only works on declarations, not definitions.
//
//go:noescape

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused, why does this have to be removed? (Not that I know why this was there in the first place)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a PR coming which will validate pragmas better; it started from the //go:nolinktime PR, but I spotted that other pragmas could validate their arguments sooner and spot invalid use rather than silently being ignored

func stillEscapes(a *int, b []int, c chan int, d *[0]byte) {
}

Expand Down
Loading