This is an archive of the discontinued LLVM Phabricator instance.

[IFS] Fix copy constructor warnings in IFSStub.cpp
ClosedPublic

Authored by haowei on Aug 12 2021, 2:46 PM.

Details

Summary

This change fixes the gcc warning on copy constructor in IFSStub.cpp file.

After this patch, gcc-11 no longer show the warning

/llvm/lib/InterfaceStub/IFSStub.cpp: In copy constructor ‘llvm::ifs::IFSStubTriple::IFSStubTriple(const llvm::ifs::IFSStubTriple&)’:
/llvm/lib/InterfaceStub/IFSStub.cpp:32:1: warning: base class ‘struct llvm::ifs::IFSStub’ should be explicitly initialized in the copy constructor [-Wextra]
   32 | IFSStubTriple::IFSStubTriple(IFSStubTriple const &Stub) {
      | ^~~~~~~~~~~~~

Diff Detail

Event Timeline

haowei created this revision.Aug 12 2021, 2:46 PM
haowei requested review of this revision.Aug 12 2021, 2:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2021, 2:46 PM
mcgrathr accepted this revision.Aug 12 2021, 6:45 PM
This revision is now accepted and ready to land.Aug 12 2021, 6:45 PM

LGTM With gcc-11, I no longer see the warning messages.

This revision was automatically updated to reflect the committed changes.