Skip to content

Commit e32d927

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 69527b0 commit e32d927

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ Bug Fixes to C++ Support
295295
- Clang no longer crashes when a coroutine is declared ``[[noreturn]]``. (#GH127327)
296296
- Clang now uses the parameter location for abbreviated function templates in ``extern "C"``. (#GH46386)
297297
- Clang now correctly parses ``if constexpr`` expressions in immediate function context. (#GH123524)
298+
- Clang modules now allow a module and its user to have a larger variety of configurations.
298299

299300
Improvements to C++ diagnostics
300301
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

clang/include/clang/Basic/LangOptions.def

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,18 +139,18 @@ ENUM_LANGOPT(AltivecSrcCompat, AltivecSrcCompatKind, 2,
139139
LANGOPT(ConvergentFunctions, 1, 1, "Assume convergent functions")
140140
LANGOPT(AltiVec , 1, 0, "AltiVec-style vector initializers")
141141
LANGOPT(ZVector , 1, 0, "System z vector extensions")
142-
LANGOPT(Exceptions , 1, 0, "exception handling")
143-
LANGOPT(ObjCExceptions , 1, 0, "Objective-C exceptions")
144-
LANGOPT(CXXExceptions , 1, 0, "C++ exceptions")
142+
COMPATIBLE_LANGOPT(Exceptions , 1, 0, "exception handling")
143+
COMPATIBLE_LANGOPT(ObjCExceptions , 1, 0, "Objective-C exceptions")
144+
COMPATIBLE_LANGOPT(CXXExceptions , 1, 0, "C++ exceptions")
145145
LANGOPT(EHAsynch , 1, 0, "C/C++ EH Asynch exceptions")
146146
ENUM_LANGOPT(ExceptionHandling, ExceptionHandlingKind, 3,
147147
ExceptionHandlingKind::None, "exception handling")
148148
LANGOPT(IgnoreExceptions , 1, 0, "ignore exceptions")
149149
LANGOPT(ExternCNoUnwind , 1, 0, "Assume extern C functions don't unwind")
150150
LANGOPT(AssumeNothrowExceptionDtor , 1, 0, "Assume exception object's destructor is nothrow")
151151
LANGOPT(TraditionalCPP , 1, 0, "traditional CPP emulation")
152-
LANGOPT(RTTI , 1, 1, "run-time type information")
153-
LANGOPT(RTTIData , 1, 1, "emit run-time type information data")
152+
BENIGN_LANGOPT(RTTI , 1, 1, "run-time type information")
153+
BENIGN_LANGOPT(RTTIData , 1, 1, "emit run-time type information data")
154154
LANGOPT(MSBitfields , 1, 0, "Microsoft-compatible structure layout")
155155
LANGOPT(MSVolatile , 1, 0, "Microsoft-compatible volatile loads and stores")
156156
LANGOPT(Freestanding, 1, 0, "freestanding implementation")
@@ -397,13 +397,13 @@ BENIGN_ENUM_LANGOPT(ExternDeclNoDLLStorageClassVisibility, VisibilityFromDLLStor
397397
BENIGN_LANGOPT(SemanticInterposition , 1, 0, "semantic interposition")
398398
BENIGN_LANGOPT(HalfNoSemanticInterposition, 1, 0,
399399
"Like -fno-semantic-interposition but don't use local aliases")
400-
ENUM_LANGOPT(StackProtector, StackProtectorMode, 2, SSPOff,
400+
BENIGN_ENUM_LANGOPT(StackProtector, StackProtectorMode, 2, SSPOff,
401401
"stack protector mode")
402-
ENUM_LANGOPT(TrivialAutoVarInit, TrivialAutoVarInitKind, 2, TrivialAutoVarInitKind::Uninitialized,
402+
BENIGN_ENUM_LANGOPT(TrivialAutoVarInit, TrivialAutoVarInitKind, 2, TrivialAutoVarInitKind::Uninitialized,
403403
"trivial automatic variable initialization")
404-
VALUE_LANGOPT(TrivialAutoVarInitStopAfter, 32, 0,
404+
BENIGN_VALUE_LANGOPT(TrivialAutoVarInitStopAfter, 32, 0,
405405
"stop trivial automatic variable initialization after the specified number of instances. Must be greater than 0.")
406-
VALUE_LANGOPT(TrivialAutoVarInitMaxSize, 32, 0,
406+
BENIGN_VALUE_LANGOPT(TrivialAutoVarInitMaxSize, 32, 0,
407407
"stop trivial automatic variable initialization if var size exceeds the specified size (in bytes). Must be greater than 0.")
408408
ENUM_LANGOPT(SignedOverflowBehavior, SignedOverflowBehaviorTy, 2, SOB_Undefined,
409409
"signed integer overflow handling")

0 commit comments

Comments
 (0)