This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Fix reporting unrecognized flags in unittests.
ClosedPublic

Authored by ikudrin on Jan 28 2019, 3:04 AM.

Details

Summary

With D21896, unrecognized flags might be reported within a wrong test case. For example:

[ RUN      ] SanitizerCommon.IntFlags
[       OK ] SanitizerCommon.IntFlags (9 ms)
[ RUN      ] SanitizerCommon.StrFlags
WARNING: found 2 unrecognized flag(s):
    --flag_name
    zzzzzzz
[       OK ] SanitizerCommon.StrFlags (0 ms)

Actually, these two flags are created in SanitizerCommon.IntFlags.

The patch fixes that so that the warnings are issued within the right test case:

[ RUN      ] SanitizerCommon.IntFlags
WARNING: found 1 unrecognized flag(s):
    --flag_name
WARNING: found 1 unrecognized flag(s):
    zzzzzzz
[       OK ] SanitizerCommon.IntFlags (6 ms)
[ RUN      ] SanitizerCommon.StrFlags
[       OK ] SanitizerCommon.StrFlags (0 ms)

Diff Detail

Repository
rL LLVM

Event Timeline

ikudrin created this revision.Jan 28 2019, 3:04 AM
Herald added subscribers: Restricted Project, dberris, kubamracek. · View Herald TranscriptJan 28 2019, 3:04 AM
rnk accepted this revision.Jan 28 2019, 1:56 PM

lgtm, thanks!

This revision is now accepted and ready to land.Jan 28 2019, 1:56 PM
This revision was automatically updated to reflect the committed changes.