Skip to content

Commit 94fdeb7

Browse files
authored
[clang] Mark some language options as benign. (#131569)
I'm fairly certain that the options in this CL are benign, as I don't believe they affect the AST. * RTTI - shouldn't affect the AST, should only affect codegen * Trivial var init - also should only affect codegen * Stack protector - also codegen * Exceptions - Since exceptions do allow new things in the AST, but I'm pretty sure that they can differ in parent and child safely, I marked it as compatible instead. I welcome any input from someone more familiar with this than me, as I might be wrong.
1 parent 4fd48ac commit 94fdeb7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,7 @@ Bug Fixes to C++ Support
761761
reference in its own initializer in C++23 mode (#GH131330).
762762
- Clang could incorrectly instantiate functions in discarded contexts (#GH140449)
763763
- Fix instantiation of default-initialized variable template specialization. (#GH140632) (#GH140622)
764+
- Clang modules now allow a module and its user to differ on TrivialAutoVarInit*
764765

765766
Bug Fixes to AST Handling
766767
^^^^^^^^^^^^^^^^^^^^^^^^^

clang/include/clang/Basic/LangOptions.def

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,11 +398,11 @@ BENIGN_LANGOPT(HalfNoSemanticInterposition, 1, 0,
398398
"Like -fno-semantic-interposition but don't use local aliases")
399399
ENUM_LANGOPT(StackProtector, StackProtectorMode, 2, SSPOff,
400400
"stack protector mode")
401-
ENUM_LANGOPT(TrivialAutoVarInit, TrivialAutoVarInitKind, 2, TrivialAutoVarInitKind::Uninitialized,
401+
BENIGN_ENUM_LANGOPT(TrivialAutoVarInit, TrivialAutoVarInitKind, 2, TrivialAutoVarInitKind::Uninitialized,
402402
"trivial automatic variable initialization")
403-
VALUE_LANGOPT(TrivialAutoVarInitStopAfter, 32, 0,
403+
BENIGN_VALUE_LANGOPT(TrivialAutoVarInitStopAfter, 32, 0,
404404
"stop trivial automatic variable initialization after the specified number of instances. Must be greater than 0.")
405-
VALUE_LANGOPT(TrivialAutoVarInitMaxSize, 32, 0,
405+
BENIGN_VALUE_LANGOPT(TrivialAutoVarInitMaxSize, 32, 0,
406406
"stop trivial automatic variable initialization if var size exceeds the specified size (in bytes). Must be greater than 0.")
407407
ENUM_LANGOPT(SignedOverflowBehavior, SignedOverflowBehaviorTy, 2, SOB_Undefined,
408408
"signed integer overflow handling")

0 commit comments

Comments
 (0)