Re: [PATCH] D17051: Get rid of CHECK-SAME-NOT in tests.

2016-02-09 Thread Jonathan Roelofs via cfe-commits
jroelofs added a subscriber: jroelofs.


Comment at: test/Modules/ModuleDebugInfo.cpp:10
@@ -9,3 +9,3 @@
 // RUN: cat %t-mod.ll | FileCheck %s
 // RUN: cat %t-mod.ll | FileCheck --check-prefix=CHECK-NEG %s
 

While you're here, may as well shorten these three lines to:


```
// RUN: %clang_cc1 -triple %itanium_abi_triple -x objective-c++ -std=c++11 
-debug-info-kind=limited -fmodules -fmodule-format=obj -fimplicit-module-maps 
-DMODULES -fmodules-cache-path=%t %s -I %S/Inputs -I %t -emit-llvm -o %t.ll 
-mllvm -debug-only=pchcontainer | FileCheck %s --check-prefix=CHECK 
--check-prefix=CHECK-NEG
```

(as long as you also move the one CHECK-NEG-NOT line up before all of the other 
`CHECK` lines)


Comment at: test/Modules/ModuleDebugInfo.cpp:25
@@ -25,1 +24,3 @@
+// CHECK-SAME:dwoId:
+// CHECK-SAME:)
 

This `CHECK-SAME` line and all the others are still dead. There's no 
`--check-prefix=CHECK-SAME`. This is really fishy.


http://reviews.llvm.org/D17051



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D17051: Get rid of CHECK-SAME-NOT in tests.

2016-02-09 Thread Justin Lebar via cfe-commits
jlebar created this revision.
jlebar added a reviewer: majnemer.
jlebar added a subscriber: cfe-commits.

This isn't a FileCheck directive; it does nothing.

http://reviews.llvm.org/D17051

Files:
  test/CodeGenCXX/optnone-and-attributes.cpp
  test/CodeGenCXX/optnone-class-members.cpp
  test/CodeGenCXX/optnone-def-decl.cpp
  test/CodeGenCXX/optnone-templates.cpp
  test/Modules/ModuleDebugInfo.cpp
  test/Modules/ModuleDebugInfo.m

Index: test/Modules/ModuleDebugInfo.m
===
--- test/Modules/ModuleDebugInfo.m
+++ test/Modules/ModuleDebugInfo.m
@@ -31,8 +31,9 @@
 // CHECK: ![[MODULE]] = !DIModule(scope: null, name: "DebugObjC
 
 // CHECK: ![[TD_ENUM:.*]] = !DICompositeType(tag: DW_TAG_enumeration_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
 // CHECK-SAME: elements:
+// CHECK-SAME: )
 
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type,
 // CHECK-SAME: name: "FwdDecl",
@@ -45,26 +46,30 @@
 // CHECK-SAME: elements:
 
 // CHECK: ![[TD_UNION:.*]] = !DICompositeType(tag: DW_TAG_union_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
 // CHECK-SAME: elements:
+// CHECK-SAME: )
 
 // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "TypedefUnion",
 // CHECK-SAME:   baseType: ![[TD_UNION]])
 
 // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "TypedefEnum",
 // CHECK-SAME:   baseType: ![[TD_ENUM:.*]])
 
 // CHECK: ![[TD_STRUCT:.*]] = !DICompositeType(tag: DW_TAG_structure_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
 // CHECK-SAME: elements:
+// CHECK-SAME: )
 // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "TypedefStruct",
 // CHECK-SAME:   baseType: ![[TD_STRUCT]])
 
 // CHECK: !DICompositeType(tag: DW_TAG_union_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
+// CHECK-SAME: )
 
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
+// CHECK-SAME: )
 
 // CHECK: !DISubprogram(name: "+[ObjCClass classMethod]",
 // CHECK-SAME:  scope: ![[MODULE]],
Index: test/Modules/ModuleDebugInfo.cpp
===
--- test/Modules/ModuleDebugInfo.cpp
+++ test/Modules/ModuleDebugInfo.cpp
@@ -20,25 +20,29 @@
 
 // CHECK: distinct !DICompileUnit(language: DW_LANG_{{.*}}C_plus_plus,
 // CHECK-SAME:isOptimized: false,
-// CHECK-SAME-NOT:splitDebugFilename:
-// CHECK: dwoId:
+// CHECK-NOT: splitDebugFilename:
+// CHECK-SAME:dwoId:
+// CHECK-SAME:)
 
 // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Enum"
 // CHECK-SAME: identifier: "_ZTSN8DebugCXX4EnumE")
 // CHECK: !DINamespace(name: "DebugCXX"
 
 // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
+// CHECK-SAME: )
 
 // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
+// CHECK-SAME: )
 
 // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
 // CHECK-SAME: identifier: "_ZTS11TypedefEnum")
 
 // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
+// CHECK-SAME: )
 // CHECK: !DIEnumerator(name: "e5", value: 5)
 
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "Struct"
@@ -61,11 +65,11 @@
 // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "_vptr$FwdVirtual"
 
 // CHECK: !DICompositeType(tag: DW_TAG_union_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
 // CHECK-SAME: identifier: "_ZTS12TypedefUnion")
 
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
 // CHECK-SAME: identifier: "_ZTS13TypedefStruct")
 
 // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "FloatInstatiation"
@@ -75,10 +79,12 @@
 // no mangled name here yet.
 
 // CHECK: !DICompositeType(tag: DW_TAG_union_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
+// CHECK-SAME: )
 
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
+// CHECK-SAME: )
 
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type,
 // CHECK-SAME: name: "InAnonymousNamespace",
Index: test/CodeGenCXX/optnone-templates.cpp
===
--- test/CodeGenCXX/optnone-templates.cpp
+++ 

Re: [PATCH] D17051: Get rid of CHECK-SAME-NOT in tests.

2016-02-09 Thread Jonathan Roelofs via cfe-commits
jroelofs accepted this revision.
jroelofs added a reviewer: jroelofs.
jroelofs added a comment.
This revision is now accepted and ready to land.

LGTM.



Comment at: test/Modules/ModuleDebugInfo.cpp:10
@@ -9,3 +9,3 @@
 // RUN: cat %t-mod.ll | FileCheck %s
 // RUN: cat %t-mod.ll | FileCheck --check-prefix=CHECK-NEG %s
 

jlebar wrote:
> jlebar wrote:
> > jlebar wrote:
> > > jroelofs wrote:
> > > > While you're here, may as well shorten these three lines to:
> > > > 
> > > > 
> > > > ```
> > > > // RUN: %clang_cc1 -triple %itanium_abi_triple -x objective-c++ 
> > > > -std=c++11 -debug-info-kind=limited -fmodules -fmodule-format=obj 
> > > > -fimplicit-module-maps -DMODULES -fmodules-cache-path=%t %s -I 
> > > > %S/Inputs -I %t -emit-llvm -o %t.ll -mllvm -debug-only=pchcontainer | 
> > > > FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NEG
> > > > ```
> > > > 
> > > > (as long as you also move the one CHECK-NEG-NOT line up before all of 
> > > > the other `CHECK` lines)
> > > I don't think that means the same thing?  CHECK-NOT: foo checks that 
> > > "foo" does not appear between the last match (or the beginning of the 
> > > file, if there was no last match) *and the next match*.
> > Oh, I see, it's CHECK-NEG-NOT, so there are no other instances of 
> > CHECK-NEG, it's fine how you say.  I'll change it, sure.
> Actually, if you don't mind, I'd rather do that in a separate patch, in case 
> it breaks something.  I'll send you a patch in a sec.
I don't mind.


http://reviews.llvm.org/D17051



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D17051: Get rid of CHECK-SAME-NOT in tests.

2016-02-09 Thread Justin Lebar via cfe-commits
jlebar added inline comments.


Comment at: test/Modules/ModuleDebugInfo.cpp:10
@@ -9,3 +9,3 @@
 // RUN: cat %t-mod.ll | FileCheck %s
 // RUN: cat %t-mod.ll | FileCheck --check-prefix=CHECK-NEG %s
 

jroelofs wrote:
> While you're here, may as well shorten these three lines to:
> 
> 
> ```
> // RUN: %clang_cc1 -triple %itanium_abi_triple -x objective-c++ -std=c++11 
> -debug-info-kind=limited -fmodules -fmodule-format=obj -fimplicit-module-maps 
> -DMODULES -fmodules-cache-path=%t %s -I %S/Inputs -I %t -emit-llvm -o %t.ll 
> -mllvm -debug-only=pchcontainer | FileCheck %s --check-prefix=CHECK 
> --check-prefix=CHECK-NEG
> ```
> 
> (as long as you also move the one CHECK-NEG-NOT line up before all of the 
> other `CHECK` lines)
I don't think that means the same thing?  CHECK-NOT: foo checks that "foo" does 
not appear between the last match (or the beginning of the file, if there was 
no last match) *and the next match*.


Comment at: test/Modules/ModuleDebugInfo.cpp:25
@@ -25,1 +24,3 @@
+// CHECK-SAME:dwoId:
+// CHECK-SAME:)
 

jroelofs wrote:
> This `CHECK-SAME` line and all the others are still dead. There's no 
> `--check-prefix=CHECK-SAME`. This is really fishy.
CHECK-SAME means "check on the same line"?


http://reviews.llvm.org/D17051



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D17051: Get rid of CHECK-SAME-NOT in tests.

2016-02-09 Thread Justin Lebar via cfe-commits
jlebar marked 3 inline comments as done.


Comment at: test/Modules/ModuleDebugInfo.cpp:10
@@ -9,3 +9,3 @@
 // RUN: cat %t-mod.ll | FileCheck %s
 // RUN: cat %t-mod.ll | FileCheck --check-prefix=CHECK-NEG %s
 

jlebar wrote:
> jlebar wrote:
> > jroelofs wrote:
> > > While you're here, may as well shorten these three lines to:
> > > 
> > > 
> > > ```
> > > // RUN: %clang_cc1 -triple %itanium_abi_triple -x objective-c++ 
> > > -std=c++11 -debug-info-kind=limited -fmodules -fmodule-format=obj 
> > > -fimplicit-module-maps -DMODULES -fmodules-cache-path=%t %s -I %S/Inputs 
> > > -I %t -emit-llvm -o %t.ll -mllvm -debug-only=pchcontainer | FileCheck %s 
> > > --check-prefix=CHECK --check-prefix=CHECK-NEG
> > > ```
> > > 
> > > (as long as you also move the one CHECK-NEG-NOT line up before all of the 
> > > other `CHECK` lines)
> > I don't think that means the same thing?  CHECK-NOT: foo checks that "foo" 
> > does not appear between the last match (or the beginning of the file, if 
> > there was no last match) *and the next match*.
> Oh, I see, it's CHECK-NEG-NOT, so there are no other instances of CHECK-NEG, 
> it's fine how you say.  I'll change it, sure.
Actually, if you don't mind, I'd rather do that in a separate patch, in case it 
breaks something.  I'll send you a patch in a sec.


http://reviews.llvm.org/D17051



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D17051: Get rid of CHECK-SAME-NOT in tests.

2016-02-09 Thread Justin Lebar via cfe-commits
jlebar marked 2 inline comments as done.


Comment at: test/Modules/ModuleDebugInfo.cpp:10
@@ -9,3 +9,3 @@
 // RUN: cat %t-mod.ll | FileCheck %s
 // RUN: cat %t-mod.ll | FileCheck --check-prefix=CHECK-NEG %s
 

jroelofs wrote:
> jlebar wrote:
> > jlebar wrote:
> > > jlebar wrote:
> > > > jroelofs wrote:
> > > > > While you're here, may as well shorten these three lines to:
> > > > > 
> > > > > 
> > > > > ```
> > > > > // RUN: %clang_cc1 -triple %itanium_abi_triple -x objective-c++ 
> > > > > -std=c++11 -debug-info-kind=limited -fmodules -fmodule-format=obj 
> > > > > -fimplicit-module-maps -DMODULES -fmodules-cache-path=%t %s -I 
> > > > > %S/Inputs -I %t -emit-llvm -o %t.ll -mllvm -debug-only=pchcontainer | 
> > > > > FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NEG
> > > > > ```
> > > > > 
> > > > > (as long as you also move the one CHECK-NEG-NOT line up before all of 
> > > > > the other `CHECK` lines)
> > > > I don't think that means the same thing?  CHECK-NOT: foo checks that 
> > > > "foo" does not appear between the last match (or the beginning of the 
> > > > file, if there was no last match) *and the next match*.
> > > Oh, I see, it's CHECK-NEG-NOT, so there are no other instances of 
> > > CHECK-NEG, it's fine how you say.  I'll change it, sure.
> > Actually, if you don't mind, I'd rather do that in a separate patch, in 
> > case it breaks something.  I'll send you a patch in a sec.
> I don't mind.
OK, this is not so simple (or else, perhaps, it's I who is simple).  The output 
is sometimes empty, which makes FileCheck unhappy, and I don't even know what 
else is going on.  I've spent 20 minutes on this now, which I think is a fair 
penalty for stirring this pot.  :)  Feel free to send me a review.


http://reviews.llvm.org/D17051



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D17051: Get rid of CHECK-SAME-NOT in tests.

2016-02-09 Thread Justin Lebar via cfe-commits
jlebar marked an inline comment as done.


Comment at: test/Modules/ModuleDebugInfo.cpp:10
@@ -9,3 +9,3 @@
 // RUN: cat %t-mod.ll | FileCheck %s
 // RUN: cat %t-mod.ll | FileCheck --check-prefix=CHECK-NEG %s
 

jlebar wrote:
> jroelofs wrote:
> > While you're here, may as well shorten these three lines to:
> > 
> > 
> > ```
> > // RUN: %clang_cc1 -triple %itanium_abi_triple -x objective-c++ -std=c++11 
> > -debug-info-kind=limited -fmodules -fmodule-format=obj 
> > -fimplicit-module-maps -DMODULES -fmodules-cache-path=%t %s -I %S/Inputs -I 
> > %t -emit-llvm -o %t.ll -mllvm -debug-only=pchcontainer | FileCheck %s 
> > --check-prefix=CHECK --check-prefix=CHECK-NEG
> > ```
> > 
> > (as long as you also move the one CHECK-NEG-NOT line up before all of the 
> > other `CHECK` lines)
> I don't think that means the same thing?  CHECK-NOT: foo checks that "foo" 
> does not appear between the last match (or the beginning of the file, if 
> there was no last match) *and the next match*.
Oh, I see, it's CHECK-NEG-NOT, so there are no other instances of CHECK-NEG, 
it's fine how you say.  I'll change it, sure.


http://reviews.llvm.org/D17051



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D17051: Get rid of CHECK-SAME-NOT in tests.

2016-02-09 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL260334: Get rid of CHECK-SAME-NOT in tests. (authored by 
jlebar).

Changed prior to commit:
  http://reviews.llvm.org/D17051?vs=47385=47397#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D17051

Files:
  cfe/trunk/test/CodeGenCXX/optnone-and-attributes.cpp
  cfe/trunk/test/CodeGenCXX/optnone-class-members.cpp
  cfe/trunk/test/CodeGenCXX/optnone-def-decl.cpp
  cfe/trunk/test/CodeGenCXX/optnone-templates.cpp
  cfe/trunk/test/Modules/ModuleDebugInfo.cpp
  cfe/trunk/test/Modules/ModuleDebugInfo.m

Index: cfe/trunk/test/Modules/ModuleDebugInfo.m
===
--- cfe/trunk/test/Modules/ModuleDebugInfo.m
+++ cfe/trunk/test/Modules/ModuleDebugInfo.m
@@ -31,8 +31,9 @@
 // CHECK: ![[MODULE]] = !DIModule(scope: null, name: "DebugObjC
 
 // CHECK: ![[TD_ENUM:.*]] = !DICompositeType(tag: DW_TAG_enumeration_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
 // CHECK-SAME: elements:
+// CHECK-SAME: )
 
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type,
 // CHECK-SAME: name: "FwdDecl",
@@ -45,26 +46,30 @@
 // CHECK-SAME: elements:
 
 // CHECK: ![[TD_UNION:.*]] = !DICompositeType(tag: DW_TAG_union_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
 // CHECK-SAME: elements:
+// CHECK-SAME: )
 
 // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "TypedefUnion",
 // CHECK-SAME:   baseType: ![[TD_UNION]])
 
 // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "TypedefEnum",
 // CHECK-SAME:   baseType: ![[TD_ENUM:.*]])
 
 // CHECK: ![[TD_STRUCT:.*]] = !DICompositeType(tag: DW_TAG_structure_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
 // CHECK-SAME: elements:
+// CHECK-SAME: )
 // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "TypedefStruct",
 // CHECK-SAME:   baseType: ![[TD_STRUCT]])
 
 // CHECK: !DICompositeType(tag: DW_TAG_union_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
+// CHECK-SAME: )
 
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
+// CHECK-SAME: )
 
 // CHECK: !DISubprogram(name: "+[ObjCClass classMethod]",
 // CHECK-SAME:  scope: ![[MODULE]],
Index: cfe/trunk/test/Modules/ModuleDebugInfo.cpp
===
--- cfe/trunk/test/Modules/ModuleDebugInfo.cpp
+++ cfe/trunk/test/Modules/ModuleDebugInfo.cpp
@@ -20,25 +20,29 @@
 
 // CHECK: distinct !DICompileUnit(language: DW_LANG_{{.*}}C_plus_plus,
 // CHECK-SAME:isOptimized: false,
-// CHECK-SAME-NOT:splitDebugFilename:
-// CHECK: dwoId:
+// CHECK-NOT: splitDebugFilename:
+// CHECK-SAME:dwoId:
+// CHECK-SAME:)
 
 // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Enum"
 // CHECK-SAME: identifier: "_ZTSN8DebugCXX4EnumE")
 // CHECK: !DINamespace(name: "DebugCXX"
 
 // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
+// CHECK-SAME: )
 
 // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
+// CHECK-SAME: )
 
 // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
 // CHECK-SAME: identifier: "_ZTS11TypedefEnum")
 
 // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
+// CHECK-SAME: )
 // CHECK: !DIEnumerator(name: "e5", value: 5)
 
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "Struct"
@@ -61,11 +65,11 @@
 // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "_vptr$FwdVirtual"
 
 // CHECK: !DICompositeType(tag: DW_TAG_union_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
 // CHECK-SAME: identifier: "_ZTS12TypedefUnion")
 
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
 // CHECK-SAME: identifier: "_ZTS13TypedefStruct")
 
 // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "FloatInstatiation"
@@ -75,10 +79,12 @@
 // no mangled name here yet.
 
 // CHECK: !DICompositeType(tag: DW_TAG_union_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
+// CHECK-SAME: )
 
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type,
-// CHECK-SAME-NOT: name:
+// CHECK-NOT:  name:
+// CHECK-SAME: )
 
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type,
 // CHECK-SAME: