[clang] 3c83480 - [clang][AST] Fix `-Wuninitialized`. NFC

Michael Liao via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 9 12:59:00 PDT 2023


Author: Michael Liao
Date: 2023-04-09T15:58:10-04:00
New Revision: 3c83480ae95dde9b5d45b6fd7cdb1c64332531d7

URL: https://github.com/llvm/llvm-project/commit/3c83480ae95dde9b5d45b6fd7cdb1c64332531d7
DIFF: https://github.com/llvm/llvm-project/commit/3c83480ae95dde9b5d45b6fd7cdb1c64332531d7.diff

LOG: [clang][AST] Fix `-Wuninitialized`. NFC

- Adjust the declaration order as non-static member are initialized in
  order of declaration in the class definition.

Added: 
    

Modified: 
    clang/lib/AST/MicrosoftMangle.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp
index d8c837bcade02..e0fd8abe5e3b8 100644
--- a/clang/lib/AST/MicrosoftMangle.cpp
+++ b/clang/lib/AST/MicrosoftMangle.cpp
@@ -327,8 +327,8 @@ class MicrosoftCXXNameMangler {
 
   typedef llvm::DenseMap<const void *, StringRef> TemplateArgStringMap;
   TemplateArgStringMap TemplateArgStrings;
-  llvm::StringSaver TemplateArgStringStorage;
   llvm::BumpPtrAllocator TemplateArgStringStorageAlloc;
+  llvm::StringSaver TemplateArgStringStorage;
 
   typedef std::set<std::pair<int, bool>> PassObjectSizeArgsSet;
   PassObjectSizeArgsSet PassObjectSizeArgs;


        


More information about the cfe-commits mailing list