[clang-tools-extra] r369578 - Fix documentation build after rL369568
Yuanfang Chen via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 21 13:59:16 PDT 2019
Author: yuanfang
Date: Wed Aug 21 13:59:16 2019
New Revision: 369578
URL: http://llvm.org/viewvc/llvm-project?rev=369578&view=rev
Log:
Fix documentation build after rL369568
Modified:
clang-tools-extra/trunk/docs/clang-tidy/checks/bugprone-dynamic-static-initializers.rst
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/bugprone-dynamic-static-initializers.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/bugprone-dynamic-static-initializers.rst?rev=369578&r1=369577&r2=369578&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/bugprone-dynamic-static-initializers.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/bugprone-dynamic-static-initializers.rst Wed Aug 21 13:59:16 2019
@@ -17,11 +17,11 @@ problems.
Consider the following code:
--- code-block:: c
+.. code-block:: c
-int foo() {
- static int k = bar();
- return k;
-}
+ int foo() {
+ static int k = bar();
+ return k;
+ }
When synchronization of static initialization is disabled, if two threads both call `foo` for the first time, there is the possibility that `k` will be double initialized, creating a race condition.
More information about the cfe-commits
mailing list