mirror of
https://github.com/golang/go
synced 2024-11-17 18:14:46 -07:00
6e46c8fbb5
As with CL 285875, this required resolving some conflicts around handling of //go:embed directives. Still further work is needed to reject uses of //go:embed in files that don't import "embed", so this is left as a TODO. (When this code was written for dev.typeparams, we were still leaning towards not requiring the "embed" import.) Also, the recent support for inlining closures (CL 283112) interacts poorly with -G=3 mode. There are some known issues with this code already (#43818), so for now this CL disables inlining of closures when in -G=3 mode with a TODO to revisit this once closure inlining is working fully. Conflicts: - src/cmd/compile/internal/noder/noder.go - src/cmd/compile/internal/typecheck/dcl.go - src/cmd/compile/internal/typecheck/func.go - test/run.go Merge List: + 2021-01-227e0a81d280
[dev.regabi] all: merge master (dab3e5a
) into dev.regabi + 2021-01-22dab3e5affe
runtime: switch runtime to libc for openbsd/amd64 + 2021-01-22a1b53d85da
cmd/go: add documentation for test and xtest fields output by go list + 2021-01-22b268b60774
runtime: remove pthread_kill/pthread_self for openbsd + 2021-01-22ec4051763d
runtime: fix typo in mgcscavenge.go + 2021-01-227ece3a7b17
net/http: fix flaky TestDisableKeepAliveUpgrade + 2021-01-2250cba0506f
time: clarify Timer.Reset behavior on AfterFunc Timers + 2021-01-22cf10e69f17
doc/go1.16: mention net/http.Transport.GetProxyConnectHeader + 2021-01-22ec1b945265
doc/go1.16: mention path/filepath.WalkDir + 2021-01-2211def3d40b
doc/go1.16: mention syscall.AllThreadsSyscall + 2021-01-2107b0235609
doc/go1.16: add notes about package-specific fs.FS changes + 2021-01-21e2b4f1fea5
doc/go1.16: minor formatting fix + 2021-01-219f43a9e07b
doc/go1.16: mention new debug/elf constants + 2021-01-213c2f11ba5b
cmd/go: overwrite program name with full path + 2021-01-21953d1feca9
all: introduce and use internal/execabs + 2021-01-21b186e4d70d
cmd/go: add test case for cgo CC setting + 2021-01-215a8a2265fb
cmd/cgo: report exec errors a bit more clearly + 2021-01-2146e2e2e9d9
cmd/go: pass resolved CC, GCCGO to cgo + 2021-01-213d40895e36
runtime: switch openbsd/arm64 to pthreads + 2021-01-21d95ca91380
crypto/elliptic: fix P-224 field reduction + 2021-01-21d7e71c01ad
[dev.regabi] cmd/compile: replace ir.Name map with ir.NameSet for dwarf + 2021-01-215248f59a22
[dev.regabi] cmd/compile: replace ir.Name map with ir.NameSet for SSA + 2021-01-21970d8b6cb2
[dev.regabi] cmd/compile: replace ir.Name map with ir.NameSet in inlining + 2021-01-2168a4664475
[dev.regabi] cmd/compile: remove tempAssigns in walkCall1 + 2021-01-21fd9a391cdd
[dev.regabi] cmd/compile: remove CallExpr.Rargs + 2021-01-2119a6db6b63
[dev.regabi] cmd/compile: make sure mkcall* passed non-nil init + 2021-01-219f036844db
[dev.regabi] cmd/compile: use ir.DoChildren directly in inlining + 2021-01-21213c3905e9
[dev.regabi] cmd/compile: use node walked flag to prevent double walk for walkSelect + 2021-01-201760d736f6
[dev.regabi] cmd/compile: exporting, importing, and inlining functions with OCLOSURE + 2021-01-20ecf4ebf100
cmd/internal/moddeps: check content of all modules in GOROOT + 2021-01-2092cb157cf3
[dev.regabi] cmd/compile: late expansion of return values + 2021-01-20d2d155d1ae
runtime: don't adjust timer pp field in timerWaiting status + 2021-01-20803d18fc6c
cmd/go: set Incomplete field on go list output if no files match embed + 2021-01-206e243ce71d
cmd/go: have go mod vendor copy embedded files in subdirs + 2021-01-20be28e5abc5
cmd/go: fix mod_get_fallback test + 2021-01-20928bda4f4a
runtime: convert openbsd/amd64 locking to libc + 2021-01-19824f2d635c
cmd/go: allow go fmt to complete when embedded file is missing + 2021-01-190575e35e50
cmd/compile: require 'go 1.16' go.mod line for //go:embed + 2021-01-199423d50d53
[dev.regabi] cmd/compile: use '%q' for printing rune values less than 128 + 2021-01-19ccb2e90688
cmd/link: exit before Asmb2 if error + 2021-01-19ca5774a5a5
embed: treat uninitialized FS as empty + 2021-01-19d047c91a6c
cmd/link,runtime: switch openbsd/amd64 to pthreads + 2021-01-1961debffd97
runtime: factor out usesLibcall + 2021-01-199fed39d281
runtime: factor out mStackIsSystemAllocated + 2021-01-19a2f825c542
[dev.regabi] cmd/compile: directly create go.map and go.track symbols + 2021-01-194a4212c0e5
[dev.regabi] cmd/compile: refactor Linksym creation + 2021-01-194f5c603c0f
[dev.regabi] cmd/compile: cleanup callTargetLSym + 2021-01-18dbab079835
runtime: free Windows event handles after last lock is dropped + 2021-01-185a8fbb0d2d
os: do not close syscall.Stdin in TestReadStdin + 2021-01-18422f38fb6c
[dev.regabi] cmd/compile: move stack objects to liveness + 2021-01-186113db0bb4
[dev.regabi] cmd/compile: convert OPANIC argument to interface{} during typecheck + 2021-01-184c835f9169
[dev.regabi] cmd/compile: use LinksymOffsetExpr in TypePtr/ItabAddr + 2021-01-180ffa1ead6e
[dev.regabi] cmd/compile: use *obj.LSym instead of *ir.Name for staticdata functions + 2021-01-177e0fa38aad
[dev.regabi] cmd/compile: remove unneeded packages from ir.Pkgs + 2021-01-1799a5db11ac
[dev.regabi] cmd/compile: use LinksymOffsetExpr in walkConvInterface + 2021-01-1787845d14f9
[dev.regabi] cmd/compile: add ir.TailCallStmt + 2021-01-17e3027c6828
[dev.regabi] cmd/compile: fix linux-amd64-noopt builder + 2021-01-1759ff93fe64
[dev.regabi] cmd/compile: rename NameOffsetExpr to LinksymOffsetExpr + 2021-01-1782b9cae700
[dev.regabi] cmd/compile: change ir.NameOffsetExpr to use *obj.LSym instead of *Name + 2021-01-1788956fc4b1
[dev.regabi] cmd/compile: stop analyze NameOffsetExpr.Name_ in escape analysis + 2021-01-177ce2a8383d
[dev.regabi] cmd/compile: simplify stack temp initialization + 2021-01-17ba0e8a92fa
[dev.regabi] cmd/compile: refactor temp construction in walk + 2021-01-1778e5aabcdb
[dev.regabi] cmd/compile: replace Node.HasCall with walk.mayCall + 2021-01-166de9423445
[dev.regabi] cmd/compile: cleanup OAS2FUNC ordering + 2021-01-16a956a0e909
[dev.regabi] cmd/compile, runtime: fix up comments/error messages from recent renames + 2021-01-16ab3b67abfd
[dev.regabi] cmd/compile: remove ONEWOBJ + 2021-01-16c9b1445ac8
[dev.regabi] cmd/compile: remove TypeAssertExpr {Src,Dst}Type fields + 2021-01-15682a1d2176
runtime: detect errors in DuplicateHandle + 2021-01-159f83418b83
cmd/link: remove GOROOT write in TestBuildForTvOS + 2021-01-15ec9470162f
cmd/compile: allow embed into any string or byte slice type + 2021-01-1554198b04db
cmd/compile: disallow embed of var inside func + 2021-01-15b386c735e7
cmd/go: fix go generate docs + 2021-01-15bb5075a525
syscall: remove RtlGenRandom and move it into internal/syscall + 2021-01-151deae0b597
os: invoke processKiller synchronously in testKillProcess + 2021-01-1503a875137f
[dev.regabi] cmd/compile: unexport reflectdata.WriteType + 2021-01-1514537e6e54
[dev.regabi] cmd/compile: move stkobj symbol generation to SSA + 2021-01-15ab523fc510
[dev.regabi] cmd/compile: don't promote Byval CaptureVars if Addrtaken + 2021-01-15ff196c3e84
crypto/x509: update iOS bundled roots to version 55188.40.9 + 2021-01-15b7a698c73f
[dev.regabi] test: disable test on windows because expected contains path separators. + 2021-01-154be7af23f9
[dev.regabi] cmd/compile: fix ICE during ir.Dump + 2021-01-14e125ccd10e
cmd/go: in 'go mod edit', validate versions given to -retract and -exclude + 2021-01-14eb330020dc
cmd/dist, cmd/go: pass -arch for C compilation on Darwin + 2021-01-1484e8a06f62
cmd/cgo: remove unnecessary space in cgo export header + 2021-01-140c86b999c3
cmd/test2json: document passing -test.paniconexit0 + 2021-01-149135795891
cmd/go/internal/load: report positions for embed errors + 2021-01-1435b9c66601
[dev.regabi] cmd/compile,cmd/link: additional code review suggestions for CL 270863 + 2021-01-14d9b79e53bb
cmd/compile: fix wrong complement for arm64 floating-point comparisons + 2021-01-14c73232d08f
cmd/go/internal/load: refactor setErrorPos to PackageError.setPos + 2021-01-146aa28d3e06
go/build: report positions for go:embed directives + 2021-01-149734fd482d
[dev.regabi] cmd/compile: use node walked flag to prevent double walk for walkSwitch + 2021-01-14f97983249a
[dev.regabi] cmd/compile: move more PAUTOHEAP to SSA construction + 2021-01-144476300425
[dev.regabi] cmd/compile: use byte for CallExpr.Use + 2021-01-145a5ab24689
[dev.regabi] cmd/compile: do not rely on CallExpr.Rargs for detect already walked calls + 2021-01-14983ac4b086
[dev.regabi] cmd/compile: fix ICE when initializing blank vars + 2021-01-137eb31d999c
cmd/go: add hints to more missing sum error messages + 2021-01-13d6d4673728
[dev.regabi] cmd/compile: fix GOEXPERIMENT=regabi builder + 2021-01-13c41b999ad4
[dev.regabi] cmd/compile: refactor abiutils from "gc" into new "abi" + 2021-01-13861707a8c8
[dev.regabi] cmd/compile: added limited //go:registerparams pragma for new ABI dev + 2021-01-13c1370e918f
[dev.regabi] cmd/compile: add code to support register ABI spills around morestack calls + 2021-01-132abd24f3b7
[dev.regabi] test: make run.go error messages slightly more informative + 2021-01-139a19481acb
[dev.regabi] cmd/compile: make ordering for InvertFlags more stable + 2021-01-12ba76567bc2
cmd/go/internal/modload: delete unused *mvsReqs.next method + 2021-01-12665def2c11
encoding/asn1: document unmarshaling behavior for IMPLICIT string fields + 2021-01-1181ea89adf3
cmd/go: fix non-script staleness checks interacting badly with GOFLAGS + 2021-01-11759309029f
doc: update editors.html for Go 1.16 + 2021-01-11c3b4c7093a
cmd/internal/objfile: don't require runtime.symtab symbol for XCOFF + 2021-01-0859bfc18e34
cmd/go: add hint to read 'go help vcs' to GOVCS errors + 2021-01-08cd6f3a54e4
cmd/go: revise 'go help' documentation for modules + 2021-01-086192b98751
cmd/go: make hints in error messages more consistent + 2021-01-0825886cf4bd
cmd/go: preserve sums for indirect deps fetched by 'go mod download' + 2021-01-086250833911
runtime/metrics: mark histogram metrics as cumulative + 2021-01-088f6a9acbb3
runtime/metrics: remove unused StopTheWorld Description field + 2021-01-086598c65646
cmd/compile: fix exponential-time init-cycle reporting + 2021-01-08fefad1dc85
test: fix timeout code for invoking compiler + 2021-01-086728118e0a
cmd/go: pass signals forward during "go tool" + 2021-01-08e65c543f3c
go/build/constraint: add parser for build tag constraint expressions + 2021-01-080c5afc4fb7
testing/fstest,os: clarify racy behavior of TestFS + 2021-01-0832afcc9436
runtime/metrics: change unit on *-by-size metrics to match bucket unit + 2021-01-08c6513bca5a
io/fs: minor corrections to Glob doc + 2021-01-08304f769ffc
cmd/compile: don't short-circuit copies whose source is volatile + 2021-01-08ae97717133
runtime,runtime/metrics: use explicit histogram boundaries + 2021-01-08a9ccd2d795
go/build: skip string literal while findEmbed + 2021-01-08d92f8add32
archive/tar: fix typo in comment + 2021-01-08cab1202183
cmd/link: accept extra blocks in TestFallocate + 2021-01-08ee4d32249b
io/fs: minor corrections to Glob release date + 2021-01-0854bd1ccce2
cmd: update to latest golang.org/x/tools + 2021-01-079ec21a8f34
Revert "reflect: support multiple keys in struct tags" + 2021-01-07091414b5b7
io/fs: correct WalkDirFunc documentation + 2021-01-079b55088d6b
doc/go1.16: add release note for disallowing non-ASCII import paths + 2021-01-07fa90aaca7d
cmd/compile: fix late expand_calls leaf type for OpStructSelect/OpArraySelect + 2021-01-077cee66d4cb
cmd/go: add documentation for Embed fields in go list output + 2021-01-07e60cffa4ca
html/template: attach functions to namespace + 2021-01-076da2d3b7d7
cmd/link: fix typo in asm.go + 2021-01-07df81a15819
runtime: check mips64 VDSO clock_gettime return code + 2021-01-064787e906cf
crypto/x509: rollback new CertificateRequest fields + 2021-01-06c9658bee93
cmd/go: make module suggestion more friendly + 2021-01-064c668b25c6
runtime/metrics: fix panic message for Float64Histogram + 2021-01-06d2131704a6
net/http/httputil: fix deadlock in DumpRequestOut + 2021-01-053e1e13ce6d
cmd/go: set cfg.BuildMod to "readonly" by default with no module root + 2021-01-050b0d004983
cmd/go: pass embedcfg to gccgo if supported + 2021-01-051b85e7c057
cmd/go: don't scan gccgo standard library packages for imports + 2021-01-056b37b15d95
runtime: don't take allglock in tracebackothers + 2021-01-049eef49cfa6
math/rand: fix typo in comment + 2021-01-04b01fb2af9e
testing/fstest: fix typo in error message + 2021-01-013dd5867605
doc: 2021 is the Year of the Gopher + 2020-12-3195ce805d14
io/fs: remove darwin/arm64 special condition + 2020-12-3020d0991b86
lib/time, time/tzdata: update tzdata to 2020f + 2020-12-30ed301733bb
misc/cgo/testcarchive: remove special flags for Darwin/ARM + 2020-12-300ae2e032f2
misc/cgo/test: enable TestCrossPackageTests on darwin/arm64 + 2020-12-29780b4de16b
misc/ios: fix wording for command line instructions + 2020-12-29b4a71c95d2
doc/go1.16: reference misc/ios/README for how to build iOS programs + 2020-12-29f83e0f6616
misc/ios: add to README how to build ios executables + 2020-12-284fd9455882
io/fs: fix typo in comment Change-Id: If24bb93f1e1e7deb1d92ba223c85940ab93b2732
12 lines
442 B
Go
12 lines
442 B
Go
// errorcheck
|
|
|
|
// Copyright 2021 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package p
|
|
|
|
var _ = true == '\\' // ERROR "invalid operation: true == '\\\\'|cannot convert true"
|
|
var _ = true == '\'' // ERROR "invalid operation: true == '\\''|cannot convert true"
|
|
var _ = true == '\n' // ERROR "invalid operation: true == '\\n'|cannot convert true"
|