[PATCH] D150744: [NFC][CLANG] Fix uninitialized scalar field issues found by Coverity

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 18 09:16:14 PDT 2023


shafik added inline comments.


================
Comment at: clang/include/clang/Parse/Parser.h:1190
   class ParseScopeFlags {
     Scope *CurScope;
+    unsigned OldFlags = 0;
----------------
@tahonermann I feel like we should have a default member initializer for any member that by default is not initialized. I realize in this case there currently should be no way for this to be bot initialized but that may not stay true and I don't believe there will be a penalty for doing this since it is initialized in the `mem-initializer-list` and therefore the default init should be omitted when calling the constructor. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150744/new/

https://reviews.llvm.org/D150744



More information about the cfe-commits mailing list