]> granicus.if.org Git - clang/commitdiff
Fix a typo in the new VerifyOnly handling in SemaInit. No visible difference at...
authorEli Friedman <eli.friedman@gmail.com>
Mon, 26 Sep 2011 18:53:43 +0000 (18:53 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Mon, 26 Sep 2011 18:53:43 +0000 (18:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140546 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaInit.cpp

index 12df59fb76a78c0c94cf6e95fd6ec986c933fb64..9257b81335ec936755177b3db281e53c46b9fe6f 100644 (file)
@@ -1878,7 +1878,7 @@ InitListChecker::CheckDesignatedInitializer(const InitializedEntity &Entity,
       = DesignatedEndIndex.extOrTrunc(MaxElements.getBitWidth());
     DesignatedEndIndex.setIsUnsigned(MaxElements.isUnsigned());
     if (DesignatedEndIndex >= MaxElements) {
-      if (VerifyOnly)
+      if (!VerifyOnly)
         SemaRef.Diag(IndexExpr->getSourceRange().getBegin(),
                       diag::err_array_designator_too_large)
           << DesignatedEndIndex.toString(10) << MaxElements.toString(10)