diff options
author | Galina Kistanova <gkistanova@gmail.com> | 2017-06-03 06:25:29 +0000 |
---|---|---|
committer | Galina Kistanova <gkistanova@gmail.com> | 2017-06-03 06:25:29 +0000 |
commit | d321611bfb174a7bf265673c49a661e04c178e09 (patch) | |
tree | 0b4fd6b2a32dbf6fb302f9e9f20584b736a85a9d /clang/lib/Lex/LiteralSupport.cpp | |
parent | de7e22123a06d9cbd92b632a3af13ea4dfc0a3d2 (diff) | |
download | bcm5719-llvm-d321611bfb174a7bf265673c49a661e04c178e09.tar.gz bcm5719-llvm-d321611bfb174a7bf265673c49a661e04c178e09.zip |
Added LLVM_FALLTHROUGH to address warning: this statement may fall through + formatted. NFC.
llvm-svn: 304642
Diffstat (limited to 'clang/lib/Lex/LiteralSupport.cpp')
-rw-r--r-- | clang/lib/Lex/LiteralSupport.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/clang/lib/Lex/LiteralSupport.cpp b/clang/lib/Lex/LiteralSupport.cpp index 1e2cbde825f..a598a467816 100644 --- a/clang/lib/Lex/LiteralSupport.cpp +++ b/clang/lib/Lex/LiteralSupport.cpp @@ -456,10 +456,17 @@ static void EncodeUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, // Finally, we write the bytes into ResultBuf. ResultBuf += bytesToWrite; switch (bytesToWrite) { // note: everything falls through. - case 4: *--ResultBuf = (UTF8)((UcnVal | byteMark) & byteMask); UcnVal >>= 6; - case 3: *--ResultBuf = (UTF8)((UcnVal | byteMark) & byteMask); UcnVal >>= 6; - case 2: *--ResultBuf = (UTF8)((UcnVal | byteMark) & byteMask); UcnVal >>= 6; - case 1: *--ResultBuf = (UTF8) (UcnVal | firstByteMark[bytesToWrite]); + case 4: + *--ResultBuf = (UTF8)((UcnVal | byteMark) & byteMask); UcnVal >>= 6; + LLVM_FALLTHROUGH; + case 3: + *--ResultBuf = (UTF8)((UcnVal | byteMark) & byteMask); UcnVal >>= 6; + LLVM_FALLTHROUGH; + case 2: + *--ResultBuf = (UTF8)((UcnVal | byteMark) & byteMask); UcnVal >>= 6; + LLVM_FALLTHROUGH; + case 1: + *--ResultBuf = (UTF8) (UcnVal | firstByteMark[bytesToWrite]); } // Update the buffer. ResultBuf += bytesToWrite; |