[clang] 0993b11 - [clang] Clear ASTContext::TUDecl in 'cleanup' for easier debugging (#191697)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 17 08:01:59 PDT 2026
Author: Balázs Benics
Date: 2026-04-17T16:01:43+01:00
New Revision: 0993b11a12e1eacd63ae8c84e0a5cff9e3f09ef6
URL: https://github.com/llvm/llvm-project/commit/0993b11a12e1eacd63ae8c84e0a5cff9e3f09ef6
DIFF: https://github.com/llvm/llvm-project/commit/0993b11a12e1eacd63ae8c84e0a5cff9e3f09ef6.diff
LOG: [clang] Clear ASTContext::TUDecl in 'cleanup' for easier debugging (#191697)
While the ASTContext has more things inside, I think we should at least
clear the TUDecl so that when traversing the (dangling) AST would
immediately step on the null-dereference instead of chasing dangling
pointers and crash later.
I was bitten by this in #191058.
This commit should be NFC - assuming that people didn't traverse already
dangling ASTs.
Added:
Modified:
clang/include/clang/AST/ASTContext.h
clang/lib/AST/ASTContext.cpp
Removed:
################################################################################<html><body><h1>504 Gateway Time-out</h1>
The server didn't respond in time.
</body></html>
More information about the cfe-commits
mailing list