NoQ created this revision.
NoQ added reviewers: kkwli0, ABataev, ahatanak, erik.pilkington.
Herald added subscribers: cfe-commits, Charusso, jdoerfert, dexonsmith.
Herald added a project: clang.

I noticed that people occasionally forget that unlike `CHECK:`, directives 
`CHECK` and `CHECK :` are not reacted upon by FileCheck. Tests still pass, but 
they don't actually test anything.

So i grepped real quick and found these four missing colons, one of which (the 
one in `Analysis/cfg-rich-constructors.cpp`) is mine. All four are in clang; 
there aren't any missing colons in other projects in the monorepo.

I'm not entirely sure about the change 
`OpenMP/sections_lastprivate_codegen.cpp`: it seems that replacing `CHECK:` 
with `CHECK` is a common way of making FIXME tests, but there's no indication 
anywhere that this is a known issue. The test was added in D11619 
<https://reviews.llvm.org/D11619>.


Repository:
  rC Clang

https://reviews.llvm.org/D64526

Files:
  clang/test/Analysis/cfg-rich-constructors.cpp
  clang/test/CodeGenCXX/noescape.cpp
  clang/test/CodeGenObjC/externally-retained.m
  clang/test/OpenMP/sections_lastprivate_codegen.cpp


Index: clang/test/OpenMP/sections_lastprivate_codegen.cpp
===================================================================
--- clang/test/OpenMP/sections_lastprivate_codegen.cpp
+++ clang/test/OpenMP/sections_lastprivate_codegen.cpp
@@ -27,7 +27,10 @@
 volatile int g = 1212;
 
 // CHECK: [[S_FLOAT_TY:%.+]] = type { float }
+
+// FIXME: This line doesn't work.
 // CHECK [[CAP_MAIN_TY:%.+]] = type { i{{[0-9]+}}*, [2 x i{{[0-9]+}}]*, [2 x 
[[S_FLOAT_TY]]]*, [[S_FLOAT_TY]]*, i{{[0-9]+}}* }
+
 // CHECK: [[S_INT_TY:%.+]] = type { i32 }
 // CHECK-DAG: [[SECTIONS_BARRIER_LOC:@.+]] = private unnamed_addr global 
%{{.+}} { i32 0, i32 194, i32 0, i32 0, i8*
 // CHECK-DAG: [[X:@.+]] = global double 0.0
Index: clang/test/CodeGenObjC/externally-retained.m
===================================================================
--- clang/test/CodeGenObjC/externally-retained.m
+++ clang/test/CodeGenObjC/externally-retained.m
@@ -22,7 +22,7 @@
 void param(ObjTy *p) EXT_RET {
   // CHECK-LABEL: define void @param
   // CHECK-NOT: llvm.objc.
-  // CHECK ret
+  // CHECK: ret
 }
 
 void local() {
Index: clang/test/CodeGenCXX/noescape.cpp
===================================================================
--- clang/test/CodeGenCXX/noescape.cpp
+++ clang/test/CodeGenCXX/noescape.cpp
@@ -45,7 +45,7 @@
 }
 
 // CHECK-LABEL: define i8* @_Z5test1Pv(
-// CHECK : %call = call {{.*}} @_ZnwmPv({{.*}}, {{.*}} nocapture {{.*}})
+// CHECK: %call = call {{.*}} @_ZnwmPv({{.*}}, {{.*}} nocapture {{.*}})
 void *test1(void *p0) {
   return ::operator new(16, p0);
 }
Index: clang/test/Analysis/cfg-rich-constructors.cpp
===================================================================
--- clang/test/Analysis/cfg-rich-constructors.cpp
+++ clang/test/Analysis/cfg-rich-constructors.cpp
@@ -459,7 +459,7 @@
 // TODO: Should provide construction context for the constructor,
 // even if there is no specific trigger statement here.
 // CHECK: void simpleTemporary()
-// CHECK           1: C() (CXXConstructExpr, class C)
+// CHECK:          1: C() (CXXConstructExpr, class C)
 void simpleTemporary() {
   C();
 }


Index: clang/test/OpenMP/sections_lastprivate_codegen.cpp
===================================================================
--- clang/test/OpenMP/sections_lastprivate_codegen.cpp
+++ clang/test/OpenMP/sections_lastprivate_codegen.cpp
@@ -27,7 +27,10 @@
 volatile int g = 1212;
 
 // CHECK: [[S_FLOAT_TY:%.+]] = type { float }
+
+// FIXME: This line doesn't work.
 // CHECK [[CAP_MAIN_TY:%.+]] = type { i{{[0-9]+}}*, [2 x i{{[0-9]+}}]*, [2 x [[S_FLOAT_TY]]]*, [[S_FLOAT_TY]]*, i{{[0-9]+}}* }
+
 // CHECK: [[S_INT_TY:%.+]] = type { i32 }
 // CHECK-DAG: [[SECTIONS_BARRIER_LOC:@.+]] = private unnamed_addr global %{{.+}} { i32 0, i32 194, i32 0, i32 0, i8*
 // CHECK-DAG: [[X:@.+]] = global double 0.0
Index: clang/test/CodeGenObjC/externally-retained.m
===================================================================
--- clang/test/CodeGenObjC/externally-retained.m
+++ clang/test/CodeGenObjC/externally-retained.m
@@ -22,7 +22,7 @@
 void param(ObjTy *p) EXT_RET {
   // CHECK-LABEL: define void @param
   // CHECK-NOT: llvm.objc.
-  // CHECK ret
+  // CHECK: ret
 }
 
 void local() {
Index: clang/test/CodeGenCXX/noescape.cpp
===================================================================
--- clang/test/CodeGenCXX/noescape.cpp
+++ clang/test/CodeGenCXX/noescape.cpp
@@ -45,7 +45,7 @@
 }
 
 // CHECK-LABEL: define i8* @_Z5test1Pv(
-// CHECK : %call = call {{.*}} @_ZnwmPv({{.*}}, {{.*}} nocapture {{.*}})
+// CHECK: %call = call {{.*}} @_ZnwmPv({{.*}}, {{.*}} nocapture {{.*}})
 void *test1(void *p0) {
   return ::operator new(16, p0);
 }
Index: clang/test/Analysis/cfg-rich-constructors.cpp
===================================================================
--- clang/test/Analysis/cfg-rich-constructors.cpp
+++ clang/test/Analysis/cfg-rich-constructors.cpp
@@ -459,7 +459,7 @@
 // TODO: Should provide construction context for the constructor,
 // even if there is no specific trigger statement here.
 // CHECK: void simpleTemporary()
-// CHECK           1: C() (CXXConstructExpr, class C)
+// CHECK:          1: C() (CXXConstructExpr, class C)
 void simpleTemporary() {
   C();
 }
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to