diff options
author | Mike Stump <mrs@apple.com> | 2009-10-29 23:34:20 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-10-29 23:34:20 +0000 |
commit | f3eb5ec2c065dd5c91620eb2643d4aaa7facfba6 (patch) | |
tree | 6821f7b1de8dbd560cab0a49d597b62b7161027e /clang | |
parent | faa7660fd06a81c3e5125761332f7be4b384381e (diff) | |
download | bcm5719-llvm-f3eb5ec2c065dd5c91620eb2643d4aaa7facfba6.tar.gz bcm5719-llvm-f3eb5ec2c065dd5c91620eb2643d4aaa7facfba6.zip |
Fix one more bug with __builtin_object_size.
llvm-svn: 85538
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 2 | ||||
-rw-r--r-- | clang/test/CodeGen/object-size.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 9bf52156348..6ddeba99a73 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/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/clang/test/CodeGen/object-size.c b/clang/test/CodeGen/object-size.c index 27e24ac1201..db6d948d83e 100644 --- a/clang/test/CodeGen/object-size.c +++ b/clang/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"); +} |