courbet added inline comments.

================
Comment at: 
docs/clang-tidy/checks/cppcoreguidelines-interfaces-global-init.rst:7
@@ +6,3 @@
+This check flags initializers of globals that access extern objects,
+and therefore can lead to order-of-initialization problems.
+
----------------
alexfh wrote:
> What about indirect access of other globals, e.g. via function calls? We 
> obviously can't analyze functions defined in a different translation unit, 
> and I'm not sure we need to analyze even those defined in the same TU (since 
> it may be imprecise and quite expensive), but maybe we should use some 
> heuristic here (the most agressive would be to flag all initializers 
> containing function calls, but that might be rather noisy).
The guidelines actually recommend flagging calls non-constexpr functions, but 
this would give too many positives. I've added a note.


http://reviews.llvm.org/D18649



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to