================ @@ -103,9 +104,10 @@ class RAIIMutexDescriptor { // this function is called instead of early returning it. To avoid this, a // bool variable (IdentifierInfoInitialized) is used and the function will // be run only once. - Guard = &Call.getCalleeAnalysisDeclContext()->getASTContext().Idents.get( - GuardName); - IdentifierInfoInitialized = true; + if (AnalysisDeclContext *CalleCtx = Call.getCalleeAnalysisDeclContext()) { + Guard = &CalleCtx->getASTContext().Idents.get(GuardName); + IdentifierInfoInitialized = true; + } ---------------- steakhal wrote:
This crash happened because we failed to get an ASTContext. Maybe, on some other access-path we could acquire the ASTContext, like via `Call.getState()->getStateManager().getContext()`. I feel like your proposal only fixes the symptom, and not the root cause. https://github.com/llvm/llvm-project/pull/90030 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits