[PATCH] D43230: [clangd] Explicitly initialize all primitive fields in Protocol.h
Jan Korous via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 13 03:46:16 PST 2018
jkorous-apple added inline comments.
================
Comment at: clangd/Protocol.h:190
/// (see exit notification) its process.
- llvm::Optional<int> processId;
+ llvm::Optional<int> processId = 0;
----------------
Sorry if I am asking stupid question but since the type is Optional<> isn't it's default-constructed value more appropriate here?
================
Comment at: clangd/Protocol.h:211
/// The initial trace setting. If omitted trace is disabled ('off').
- llvm::Optional<TraceLevel> trace;
+ llvm::Optional<TraceLevel> trace = TraceLevel::Off;
};
----------------
Does it still make more sense to use Optional<TraceLevel> than plain TraceLevel?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D43230
More information about the cfe-commits
mailing list