]> granicus.if.org Git - clang/commitdiff
Fix one more bug with __builtin_object_size.
authorMike Stump <mrs@apple.com>
Thu, 29 Oct 2009 23:34:20 +0000 (23:34 +0000)
committerMike Stump <mrs@apple.com>
Thu, 29 Oct 2009 23:34:20 +0000 (23:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85538 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ExprConstant.cpp
test/CodeGen/object-size.c

index 9bf52156348c6793521e2b8c3f929756184898ef..6ddeba99a737db9faac93923b0e59a99d0ece812 100644 (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; }
index 27e24ac120144d7baba0b4c51cdedfafc4ae6f4b..db6d948d83e2063bb77d6a32207c4dc88a8266eb 100644 (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");
+}