Skip to content

Commit 5ab93bd

Browse files
committed
[clang] Mark some language options as benign.
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 383e5f3 commit 5ab93bd

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
@@ -745,6 +745,7 @@ Bug Fixes to C++ Support
745745
- Fix an incorrect deduction when calling an explicit object member function template through an overload set address.
746746
- Fixed bug in constant evaluation that would allow using the value of a
747747
reference in its own initializer in C++23 mode (#GH131330).
748+
- Clang modules now allow a module and its user to differ on TrivialAutoVarInit*
748749

749750
Bug Fixes to AST Handling
750751
^^^^^^^^^^^^^^^^^^^^^^^^^

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)