]> granicus.if.org Git - clang/commitdiff
Removing some more unnecessary manual quotes from attribute diagnostics. Updated...
authorAaron Ballman <aaron@aaronballman.com>
Thu, 2 Jan 2014 23:15:58 +0000 (23:15 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Thu, 2 Jan 2014 23:15:58 +0000 (23:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198372 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDeclAttr.cpp
test/SemaCXX/warn-thread-safety-parsing.cpp

index ae084fddd6b32d0b1a536f3a6e03dcc851dec73c..7ad21d614606dac9e9ee48ea44c2cd6404648103 100644 (file)
@@ -2115,11 +2115,11 @@ def warn_thread_attribute_ignored : Warning<
   InGroup<ThreadSafetyAttributes>, DefaultIgnore;
 def warn_thread_attribute_argument_not_lockable : Warning<
   "%0 attribute requires arguments whose type is annotated "
-  "with 'lockable' attribute; type here is '%1'">,
+  "with 'lockable' attribute; type here is %1">,
   InGroup<ThreadSafetyAttributes>, DefaultIgnore;
 def warn_thread_attribute_argument_not_class : Warning<
   "%0 attribute requires arguments that are class type or point to"
-  " class type; type here is '%1'">,
+  " class type; type here is %1">,
   InGroup<ThreadSafetyAttributes>, DefaultIgnore;  
 def warn_thread_attribute_decl_not_lockable : Warning<
   "%0 attribute can only be applied in a context annotated "
index 083a66e255911ed4a73dc7074cec62d3b193423f..ff91346240256e8b2effe137da7c9276c3b5eace 100644 (file)
@@ -430,7 +430,7 @@ static void checkForLockableRecord(Sema &S, Decl *D, const AttributeList &Attr,
   // Warn if could not get record type for this argument.
   if (!RT) {
     S.Diag(Attr.getLoc(), diag::warn_thread_attribute_argument_not_class)
-      << Attr.getName() << Ty.getAsString();
+      << Attr.getName() << Ty;
     return;
   }
 
@@ -456,7 +456,7 @@ static void checkForLockableRecord(Sema &S, Decl *D, const AttributeList &Attr,
   }
 
   S.Diag(Attr.getLoc(), diag::warn_thread_attribute_argument_not_lockable)
-    << Attr.getName() << Ty.getAsString();
+    << Attr.getName() << Ty;
 }
 
 /// \brief Thread Safety Analysis: Checks that all attribute arguments, starting
index c221f1b35365e42251b3db0996ab38da9c296b51..f672d690b00deca89269ae2afa60a8bc52fca041 100644 (file)
@@ -357,9 +357,9 @@ int gb_var_arg_bad_1 GUARDED_BY(1); // \
 int gb_var_arg_bad_2 GUARDED_BY("mu"); // \
   // expected-warning {{ignoring 'guarded_by' attribute because its argument is invalid}}
 int gb_var_arg_bad_3 GUARDED_BY(muDoublePointer); // \
-  // expected-warning {{'guarded_by' attribute requires arguments that are class type or point to class type; type here is 'class Mutex **'}}
+  // expected-warning {{'guarded_by' attribute requires arguments that are class type or point to class type; type here is 'Mutex **'}}
 int gb_var_arg_bad_4 GUARDED_BY(umu); // \
-  // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'lockable' attribute; type here is 'class UnlockableMu'}}
+  // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'lockable' attribute; type here is 'UnlockableMu'}}
 
 //3.
 // Thread Safety analysis tests
@@ -1430,7 +1430,7 @@ class Foo {
   int a GUARDED_BY(mu1_);
   int b GUARDED_BY(mu2_);
   int c GUARDED_BY(mu3_);  // \
-    // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'lockable' attribute; type here is 'class InheritanceTest::Derived3'}}
+    // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'lockable' attribute; type here is 'InheritanceTest::Derived3'}}
 
   void foo() EXCLUSIVE_LOCKS_REQUIRED(mu1_, mu2_) {
     a = 0;