[PATCH] D25857: [tsan][clang] Introduce a function attribute to disable TSan checking at run time
Dmitry Vyukov via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 6 19:59:46 PST 2016
dvyukov added inline comments.
================
Comment at: test/CodeGen/sanitize-thread-no-checking-at-run-time.m:1
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -x objective-c++ -emit-llvm -o - %s | FileCheck -check-prefix=WITHOUT %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -x objective-c++ -emit-llvm -o - %s -fsanitize=thread | FileCheck -check-prefix=TSAN %s
----------------
Are you sure this is the right location for the test?
test/CodeGen does not seem to contain any tests, only subdirs.
================
Comment at: test/CodeGen/sanitize-thread-no-checking-at-run-time.m:35
+// TSAN: attributes [[ATTR]] = { nounwind {{.*}} "sanitize_thread_no_checking_at_run_time" {{.*}} }
+// TSAN-NOT: sanitize_thread
----------------
Does this check actually work?
I would expect that sanitize_thread, if present, will be eaten by the previous line.
Not sure what's the best way to fix it. What is the exact list of attributes on the previous line? Maybe we can just specify them all without using {{.*}}?
https://reviews.llvm.org/D25857
More information about the cfe-commits
mailing list