[PATCH] D77461: [clang-tidy] Remove false positive in AvoidNonConstGlobalVariables

2020-04-06 Thread Roman Lebedev via Phabricator via cfe-commits
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

[PATCH] D77461: [clang-tidy] Remove false positive in AvoidNonConstGlobalVariables

2020-04-06 Thread Dmitri Gribenko via Phabricator via cfe-commits
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

[PATCH] D77461: [clang-tidy] Remove false positive in AvoidNonConstGlobalVariables

2020-04-04 Thread Kim Viggedal via Phabricator via cfe-commits
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

[PATCH] D77461: [clang-tidy] Remove false positive in AvoidNonConstGlobalVariables

2020-04-04 Thread Kim Viggedal via Phabricator via cfe-commits
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