From: Paul Robinson Date: Thu, 28 Apr 2016 17:52:28 +0000 (+0000) Subject: Make the test exercise all paths modified in r267746. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2988dcc7837f3bea6187c641625a1a12c047a6ce;p=clang Make the test exercise all paths modified in r267746. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267909 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGenCXX/debug-info-nodebug.cpp b/test/CodeGenCXX/debug-info-nodebug.cpp index f4cab6390d..7a10e6708c 100644 --- a/test/CodeGenCXX/debug-info-nodebug.cpp +++ b/test/CodeGenCXX/debug-info-nodebug.cpp @@ -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"