[clang-tools-extra] 73a6a36 - [clangd] RIFF.cpp - Use logical && instead of bitwise & for padding check
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 11 03:39:07 PDT 2020
Author: Simon Pilgrim
Date: 2020-08-11T11:38:43+01:00
New Revision: 73a6a36469468bb72d409d5179c6244e751545e2
URL: https://github.com/llvm/llvm-project/commit/73a6a36469468bb72d409d5179c6244e751545e2
DIFF: https://github.com/llvm/llvm-project/commit/73a6a36469468bb72d409d5179c6244e751545e2.diff
LOG: [clangd] RIFF.cpp - Use logical && instead of bitwise & for padding check
Fixes PR47070
Added:
Modified:
clang-tools-extra/clangd/RIFF.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/RIFF.cpp b/clang-tools-extra/clangd/RIFF.cpp
index b87c2d56af0c..f59200bd5856 100644
--- a/clang-tools-extra/clangd/RIFF.cpp
+++ b/clang-tools-extra/clangd/RIFF.cpp
@@ -33,7 +33,7 @@ llvm::Expected<Chunk> readChunk(llvm::StringRef &Stream) {
llvm::Twine(Stream.size()));
C.Data = Stream.take_front(Len);
Stream = Stream.drop_front(Len);
- if (Len % 2 & !Stream.empty()) { // Skip padding byte.
+ if ((Len % 2) && !Stream.empty()) { // Skip padding byte.
if (Stream.front())
return makeError("nonzero padding byte");
Stream = Stream.drop_front();
More information about the cfe-commits
mailing list