This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Clean up tests.
ClosedPublic

Authored by cferris on Jul 19 2023, 1:45 PM.

Details

Summary

Modify the tests so that all clang warnings can be turned up to high.

Fix all places flagged by -Wconversion.

Fix a few unused variables not marked with UNUSED.

For the memtag testing, only compile some tests for 64 bit since
compiling them on 32 bit leads to warnings/errors. All of the tests
are already skipped on 32 bit OSes, so this will not affect any
real tests.

Diff Detail

Event Timeline

cferris created this revision.Jul 19 2023, 1:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2023, 1:45 PM
cferris requested review of this revision.Jul 19 2023, 1:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2023, 1:46 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
cferris updated this revision to Diff 542177.Jul 19 2023, 1:46 PM

clang format.

Chia-hungDuan accepted this revision.Jul 20 2023, 9:13 AM
Chia-hungDuan added inline comments.
compiler-rt/lib/scudo/standalone/tests/secondary_test.cpp
219–221

Just curious, how did it work without std:: previously? Called to the C rand() function?

This revision is now accepted and ready to land.Jul 20 2023, 9:13 AM
cferris added inline comments.Jul 20 2023, 2:00 PM
compiler-rt/lib/scudo/standalone/tests/secondary_test.cpp
219–221

I'm guessing it just used the normal rand which is functionally the same as std::rand.

This revision was automatically updated to reflect the committed changes.