[clang-tools-extra] r371081 - [clangd] Initialize int field to zero. NFC
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 5 08:30:05 PDT 2019
Author: ibiryukov
Date: Thu Sep 5 08:30:05 2019
New Revision: 371081
URL: http://llvm.org/viewvc/llvm-project?rev=371081&view=rev
Log:
[clangd] Initialize int field to zero. NFC
To make sure we do not have uninitialized values and undefined behavior.
Modified:
clang-tools-extra/trunk/clangd/Protocol.h
Modified: clang-tools-extra/trunk/clangd/Protocol.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Protocol.h?rev=371081&r1=371080&r2=371081&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/Protocol.h (original)
+++ clang-tools-extra/trunk/clangd/Protocol.h Thu Sep 5 08:30:05 2019
@@ -1205,7 +1205,7 @@ llvm::json::Value toJSON(const FileStatu
/// specific line of the text document.
struct SemanticHighlightingInformation {
/// The line these highlightings belong to.
- int Line;
+ int Line = 0;
/// The base64 encoded string of highlighting tokens.
std::string Tokens;
};
More information about the cfe-commits
mailing list