aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM
================ Comment at: clang/lib/Analysis/ThreadSafety.cpp:1275 + const ValueDecl *VD = LP->clangDecl(); + return VD->isDefinedOutsideFunctionOrMethod(); + } ---------------- Hmm, I've not seen that function used a whole lot before, but looking at the implementation of it, I think it does what we need it to do here. FWIW, I was expecting something more like this: ``` if (const DeclContext *DC = VD->getLexicalDeclContext()) return !DC->getRedeclContext()->isFunctionOrMethod(); ``` But I'm not certain if this would ever give a different answer from your approach. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84604/new/ https://reviews.llvm.org/D84604 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits