[llvm-bugs] [Bug 52556] New: llvm/include/llvm/IR/ModuleSummaryIndex.h:1166:73: warning: member ‘llvm::ModuleSummaryIndex::Alloc’ is used uninitialized [-Wuninitialized]

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 19 04:09:36 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=52556

            Bug ID: 52556
           Summary: llvm/include/llvm/IR/ModuleSummaryIndex.h:1166:73:
                    warning: member ‘llvm::ModuleSummaryIndex::Alloc’ is
                    used uninitialized [-Wuninitialized]
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dcb314 at hotmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

In file included from
/home/dcb/llvm/trunk/clang/include/clang/CodeGen/BackendUtil.h:13,
                 from
/home/dcb/llvm/trunk/clang/lib/Interpreter/IncrementalParser.cpp:16:
/home/dcb/llvm/trunk/llvm/include/llvm/IR/ModuleSummaryIndex.h: In constructor
‘llvm::ModuleSummaryIndex::ModuleSummaryIndex(bool, bool)’:
/home/dcb/llvm/trunk/llvm/include/llvm/IR/ModuleSummaryIndex.h:1166:73:
warning: member ‘llvm::ModuleSummaryIndex::Alloc’ is used uninitialized
[-Wuninitialized]
 1166 |       : HaveGVs(HaveGVs), EnableSplitLTOUnit(EnableSplitLTOUnit),
Saver(Alloc),
      |                                                                        
^~~~~

In C++, you can't init subobjects with other subobjects later in the 
declaration list.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211119/240066f7/attachment.html>


More information about the llvm-bugs mailing list