This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Silence GCC warnings about missing returns after fully covered switches. NFC.
ClosedPublic

Authored by mstorsjo on Apr 6 2022, 4:53 AM.

Details

Summary

This silences warnings like this:

lldb/source/Core/DebuggerEvents.cpp: In member function ‘llvm::StringRef lldb_private::DiagnosticEventData::GetPrefix() const’:
lldb/source/Core/DebuggerEvents.cpp:55:1: warning: control reaches end of non-void function [-Wreturn-type]

55 | }

Diff Detail

Event Timeline

mstorsjo created this revision.Apr 6 2022, 4:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2022, 4:53 AM
mstorsjo requested review of this revision.Apr 6 2022, 4:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2022, 4:53 AM
labath accepted this revision.Apr 6 2022, 4:59 AM

Yes, that's the way we usually deal with this.

This revision is now accepted and ready to land.Apr 6 2022, 4:59 AM
JDevlieghere accepted this revision.Apr 6 2022, 8:46 AM

Thanks!