This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Fix missing return statement warning in PatternMatch.h
ClosedPublic

Authored by bondhugula on Apr 13 2022, 7:42 PM.

Details

Summary

Fix missing return statement warning in PatternMatch.h. NFC.

mlir/include/mlir/IR/PatternMatch.h:983:3: warning: no return statement in
function returning non-void [-Wreturn-type]

Diff Detail

Event Timeline

bondhugula created this revision.Apr 13 2022, 7:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2022, 7:42 PM
bondhugula requested review of this revision.Apr 13 2022, 7:42 PM
rriddle accepted this revision.Apr 13 2022, 11:18 PM

Wouldn't have expected this given the static assert, but weird.

mlir/include/mlir/IR/PatternMatch.h
983

This technically returns a std::string, can we use {} or something instead?

This revision is now accepted and ready to land.Apr 13 2022, 11:18 PM

Switch to {}.

Wouldn't have expected this given the static assert, but weird.

I do get that warning with (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10).

This revision was landed with ongoing or failed builds.Apr 14 2022, 12:36 AM
This revision was automatically updated to reflect the committed changes.