This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Fix handling of out-of-line functions in readability-static-accessed-through-instance
ClosedPublic

Authored by PiotrZSL on Aug 7 2023, 1:54 PM.

Details

Summary

Use isStatic instead of isStaticStorageClass to properly
handle a out-of-line definitions.

Fixes: #51861

Diff Detail

Event Timeline

PiotrZSL created this revision.Aug 7 2023, 1:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 7 2023, 1:54 PM
Herald added a subscriber: xazax.hun. · View Herald Transcript
PiotrZSL requested review of this revision.Aug 7 2023, 1:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 7 2023, 1:54 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Eugene.Zelenko added inline comments.
clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp
23

Should be const auto *.

PiotrZSL updated this revision to Diff 548066.Aug 7 2023, 11:06 PM
PiotrZSL marked an inline comment as done.

Fix 'auto'

This revision is now accepted and ready to land.Aug 14 2023, 1:38 PM