[TSan] Improve output tests: allow reports to contain file:line:column instead of file:line

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159714 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/tsan/output_tests/race_on_mutex.c b/lib/tsan/output_tests/race_on_mutex.c
index 90c32ba..45c75be 100644
--- a/lib/tsan/output_tests/race_on_mutex.c
+++ b/lib/tsan/output_tests/race_on_mutex.c
@@ -35,8 +35,7 @@
 // CHECK:      WARNING: ThreadSanitizer: data race
 // CHECK-NEXT:   Read of size 1 at {{.*}} by thread 2:
 // CHECK-NEXT:     #0 pthread_mutex_lock {{.*}} ({{.*}})
-// CHECK-NEXT:     #1 Thread2 {{.*}}race_on_mutex.c:19 ({{.*}})
+// CHECK-NEXT:     #1 Thread2 {{.*}}race_on_mutex.c:19{{(:3)?}} ({{.*}})
 // CHECK-NEXT:   Previous write of size 1 at {{.*}} by thread 1:
 // CHECK-NEXT:     #0 pthread_mutex_init {{.*}} ({{.*}})
-// CHECK-NEXT:     #1 Thread1 {{.*}}race_on_mutex.c:10 ({{.*}})
-
+// CHECK-NEXT:     #1 Thread1 {{.*}}race_on_mutex.c:10{{(:3)?}} ({{.*}})
diff --git a/lib/tsan/output_tests/simple_stack.c b/lib/tsan/output_tests/simple_stack.c
index ade99da..2e94f23 100644
--- a/lib/tsan/output_tests/simple_stack.c
+++ b/lib/tsan/output_tests/simple_stack.c
@@ -48,19 +48,18 @@
 
 // CHECK:      WARNING: ThreadSanitizer: data race
 // CHECK-NEXT:   Write of size 4 at {{.*}} by thread 1:
-// CHECK-NEXT:     #0 foo1 {{.*}}simple_stack.c:8 ({{.*}})
-// CHECK-NEXT:     #1 bar1 {{.*}}simple_stack.c:13 ({{.*}})
-// CHECK-NEXT:     #2 Thread1 {{.*}}simple_stack.c:27 ({{.*}})
+// CHECK-NEXT:     #0 foo1 {{.*}}simple_stack.c:8{{(:3)?}} ({{.*}})
+// CHECK-NEXT:     #1 bar1 {{.*}}simple_stack.c:13{{(:3)?}} ({{.*}})
+// CHECK-NEXT:     #2 Thread1 {{.*}}simple_stack.c:27{{(:3)?}} ({{.*}})
 // CHECK-NEXT:   Previous read of size 4 at {{.*}} by thread 2:
-// CHECK-NEXT:     #0 foo2 {{.*}}simple_stack.c:17 ({{.*}})
-// CHECK-NEXT:     #1 bar2 {{.*}}simple_stack.c:22 ({{.*}})
-// CHECK-NEXT:     #2 Thread2 {{.*}}simple_stack.c:32 ({{.*}})
+// CHECK-NEXT:     #0 foo2 {{.*}}simple_stack.c:17{{(:26)?}} ({{.*}})
+// CHECK-NEXT:     #1 bar2 {{.*}}simple_stack.c:22{{(:3)?}} ({{.*}})
+// CHECK-NEXT:     #2 Thread2 {{.*}}simple_stack.c:32{{(:3)?}} ({{.*}})
 // CHECK-NEXT:   Thread 1 (running) created at:
 // CHECK-NEXT:     #0 pthread_create {{.*}} ({{.*}})
-// CHECK-NEXT:     #1 StartThread {{.*}}simple_stack.c:37 ({{.*}})
-// CHECK-NEXT:     #2 main {{.*}}simple_stack.c:42 ({{.*}})
+// CHECK-NEXT:     #1 StartThread {{.*}}simple_stack.c:37{{(:3)?}} ({{.*}})
+// CHECK-NEXT:     #2 main {{.*}}simple_stack.c:42{{(:3)?}} ({{.*}})
 // CHECK-NEXT:   Thread 2 ({{.*}}) created at:
 // CHECK-NEXT:     #0 pthread_create {{.*}} ({{.*}})
-// CHECK-NEXT:     #1 StartThread {{.*}}simple_stack.c:37 ({{.*}})
-// CHECK-NEXT:     #2 main {{.*}}simple_stack.c:43 ({{.*}})
-
+// CHECK-NEXT:     #1 StartThread {{.*}}simple_stack.c:37{{(:3)?}} ({{.*}})
+// CHECK-NEXT:     #2 main {{.*}}simple_stack.c:43{{(:3)?}} ({{.*}})
diff --git a/lib/tsan/output_tests/simple_stack2.cc b/lib/tsan/output_tests/simple_stack2.cc
index 811bc6d..336cc9f 100644
--- a/lib/tsan/output_tests/simple_stack2.cc
+++ b/lib/tsan/output_tests/simple_stack2.cc
@@ -37,12 +37,10 @@
 
 // CHECK:      WARNING: ThreadSanitizer: data race
 // CHECK-NEXT:   Write of size 4 at {{.*}} by thread 1:
-// CHECK-NEXT:     #0 foo1{{.*}} {{.*}}simple_stack2.cc:8 ({{.*}})
-// CHECK-NEXT:     #1 bar1{{.*}} {{.*}}simple_stack2.cc:13 ({{.*}})
-// CHECK-NEXT:     #2 Thread1{{.*}} {{.*}}simple_stack2.cc:27 ({{.*}})
+// CHECK-NEXT:     #0 foo1{{.*}} {{.*}}simple_stack2.cc:8{{(:3)?}} ({{.*}})
+// CHECK-NEXT:     #1 bar1{{.*}} {{.*}}simple_stack2.cc:13{{(:3)?}} ({{.*}})
+// CHECK-NEXT:     #2 Thread1{{.*}} {{.*}}simple_stack2.cc:27{{(:3)?}} ({{.*}})
 // CHECK-NEXT:   Previous read of size 4 at {{.*}} by main thread:
-// CHECK-NEXT:     #0 foo2{{.*}} {{.*}}simple_stack2.cc:17 ({{.*}})
-// CHECK-NEXT:     #1 bar2{{.*}} {{.*}}simple_stack2.cc:22 ({{.*}})
-// CHECK-NEXT:     #2 main{{.*}} {{.*}}simple_stack2.cc:34 ({{.*}})
-
-
+// CHECK-NEXT:     #0 foo2{{.*}} {{.*}}simple_stack2.cc:17{{(:28)?}} ({{.*}})
+// CHECK-NEXT:     #1 bar2{{.*}} {{.*}}simple_stack2.cc:22{{(:3)?}} ({{.*}})
+// CHECK-NEXT:     #2 main{{.*}} {{.*}}simple_stack2.cc:34{{(:3)?}} ({{.*}})