]> granicus.if.org Git - clang/commitdiff
Fix CharByteWidth assertion in LiteralSupport.
authorEli Friedman <eli.friedman@gmail.com>
Wed, 18 Sep 2013 23:23:13 +0000 (23:23 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Wed, 18 Sep 2013 23:23:13 +0000 (23:23 +0000)
Patch by Eelis van der Weegen.

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

lib/Lex/LiteralSupport.cpp

index 08d6c438d323194e6bc26ce2b432583f66debf9a..c637c3881927e3c6549f15e93b26054f35282a6f 100644 (file)
@@ -336,7 +336,7 @@ static void EncodeUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf,
     return;
   }
 
-  assert((CharByteWidth == 1 || CharByteWidth == 2 || CharByteWidth) &&
+  assert((CharByteWidth == 1 || CharByteWidth == 2 || CharByteWidth == 4) &&
          "only character widths of 1, 2, or 4 bytes supported");
 
   (void)UcnLen;