]> granicus.if.org Git - clang/commitdiff
[CodeGen] Use preincrement version of APInt::operator++ instead of postincrement...
authorCraig Topper <craig.topper@gmail.com>
Wed, 19 Apr 2017 21:02:45 +0000 (21:02 +0000)
committerCraig Topper <craig.topper@gmail.com>
Wed, 19 Apr 2017 21:02:45 +0000 (21:02 +0000)
This is preparation for a clang change to improve the [[nodiscard]] warning to not be ignored on methods that return a class marked [[nodiscard]] that are defined in the class itself. See D32207.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300756 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGStmt.cpp

index 0ebfd99363c1df3b7d72f0e4fd012c111dc8bbf8..683f366ebe4559b155fb3e663c04e2d402cb4167 100644 (file)
@@ -1166,7 +1166,7 @@ void CodeGenFunction::EmitCaseStmtRange(const CaseStmt &S) {
       if (Rem)
         Rem--;
       SwitchInsn->addCase(Builder.getInt(LHS), CaseDest);
-      LHS++;
+      ++LHS;
     }
     return;
   }