Author: Sam McCall Date: 2022-05-20T20:29:47+02:00 New Revision: 1fef69da0bfd51de916f0a869f97740c51211cc1
URL: https://github.com/llvm/llvm-project/commit/1fef69da0bfd51de916f0a869f97740c51211cc1 DIFF: https://github.com/llvm/llvm-project/commit/1fef69da0bfd51de916f0a869f97740c51211cc1.diff LOG: Avoid uninitialized Diag.ID (which we pass but never read) Added: Modified: clang-tools-extra/clangd/Diagnostics.h Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/Diagnostics.h b/clang-tools-extra/clangd/Diagnostics.h index 14627ea3d6a0..6004bb147361 100644 --- a/clang-tools-extra/clangd/Diagnostics.h +++ b/clang-tools-extra/clangd/Diagnostics.h @@ -69,7 +69,7 @@ struct DiagBase { // Since File is only descriptive, we store a separate flag to distinguish // diags from the main file. bool InsideMainFile = false; - unsigned ID; // e.g. member of clang::diag, or clang-tidy assigned ID. + unsigned ID = 0; // e.g. member of clang::diag, or clang-tidy assigned ID. // Feature modules can make use of this field to propagate data from a // diagnostic to a CodeAction request. Each module should only append to the // list. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits