diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-06-24 16:26:43 +0000 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-06-24 16:26:43 +0000 |
commit | bf95fff9bdfb2b78bba083246b42784f11230eb0 (patch) | |
tree | c4b6f753c73bc8f2880bb8c4e1b5b8d854353507 /clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp | |
parent | 9f7f3e1e64067c6802882e691a7a3c8a5926a737 (diff) | |
download | bcm5719-llvm-bf95fff9bdfb2b78bba083246b42784f11230eb0.tar.gz bcm5719-llvm-bf95fff9bdfb2b78bba083246b42784f11230eb0.zip |
DeadStoresChecker: Don't warn about dead stores into volatile variables
llvm-svn: 273689
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp index f2a269a3335..8ca2a24cffe 100644 --- a/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp @@ -278,6 +278,8 @@ public: RHS = RHS->IgnoreParenCasts(); QualType T = VD->getType(); + if (T.isVolatileQualified()) + return; if (T->isPointerType() || T->isObjCObjectPointerType()) { if (RHS->isNullPointerConstant(Ctx, Expr::NPC_ValueDependentIsNull)) return; |