[PATCH] D54222: [clang-tidy/checks] Add a checker to detect returning static locals in public headers
Eugene Zelenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 7 13:52:58 PST 2018
Eugene.Zelenko added a comment.
C++ Core Guidelines also mentioned similar patterns, so may be this check belongs to bugprone module?
================
Comment at: docs/clang-tidy/checks/llvm-problematic-statics.rst:7
+
+Looks for functions defined in "public" headers that return the address of a static local. These are not guaranteed to have the addresss across shared libraries and could be problematic for plugins.
+
----------------
static local variable? Probably //Looks for// should be replaced with //Detects//. Please also wrap with 80 characters.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D54222
More information about the cfe-commits
mailing list