aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Analysis/ThreadSafetyCommon.cpp
diff options
context:
space:
mode:
authorAaron Puchert <aaronpuchert@alice-dsl.net>2020-07-26 01:53:32 +0200
committerAaron Puchert <aaronpuchert@alice-dsl.net>2020-09-05 17:26:12 +0200
commitb2ce79ef66157dd752e3864ece57915e23a73f5d (patch)
tree03cdb802ddd79e64c839710673b0062b07f4dd36 /clang/lib/Analysis/ThreadSafetyCommon.cpp
parent9dcc82f34ea9b623d82d2577b93aaf67d36dabd2 (diff)
downloadllvm-b2ce79ef66157dd752e3864ece57915e23a73f5d.zip
llvm-b2ce79ef66157dd752e3864ece57915e23a73f5d.tar.gz
llvm-b2ce79ef66157dd752e3864ece57915e23a73f5d.tar.bz2
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.
Diffstat (limited to 'clang/lib/Analysis/ThreadSafetyCommon.cpp')
-rw-r--r--clang/lib/Analysis/ThreadSafetyCommon.cpp2
1 files changed, 1 insertions, 1 deletions
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<ValueDecl>(DRE->getDecl()->getCanonicalDecl());
// Function parameters require substitution and/or renaming.
- if (const auto *PV = dyn_cast_or_null<ParmVarDecl>(VD)) {
+ if (const auto *PV = dyn_cast<ParmVarDecl>(VD)) {
unsigned I = PV->getFunctionScopeIndex();
const DeclContext *D = PV->getDeclContext();
if (Ctx && Ctx->FunArgs) {