diff options
-rw-r--r-- | lib/AST/ExprConstant.cpp | 2 | ||||
-rw-r--r-- | test/CodeGen/object-size.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 9bf5215634..6ddeba99a7 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -189,7 +189,7 @@ public: { return Visit(E->getChosenSubExpr(Info.Ctx)); } bool VisitCastExpr(CastExpr *E) { return Visit(E->getSubExpr()); } bool VisitBinAssign(BinaryOperator *E) { return true; } - bool VisitCompoundAssign(BinaryOperator *E) { return true; } + bool VisitCompoundAssignOperator(BinaryOperator *E) { return true; } bool VisitBinaryOperator(BinaryOperator *E) { return Visit(E->getLHS()) || Visit(E->getRHS()); } bool VisitUnaryPreInc(UnaryOperator *E) { return true; } diff --git a/test/CodeGen/object-size.c b/test/CodeGen/object-size.c index 27e24ac120..db6d948d83 100644 --- a/test/CodeGen/object-size.c +++ b/test/CodeGen/object-size.c @@ -118,3 +118,9 @@ void test15() { // CHECK: call ___inline_strcpy_chk strcpy(gp--, "Hi there"); } + +void test16() { + // CHECK-NOT: call ___strcpy_chk + // CHECK: call ___inline_strcpy_chk + strcpy(gp += 1, "Hi there"); +} |