From: Aaron Ballman Date: Wed, 23 Apr 2014 13:58:21 +0000 (+0000) Subject: Updated to be a bit more const friendly. Also switched the linkage to be static since... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9107bb34717b670bf6a62b62b9a284a75ef3c6da;p=clang Updated to be a bit more const friendly. Also switched the linkage to be static since this function is file-local. No functional changes intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206982 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/ThreadSafetyCommon.cpp b/lib/Analysis/ThreadSafetyCommon.cpp index 391680918e..252fd97496 100644 --- a/lib/Analysis/ThreadSafetyCommon.cpp +++ b/lib/Analysis/ThreadSafetyCommon.cpp @@ -97,9 +97,9 @@ void simplifyIncompleteArg(Variable *V, til::Phi *Ph) { // Return true if E is a variable that points to an incomplete Phi node. -inline bool isIncompleteVar(SExpr *E) { - if (Variable *V = dyn_cast(E)) { - if (Phi *Ph = dyn_cast(V->definition())) +static bool isIncompleteVar(const SExpr *E) { + if (const auto *V = dyn_cast(E)) { + if (const auto *Ph = dyn_cast(V->definition())) return Ph->status() == Phi::PH_Incomplete; } return false;