[Mlir-commits] [mlir] 72e2b4e - Apply clang-tidy fixes for modernize-use-default-member-init in PDLLServer.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Thu Apr 14 15:59:47 PDT 2022


Author: Mehdi Amini
Date: 2022-04-14T22:59:14Z
New Revision: 72e2b4e7a762b4768a068c25909f8bedca47112e

URL: https://github.com/llvm/llvm-project/commit/72e2b4e7a762b4768a068c25909f8bedca47112e
DIFF: https://github.com/llvm/llvm-project/commit/72e2b4e7a762b4768a068c25909f8bedca47112e.diff

LOG: Apply clang-tidy fixes for modernize-use-default-member-init in PDLLServer.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp b/mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
index 8ed0bc2f87f83..f588439e9b79b 100644
--- a/mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
+++ b/mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
@@ -1060,7 +1060,7 @@ class PDLTextFile {
   int64_t version;
 
   /// The number of lines in the file.
-  int64_t totalNumLines;
+  int64_t totalNumLines = 0;
 
   /// The chunks of this file. The order of these chunks is the order in which
   /// they appear in the text file.
@@ -1072,7 +1072,7 @@ PDLTextFile::PDLTextFile(const lsp::URIForFile &uri, StringRef fileContents,
                          int64_t version,
                          const std::vector<std::string> &extraDirs,
                          std::vector<lsp::Diagnostic> &diagnostics)
-    : contents(fileContents.str()), version(version), totalNumLines(0) {
+    : contents(fileContents.str()), version(version) {
   // Split the file into separate PDL documents.
   // TODO: Find a way to share the split file marker with other tools. We don't
   // want to use `splitAndProcessBuffer` here, but we do want to make sure this


        


More information about the Mlir-commits mailing list