Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

llvm/include/llvm/IR/ModuleSummaryIndex.h:1166:73: warning: member ‘llvm::ModuleSummaryIndex::Alloc’ is used uninitialized [-Wuninitialized] #51523

Open Quuxplusone opened 2 years ago

Quuxplusone commented 2 years ago
Bugzilla Link PR52556
Status NEW
Importance P normal
Reported by David Binderman (dcb314@hotmail.com)
Reported on 2021-11-19 04:09:36 -0800
Last modified on 2021-11-19 04:18:05 -0800
Version trunk
Hardware PC Linux
CC htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, pushpinderdhaliwal00@gmail.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
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.
Quuxplusone commented 2 years ago

Adding author of code.