New clang flags, all default to true:
-f[no-]sanitize-thread-data-races
-f[no-]sanitize-thread-stack-traces
-f[no-]sanitize-thread-atomics
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
735 ↗ | (On Diff #77366) | It seems common to hardcode the default option value here. |
Oh, and this needs a test. See test/Driver/fsanitize.c (search for -fsanitize-address-use-after-scope as an example).
lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
735 ↗ | (On Diff #77366) | True, but the default value for these flags is already mentioned in more than one place, why not to try to reduce the complexity? |
lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
735 ↗ | (On Diff #77366) | I guess I don't mind either way. |
test/Driver/fsanitize.c | ||
---|---|---|
288 ↗ | (On Diff #77398) | did you mean CHECK-TSAN-DATA-RACES-BOTH-NOT? |
include/clang/Driver/Options.td | ||
---|---|---|
733 ↗ | (On Diff #77398) | These descriptions may be confusing for users. Does user see what's the default value? If not, then I guess some users will add flags just because they do want data races detection and stack traces. We need to make it clear that all flags are enabled by default. |
test/Driver/fsanitize.c | ||
---|---|---|
288 ↗ | (On Diff #77398) | I missed -BOTH on the FileCheck line above and in couple of other places. |
Seems like a reasonable enough first step. Please add a FIXME to pass these flags as attributes.
lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
732 ↗ | (On Diff #77631) | It looks like lib/Frontend changes are no longer necessary. |
include/clang/Driver/Options.td | ||
---|---|---|
732 ↗ | (On Diff #77647) | You can remove the Flags<[CC1Option]> part in each of these now. |