================
@@ -813,19 +813,19 @@ changes to one object won't affect the others, the
object's initializer will run
once per copy, etc.
Specifically, this warning fires when it detects an object which:
- 1. Is defined as ``inline`` in a header file (so it might get compiled into
multiple libaries), and
- 2. Has external linkage (otherwise it's supposed to be duplicated), and
- 3. Has hidden visibility.
+1. Is defined as ``inline`` in a header file (so it might get compiled into
multiple libaries), and
+2. Has external linkage (otherwise it's supposed to be duplicated), and
+3. Has hidden visibility.
As well as one of the following:
- 1. The object is mutable, or
- 2. The object's initializer definitely has side effects.
+1. The object is mutable, or
+2. The object's initializer definitely has side effects.
The warning can be resolved by removing one of the conditions above. In rough
order of preference, this may be done by:
- 1. Marking the object ``const`` (if possible)
- 2. Moving the object's definition to a source file
- 3. Giving the object non-hidden visibility, e.g. using
``__attribute((visibility("default")))``.
+1. Marking the object ``const`` (if possible)
+2. Moving the object's definition to a source file
+3. Giving the object non-hidden visibility, e.g. using
``__attribute((visibility("default")))``.
----------------
MaggieYingYi wrote:
Reverted in the commit
https://github.com/MaggieYingYi/llvm-project/commit/5d520aa2157dcd013045c5017404db482f4de1d8.
https://github.com/llvm/llvm-project/pull/142409
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits