diff options
author | Richard Trieu <rtrieu@google.com> | 2014-09-25 01:15:40 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2014-09-25 01:15:40 +0000 |
commit | 52b8b60d4c6f863db63ef747013dd119169557a2 (patch) | |
tree | 9affc116592ef6b016a08438439a9e3f65858db1 /clang/lib/Sema/SemaDecl.cpp | |
parent | a577bc26b6141673b1bf4a339953ab2c04b34a8d (diff) | |
download | bcm5719-llvm-52b8b60d4c6f863db63ef747013dd119169557a2.tar.gz bcm5719-llvm-52b8b60d4c6f863db63ef747013dd119169557a2.zip |
Add increment/decrement operators and compound assignment operators to the
uninitialized checkers that did not have them before.
llvm-svn: 218435
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 277816be429..1bac28753fe 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -8452,6 +8452,12 @@ namespace { HandleValue(E->getSubExpr()); return; } + + if (E->isIncrementDecrementOp()) { + HandleValue(E->getSubExpr()); + return; + } + Inherited::VisitUnaryOperator(E); } @@ -8480,6 +8486,16 @@ namespace { Inherited::VisitCallExpr(E); } + void VisitBinaryOperator(BinaryOperator *E) { + if (E->isCompoundAssignmentOp()) { + HandleValue(E->getLHS()); + Visit(E->getRHS()); + return; + } + + Inherited::VisitBinaryOperator(E); + } + // A custom visitor for BinaryConditionalOperator is needed because the // regular visitor would check the condition and true expression separately // but both point to the same place giving duplicate diagnostics. |