Driver: Add integer sanitizers to trapping group automatically.
authorPeter Collingbourne <peter@pcc.me.uk>
Tue, 20 Oct 2020 05:18:18 +0000 (22:18 -0700)
committerPeter Collingbourne <peter@pcc.me.uk>
Tue, 20 Oct 2020 20:45:39 +0000 (13:45 -0700)
commitc5acd3490b79703426931f7b88b544fe7c6e1ef2
tree3883f1da7be6c47c3c7cfdd03115e0c81c326950
parent332ff48deea1d68c55311abf6e5b25cf60c10419
Driver: Add integer sanitizers to trapping group automatically.

In D86000 we added a new sanitizer to the integer group
without adding it to the trapping group. This broke usage of
-fsanitize=integer -fsanitize-trap=integer or -fsanitize=integer
-fsanitize-minimal-runtime.

I think we can reasonably expect any new integer sanitizers to be
compatible with trapping and the minimal runtime, so add them to the
trapping group automatically.

Also add a test to ensure that any future additions of sanitizers
to the integer group will most likely result in test failures which
would lead to updates to the minimal runtime if necessary. For this
particular sanitizer no updates are required because it uses the
existing shift_out_of_bounds callback function.

Differential Revision: https://reviews.llvm.org/D89766
clang/lib/Driver/SanitizerArgs.cpp
clang/test/Driver/fsanitize.c