[clang] 68a7196 - [NFC][AST] Clean up XRayFilter and NoSanitizeL before backend (#162119)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 6 10:33:09 PDT 2025
Author: Vitaly Buka
Date: 2025-10-06T17:33:05Z
New Revision: 68a71969f9478affee0c9c1b221d01a7781d9b89
URL: https://github.com/llvm/llvm-project/commit/68a71969f9478affee0c9c1b221d01a7781d9b89
DIFF: https://github.com/llvm/llvm-project/commit/68a71969f9478affee0c9c1b221d01a7781d9b89.diff
LOG: [NFC][AST] Clean up XRayFilter and NoSanitizeL before backend (#162119)
I don't think we need them after AST is destroyed.
If I am wrong we should see crashes immediately, as pointers
de-referenced unchecked.
Added:
Modified:
clang/lib/AST/ASTContext.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index a074990cce7fe..a8b41ba18fa01 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -906,6 +906,9 @@ void ASTContext::cleanup() {
for (const auto &Value : ModuleInitializers)
Value.second->~PerModuleInitializers();
ModuleInitializers.clear();
+
+ XRayFilter.reset();
+ NoSanitizeL.reset();
}
ASTContext::~ASTContext() { cleanup(); }
More information about the cfe-commits
mailing list