Skip to content

Commit a8a6b66

Browse files
[clang] Document -Wglobal-constructors behavior (#68084)
It's a drop in the ocean considering the lack of documentation of our diagnostics, but it's a start. Co-authored-by: serge-sans-paille <[email protected]>
1 parent 543f9e7 commit a8a6b66

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

clang/include/clang/Basic/DiagnosticGroups.td

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,11 @@ def : DiagGroup<"c++2a-compat-pedantic", [CXX20CompatPedantic]>;
415415
def ExitTimeDestructors : DiagGroup<"exit-time-destructors">;
416416
def FlexibleArrayExtensions : DiagGroup<"flexible-array-extensions">;
417417
def FourByteMultiChar : DiagGroup<"four-char-constants">;
418-
def GlobalConstructors : DiagGroup<"global-constructors">;
418+
def GlobalConstructors : DiagGroup<"global-constructors"> {
419+
code Documentation = [{
420+
Emit a warning for each variable declaration that generates code run at startup.
421+
}];
422+
}
419423
def BitwiseConditionalParentheses: DiagGroup<"bitwise-conditional-parentheses">;
420424
def BitwiseOpParentheses: DiagGroup<"bitwise-op-parentheses">;
421425
def LogicalOpParentheses: DiagGroup<"logical-op-parentheses">;

0 commit comments

Comments
 (0)