Fix one more bug with __builtin_object_size.

llvm-svn: 85538
This commit is contained in:
Mike Stump 2009-10-29 23:34:20 +00:00
parent faa7660fd0
commit f3eb5ec2c0
2 changed files with 7 additions and 1 deletions

View File

@ -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; }

View File

@ -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");
}