Skip #if lines in getNameFromDecl.
Otherwise we get all these 'defined' symbols everywhere. Change-Id: I4c21a4df8963146a79af3511a400f06698f1078a Reviewed-on: https://boringssl-review.googlesource.com/4292 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
0d8a758938
commit
71485af5e8
11
util/doc.go
11
util/doc.go
@ -200,7 +200,18 @@ func skipPast(s, skip string) string {
|
||||
return s
|
||||
}
|
||||
|
||||
func skipLine(s string) string {
|
||||
i := strings.Index(s, "\n")
|
||||
if i > 0 {
|
||||
return s[i:]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func getNameFromDecl(decl string) (string, bool) {
|
||||
for strings.HasPrefix(decl, "#if") {
|
||||
decl = skipLine(decl)
|
||||
}
|
||||
if strings.HasPrefix(decl, "struct ") {
|
||||
return "", false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user