You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/code-quality/c6389.md
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,14 @@ helpviewer_keywords: ["C6389"]
8
8
9
9
# C6389: MARK_INTERNAL_OR_MISSING_COMMON_DECL
10
10
11
-
This check intended to help with reducing the visibility of certain symbols and modularize the code. In multi-file C++ projects each declaration should be either local to a C++ file (part of the anonymous namespace) or declared in a common header file that is included by multiple C++ files.
11
+
This check is intended to help reduce the visibility of certain symbols and to modularize the code. In multi-file C++ projects, each declaration should be either local to a C++ file (part of the anonymous namespace) or declared in a common header file that's included by multiple C++ files.
12
12
13
-
When this check flags a declaration, either it should be moved to an anonymous namespace or a forward declaration should be moved to a header file depending on the scope of the symbol.
13
+
When this check flags a declaration, either it should be moved to an anonymous namespace or a forward declaration should be moved to a header file, depending on the scope of the symbol.
14
14
15
-
This is an experimental rule that needs to be enabled in a ruleset file explicitly to work. More information about rulesets can be found [here](https://docs.microsoft.com/en-us/visualstudio/code-quality/using-rule-sets-to-group-code-analysis-rules).
15
+
The rule is an experimental rule that must be explicitly enabled in a rule set file to work. For more information about rule sets, see [Use rule sets to group code analysis rules](/visualstudio/code-quality/using-rule-sets-to-group-code-analysis-rules).
16
16
17
17
## Example
18
+
18
19
```cpp
19
20
// A.h
20
21
structX;
@@ -28,7 +29,9 @@ struct Y { double y; }; // warning: Move 'Y' to anonymous namespace or put a for
28
29
29
30
void f(); // warning: Move 'Y' to anonymous namespace or put a forward declaration in a common header included in this file.
0 commit comments