This is an archive of the discontinued LLVM Phabricator instance.

[hwasan] Fix -Wunneeded-internal-declaration by declaring static inline
ClosedPublic

Authored by thurston on Apr 27 2023, 7:50 PM.

Details

Summary

https://reviews.llvm.org/D149386 caused a buildbot error (https://lab.llvm.org/buildbot#builders/37/builds/21766):

'In file included from /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/lib/hwasan/hwasan_interceptors.cpp:18:
/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/lib/hwasan/hwasan_checks.h:128:53: error: 'static' function 'PossiblyShortTagMatches' declared in header file should be declared 'static inline' [-Werror,-Wunneeded-internal-declaration]
attribute((always_inline, nodebug)) static bool PossiblyShortTagMatches('

This patch simply adds the inline annotation.

Diff Detail

Event Timeline

thurston created this revision.Apr 27 2023, 7:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2023, 7:50 PM
Herald added subscribers: Enna1, pengfei. · View Herald Transcript
thurston requested review of this revision.Apr 27 2023, 7:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2023, 7:50 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
This revision was not accepted when it landed; it landed in state Needs Review.Apr 27 2023, 8:38 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.

I submitted this to unbreak the build. Please post-commit audit instead: https://reviews.llvm.org/rG81d06268f47f089335076eb608c880fc0e60a677