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

Kim Viggedal via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 13 06:25:24 PDT 2020


vingeldal added a comment.

I'm also adding to this discussion the exception-part of the rule:
"A global object is often better than a singleton."

I would argue that the example given above, while not strictly follwong the definition of a singleton, is behaviorally consistent with a singleton.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77461/new/

https://reviews.llvm.org/D77461





More information about the cfe-commits mailing list