This is an archive of the discontinued LLVM Phabricator instance.

[libc++][test] Suppress MSVC warnings in std::expected tests
ClosedPublic

Authored by CaseyCarter on Jan 5 2023, 10:05 PM.

Details

Reviewers
huixie90
Group Reviewers
Restricted Project
Summary
  • initializing shorts with shorts instead of ints to avoid narrowing warnings
  • Explicitly discard the result of value calls to avoid [[nodiscard]] warnings

Drive-by: testException from value test is duplicated in value_or test; remove the duplicate.

Diff Detail

Event Timeline

CaseyCarter created this revision.Jan 5 2023, 10:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 5 2023, 10:05 PM
CaseyCarter requested review of this revision.Jan 5 2023, 10:05 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptJan 5 2023, 10:05 PM
huixie90 accepted this revision.Jan 5 2023, 11:10 PM

Thank you for the fix

This revision is now accepted and ready to land.Jan 5 2023, 11:10 PM
CaseyCarter retitled this revision from [libc++][test] Suppress MSVC narrowing warnings to [libc++][test] Suppress MSVC warnings in std::expected tests.
CaseyCarter edited the summary of this revision. (Show Details)

Thank you for the tidy-up.

huixie90 accepted this revision.Jan 5 2023, 11:48 PM
CaseyCarter closed this revision.Jan 6 2023, 10:05 AM

Merged as bdf7da280f624c53e6184d0410041220a9b405a7 (*sigh* someday I'll learn the right magic words to autoclose.)