https://github.com/matts1 updated https://github.com/llvm/llvm-project/pull/131569
>From 2507e992742c067948021a5c07379abe725cf52d Mon Sep 17 00:00:00 2001 From: Matt Stark <m...@google.com> Date: Mon, 10 Mar 2025 12:09:49 +1100 Subject: [PATCH] [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. --- clang/docs/ReleaseNotes.rst | 1 + clang/include/clang/Basic/LangOptions.def | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 941b9ab45cf1c..95f5d055b08ed 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -761,6 +761,7 @@ Bug Fixes to C++ Support reference in its own initializer in C++23 mode (#GH131330). - Clang could incorrectly instantiate functions in discarded contexts (#GH140449) - Fix instantiation of default-initialized variable template specialization. (#GH140632) (#GH140622) +- Clang modules now allow a module and its user to differ on TrivialAutoVarInit* Bug Fixes to AST Handling ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/clang/include/clang/Basic/LangOptions.def b/clang/include/clang/Basic/LangOptions.def index 930c1c06d1a76..789761c1f3647 100644 --- a/clang/include/clang/Basic/LangOptions.def +++ b/clang/include/clang/Basic/LangOptions.def @@ -398,11 +398,11 @@ BENIGN_LANGOPT(HalfNoSemanticInterposition, 1, 0, "Like -fno-semantic-interposition but don't use local aliases") ENUM_LANGOPT(StackProtector, StackProtectorMode, 2, SSPOff, "stack protector mode") -ENUM_LANGOPT(TrivialAutoVarInit, TrivialAutoVarInitKind, 2, TrivialAutoVarInitKind::Uninitialized, +BENIGN_ENUM_LANGOPT(TrivialAutoVarInit, TrivialAutoVarInitKind, 2, TrivialAutoVarInitKind::Uninitialized, "trivial automatic variable initialization") -VALUE_LANGOPT(TrivialAutoVarInitStopAfter, 32, 0, +BENIGN_VALUE_LANGOPT(TrivialAutoVarInitStopAfter, 32, 0, "stop trivial automatic variable initialization after the specified number of instances. Must be greater than 0.") -VALUE_LANGOPT(TrivialAutoVarInitMaxSize, 32, 0, +BENIGN_VALUE_LANGOPT(TrivialAutoVarInitMaxSize, 32, 0, "stop trivial automatic variable initialization if var size exceeds the specified size (in bytes). Must be greater than 0.") ENUM_LANGOPT(SignedOverflowBehavior, SignedOverflowBehaviorTy, 2, SOB_Undefined, "signed integer overflow handling") _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits