diff options
author | DeLesley Hutchins <delesley@google.com> | 2012-12-08 03:46:30 +0000 |
---|---|---|
committer | DeLesley Hutchins <delesley@google.com> | 2012-12-08 03:46:30 +0000 |
commit | 93699d23cd07c021eac2e26f8e32b58276bfa912 (patch) | |
tree | b868f7c469f57df14fb68aedb328173fa4175d6e /lib/Analysis | |
parent | ac71351acdefc9de0c770c1d717e621ac9e684bf (diff) |
Thread-safety analysis: check member access on guarded non-primitive types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169669 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/ThreadSafety.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Analysis/ThreadSafety.cpp b/lib/Analysis/ThreadSafety.cpp index fdfd599ba5..9c33a8e97c 100644 --- a/lib/Analysis/ThreadSafety.cpp +++ b/lib/Analysis/ThreadSafety.cpp @@ -1858,6 +1858,15 @@ void BuildLockset::checkAccess(const Expr *Exp, AccessKind AK) { return; } + if (Analyzer->Handler.issueBetaWarnings()) { + if (const MemberExpr *ME = dyn_cast<MemberExpr>(Exp)) { + if (ME->isArrow()) + checkPtAccess(ME->getBase(), AK); + else + checkAccess(ME->getBase(), AK); + } + } + const ValueDecl *D = getValueDecl(Exp); if (!D || !D->hasAttrs()) return; |