]> granicus.if.org Git - clang/commitdiff
Make the test exercise all paths modified in r267746.
authorPaul Robinson <paul.robinson@sony.com>
Thu, 28 Apr 2016 17:52:28 +0000 (17:52 +0000)
committerPaul Robinson <paul.robinson@sony.com>
Thu, 28 Apr 2016 17:52:28 +0000 (17:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267909 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/debug-info-nodebug.cpp

index f4cab6390d478989163ae9054dc9c829593fc146..7a10e6708cc313242aafdfa6bd0a9769bddf5be6 100644 (file)
@@ -27,12 +27,18 @@ NODEBUG S1 global_struct = { 2, 3 };
 // NOINFO-NOT:  !DIGlobalVariable(name: "global_struct"
 
 // Static data members. Const member needs a use.
+// Also the class as a whole needs a use, so that we produce debug info for
+// the entire class (iterating over the members, demonstrably skipping those
+// with 'nodebug').
 struct S2 {
   NODEBUG static int static_member;
   NODEBUG static const int static_const_member = 4;
 };
 int S2::static_member = 5;
-void func3() { func1(S2::static_const_member); }
+void func3() {
+  S2 junk;
+  func1(S2::static_const_member);
+}
 // YESINFO-DAG: !DIGlobalVariable(name: "static_member"
 // NOINFO-NOT:  !DIGlobalVariable(name: "static_member"
 // YESINFO-DAG: !DIDerivedType({{.*}} name: "static_const_member"