aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/declextract
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-12-16 10:47:18 +0100
committerDmitry Vyukov <dvyukov@google.com>2024-12-16 09:59:35 +0000
commitf93b2b552ce5fe589b450ff74ca1b459cdbc71a8 (patch)
tree950e3a13204841ccc67dd41130b81d5cda863460 /pkg/declextract
parenteec85da60b9ae37e7bfc959b3eb946907abec5e7 (diff)
pkg/declextract: fix static function handling
The check did not actually match any header files. Fix the check.
Diffstat (limited to 'pkg/declextract')
-rw-r--r--pkg/declextract/interface.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/declextract/interface.go b/pkg/declextract/interface.go
index 7abce44fb..b5c8ea5ac 100644
--- a/pkg/declextract/interface.go
+++ b/pkg/declextract/interface.go
@@ -53,7 +53,7 @@ func (ctx *context) processFunctions() {
ctx.funcs[fn.File+fn.Name] = fn
// Strictly speaking there may be several different static functions in different headers,
// but we ignore such possibility for now.
- if !fn.IsStatic || strings.HasSuffix(fn.File, "*.h") {
+ if !fn.IsStatic || strings.HasSuffix(fn.File, ".h") {
ctx.funcs[fn.Name] = fn
}
}
@@ -77,7 +77,7 @@ func (ctx *context) processFunctions() {
func (ctx *context) reachableLOC(name, file string) int {
fn := ctx.findFunc(name, file)
if fn == nil {
- ctx.warn("can't find function %v in called in %v", name, file)
+ ctx.warn("can't find function %v called in %v", name, file)
return 0
}
reachable := make(map[*Function]bool)