lebedev.ri added a comment.
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Ri-global
is in "Interfaces" section, it only covers inter-procedural stuff.
Diagnosing function-local static non-const variable is a plain false-positive
diagnostic.
Repository:
rG LLVM
gribozavr2 added a comment.
I expect different style guides to have a different opinion on this, depending
on the justification for the rule.
> The purpose of the rule is to avoid code which causes hidden dependencies.
That's one justification, which would prohibit such static variables.
Anoth
vingeldal created this revision.
Herald added subscribers: cfe-commits, kbarton, xazax.hun, nemanjai.
Herald added a project: clang.
vingeldal added a comment.
Herald added a subscriber: wuzish.
After looking in to it I got less certain of where the error lies and
eventually I got uncertain if th
vingeldal added a comment.
Herald added a subscriber: wuzish.
After looking in to it I got less certain of where the error lies and
eventually I got uncertain if this even is a false negative, so I started out
with just posting a change where the unit test is updated to detect the issue.
This is