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(); }


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to