This is an archive of the discontinued LLVM Phabricator instance.

[clang][dataflow] Fix bug in optional-checker's handling of nullopt constructor.
ClosedPublic

Authored by ymandel on Jan 3 2023, 12:58 PM.

Details

Summary

Currently, the checker only recognizes the nullopt constructor when it is called
without sugar, resulting in a crash in the (rare) case where it has been wrapped
in sugar. This relaxes the constraint by checking the constructor decl directly
(which always contains the same, desugared form) rather than the construct
expression (where the spelling depends on the context).

Diff Detail

Event Timeline

ymandel created this revision.Jan 3 2023, 12:58 PM
Herald added a project: Restricted Project. · View Herald Transcript
ymandel requested review of this revision.Jan 3 2023, 12:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 3 2023, 12:58 PM
xazax.hun accepted this revision.Jan 3 2023, 1:35 PM
This revision is now accepted and ready to land.Jan 3 2023, 1:35 PM
This revision was landed with ongoing or failed builds.Jan 3 2023, 1:57 PM
This revision was automatically updated to reflect the committed changes.