summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2014-09-24 03:53:56 +0000
committerRichard Trieu <rtrieu@google.com>2014-09-24 03:53:56 +0000
commit78dd725cded98e0a736fb8ea5db6c4e7d1b819e7 (patch)
treeea09b466b7d96ffe31b5c8df377be2899bef4ea7 /clang/lib/Sema/SemaDecl.cpp
parentb10c92001ccaaeda5154d5c20c23fdaf18f8d9c3 (diff)
downloadbcm5719-llvm-78dd725cded98e0a736fb8ea5db6c4e7d1b819e7.tar.gz
bcm5719-llvm-78dd725cded98e0a736fb8ea5db6c4e7d1b819e7.zip
Fix an edge case with BinaryOperator's in -Wuninitialized. Add testcases for
the other visitors as well. llvm-svn: 218366
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index b3098abbb09..71017f4f9df 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -8359,9 +8359,11 @@ namespace {
}
if (BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) {
- if (BO->getOpcode() == BO_Comma)
+ if (BO->getOpcode() == BO_Comma) {
+ Visit(BO->getLHS());
HandleValue(BO->getRHS());
- return;
+ return;
+ }
}
if (isa<MemberExpr>(E)) {
OpenPOWER on IntegriCloud