Commit d8b417e0 authored by Alekseev Artem's avatar Alekseev Artem Committed by Daniel Martí

cmd/internal/obj/x86: use raw string literals in regexp

Found with megacheck (S1007).

Change-Id: Icb15fd5bfefa8e0b39a1bfa9ec3e9af3eff6b390
Reviewed-on: https://go-review.googlesource.com/105415
Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com>
Reviewed-by: 's avatarDaniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 3e31eb6b
......@@ -74,7 +74,7 @@ func parseTestData(t *testing.T) *ParsedTestData {
return r
}
var spaces_re *regexp.Regexp = regexp.MustCompile("\\s+")
var spaces_re *regexp.Regexp = regexp.MustCompile(`\s+`)
func normalize(s string) string {
return spaces_re.ReplaceAllLiteralString(strings.TrimSpace(s), " ")
......@@ -115,7 +115,7 @@ func asmOutput(t *testing.T, s string) []byte {
func parseOutput(t *testing.T, td *ParsedTestData, asmout []byte) {
scanner := bufio.NewScanner(bytes.NewReader(asmout))
marker := regexp.MustCompile("MOVQ \\$([0-9]+), AX")
marker := regexp.MustCompile(`MOVQ \$([0-9]+), AX`)
mark := -1
td.marker_to_output = make(map[int][]string)
for scanner.Scan() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment