rsmith added inline comments.
================ Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-problematic-statics.rst:7-8 +Detects functions defined in headers that return the address of a static +local variable. These are not guaranteed to have the same addresss across +shared libraries and could be problematic for plugins. + ---------------- The C++ language rules do guarantee that such static locals have the same address throughout the entire program. Should this warning check the symbol visibility / `dllexport`edness? People are going to learn the wrong thing if we give them this diagnostic without any further explanation. If the concern is plugins loaded with `RTLD_LOCAL`, sharing C++ interfaces across an `RTLD_LOCAL` boundary is pretty fundamentally broken, and this is far from the only way in which it goes wrong. It might be better to warn on all non-`RTLD_GLOBAL` calls to `dlopen` from C++ code... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54222/new/ https://reviews.llvm.org/D54222 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits