From b2ce79ef66157dd752e3864ece57915e23a73f5d Mon Sep 17 00:00:00 2001 From: Aaron Puchert Date: Sun, 26 Jul 2020 01:53:32 +0200 Subject: Thread safety analysis: ValueDecl in Project is non-null The constructor asserts that, use it in the ThreadSafetyAnalyzer. Also note that the result of a cast<> cannot be null. --- clang/lib/Analysis/ThreadSafetyCommon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Analysis/ThreadSafetyCommon.cpp') diff --git a/clang/lib/Analysis/ThreadSafetyCommon.cpp b/clang/lib/Analysis/ThreadSafetyCommon.cpp index 1b8c55e..aee9185 100644 --- a/clang/lib/Analysis/ThreadSafetyCommon.cpp +++ b/clang/lib/Analysis/ThreadSafetyCommon.cpp @@ -274,7 +274,7 @@ til::SExpr *SExprBuilder::translateDeclRefExpr(const DeclRefExpr *DRE, const auto *VD = cast(DRE->getDecl()->getCanonicalDecl()); // Function parameters require substitution and/or renaming. - if (const auto *PV = dyn_cast_or_null(VD)) { + if (const auto *PV = dyn_cast(VD)) { unsigned I = PV->getFunctionScopeIndex(); const DeclContext *D = PV->getDeclContext(); if (Ctx && Ctx->FunArgs) { -- cgit v1.1