<commit_before>// RUN: %clangxx_tsan %s -o %t
// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'

#include <dispatch/dispatch.h>

#import <memory>
#import <stdatomic.h>

_Atomic(long) destructor_counter = 0;

struct MyStruct {
  virtual ~MyStruct() {
    usleep(10000);
    atomic_fetch_add_explicit(&destructor_counter, 1, memory_order_relaxed);
  }
};

int main(int argc, const char *argv[]) {
  fprintf(stderr, "Hello world.\n");<commit_msg>[TSan][libdispatch] Make test work on Linux<commit_after>// RUN: %clangxx_tsan %s %link_libcxx_tsan -o %t
// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not='ThreadSanitizer'

#include <dispatch/dispatch.h>

#include <memory>
#include <stdatomic.h>
#include <cstdio>

_Atomic(long) destructor_counter = 0;

struct MyStruct {
  virtual ~MyStruct() {
    usleep(10000);
    atomic_fetch_add_explicit(&destructor_counter, 1, memory_order_relaxed);
  }
};

int main(int argc, const char *argv[]) {
  fprintf(stderr, "Hello world.\n");
{'fraction_non_alphanumeric': 0.1553784860557769, 'fraction_numerical': 0.017928286852589643, 'mean_word_length': 5.017964071856287, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2639223', 'n_tokens_mistral': 395, 'n_tokens_neox': 371, 'n_words': 85}