Nathan-Huckleberry added inline comments.
================ Comment at: clang/lib/Analysis/AnalysisDeclContext.cpp:124 + if(VD->hasGlobalStorage()) { + return const_cast<Stmt*>(dyn_cast<Stmt>(VD->getInit())); + } ---------------- nickdesaulniers wrote: > The `const_cast` doesn't look necessary here. Is it? `VD->getInit` returns a `const Expr *`. In order to remove the `const_cast` I would need to make `getBody()` `const` and every call to `getBody()`. The change required to add `const` seemed too large to be included in this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63889/new/ https://reviews.llvm.org/D63889 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits