Fix an edge case with BinaryOperator's in -Wuninitialized. Add testcases for
the other visitors as well.
llvm-svn: 218366
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index b3098ab..71017f4 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -8359,9 +8359,11 @@
}
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)) {