summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Analysis')
-rw-r--r--clang/lib/Analysis/ThreadSafety.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Analysis/ThreadSafety.cpp b/clang/lib/Analysis/ThreadSafety.cpp
index 469e79be724..f2746cba8cd 100644
--- a/clang/lib/Analysis/ThreadSafety.cpp
+++ b/clang/lib/Analysis/ThreadSafety.cpp
@@ -1337,10 +1337,10 @@ void BuildLockset::checkAccess(const Expr *Exp, AccessKind AK) {
if (Analyzer->Handler.issueBetaWarnings()) {
// Local variables of reference type cannot be re-assigned;
// map them to their initializer.
- while (auto *DRE = dyn_cast<DeclRefExpr>(Exp)) {
- auto *VD = dyn_cast<VarDecl>(DRE->getDecl()->getCanonicalDecl());
+ while (const auto *DRE = dyn_cast<DeclRefExpr>(Exp)) {
+ const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()->getCanonicalDecl());
if (VD && VD->isLocalVarDecl() && VD->getType()->isReferenceType()) {
- if (auto *E = VD->getInit()) {
+ if (const auto *E = VD->getInit()) {
Exp = E;
continue;
}
OpenPOWER on IntegriCloud