[clang-tools-extra] 0e8384a - [clangd] Initialize local variable
Vitaly Buka via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 13 09:00:27 PDT 2023
Author: Vitaly Buka
Date: 2023-06-13T08:58:46-07:00
New Revision: 0e8384a0fe4f03d60cd92aba1cae074512481ca2
URL: https://github.com/llvm/llvm-project/commit/0e8384a0fe4f03d60cd92aba1cae074512481ca2
DIFF: https://github.com/llvm/llvm-project/commit/0e8384a0fe4f03d60cd92aba1cae074512481ca2.diff
LOG: [clangd] Initialize local variable
desugarForDiagnostic only sets value to true.
Added:
Modified:
clang-tools-extra/clangd/InlayHints.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/InlayHints.cpp b/clang-tools-extra/clangd/InlayHints.cpp
index 416a01f4737bc..941a8fdfdfdfe 100644
--- a/clang-tools-extra/clangd/InlayHints.cpp
+++ b/clang-tools-extra/clangd/InlayHints.cpp
@@ -218,7 +218,7 @@ bool isSugaredTemplateParameter(QualType QT) {
// A simple wrapper for `clang::desugarForDiagnostic` that provides optional
// semantic.
std::optional<QualType> desugar(ASTContext &AST, QualType QT) {
- bool ShouldAKA;
+ bool ShouldAKA = false;
auto Desugared = clang::desugarForDiagnostic(AST, QT, ShouldAKA);
if (!ShouldAKA)
return std::nullopt;
More information about the cfe-commits
mailing list