Add test for -Wused-but-marked-unused on private fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159130 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/warn-unused-member.cpp b/test/SemaCXX/warn-unused-member.cpp
index 9ec9df6..cabc9b6 100644
--- a/test/SemaCXX/warn-unused-member.cpp
+++ b/test/SemaCXX/warn-unused-member.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -Wunused-private-field -verify -std=c++11 %s
+// RUN: %clang_cc1 -fsyntax-only -Wunused-private-field -Wused-but-marked-unused -verify -std=c++11 %s
 
 class NotFullyDefined {
  public:
@@ -93,6 +93,7 @@
         trivial_(), user_constructor_(42),
         initialized_with_side_effect_(side_effect()) {
     used_ = 42;
+    attr_used_ = 42; // expected-warning{{'attr_used_' was marked unused but was used}}
   }
 
   A(int x, A* a) : pointer_(a) {}
@@ -116,7 +117,8 @@
   NonTrivialConstructor non_trivial_constructor_;
   NonTrivialDestructor non_trivial_destructor_;
 
-  int attr_  __attribute__((unused));
+  int attr_ __attribute__((unused));
+  int attr_used_ __attribute__((unused));
 };
 
 class EverythingUsed {