]> granicus.if.org Git - clang/commitdiff
Using the quoted version of an attribute name for consistency with other attribute...
authorAaron Ballman <aaron@aaronballman.com>
Thu, 2 Jan 2014 18:10:17 +0000 (18:10 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Thu, 2 Jan 2014 18:10:17 +0000 (18:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198326 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/ParseDecl.cpp
lib/Parse/Parser.cpp
test/Parser/attributes.c

index 60cb48f6760600f633fe05624f3563519b438532..32f7a7a85de3d9c0f7d9bea8d8838406fa4281d5 100644 (file)
@@ -1123,7 +1123,7 @@ void Parser::ParseLexedAttribute(LateParsedAttribute &LA,
     // FIXME: Do not warn on C++11 attributes, once we start supporting
     // them here.
     Diag(Tok, diag::warn_attribute_on_function_definition)
-      << LA.AttrName.getName();
+      << &LA.AttrName;
   }
 
   ParsedAttributes Attrs(AttrFactory);
index a62d4c3d16a40fd21951f102be94b9228a6e3bd2..54857164ef660c5d7cff91ed42df000bd5b2aad6 100644 (file)
@@ -1053,7 +1053,7 @@ Decl *Parser::ParseFunctionDefinition(ParsingDeclarator &D,
       if (!IsThreadSafetyAttribute(DtorAttrs->getName()->getName()) &&
           !DtorAttrs->isCXX11Attribute()) {
         Diag(DtorAttrs->getLoc(), diag::warn_attribute_on_function_definition)
-          << DtorAttrs->getName()->getName();
+          << DtorAttrs->getName();
       }
       DtorAttrs = DtorAttrs->getNext();
     }
index 376ed2e7d2c9c5af2937bd6e61300c7a2b36c55a..8d7e5fe503ad70480c10bbc34077597d0b14faf0 100644 (file)
@@ -65,27 +65,27 @@ int __attribute__((format(printf, 0 aligned(16) )) missing_rparen_3; // expected
 
 
 int testFundef1(int *a) __attribute__((nonnull(1))) { // \
-    // expected-warning {{GCC does not allow nonnull attribute in this position on a function definition}}
+    // expected-warning {{GCC does not allow 'nonnull' attribute in this position on a function definition}}
   return *a;
 }
 
 // noreturn is lifted to type qualifier
 void testFundef2() __attribute__((noreturn)) { // \
-    // expected-warning {{GCC does not allow noreturn attribute in this position on a function definition}}
+    // expected-warning {{GCC does not allow 'noreturn' attribute in this position on a function definition}}
   testFundef2();
 }
 
 int testFundef3(int *a) __attribute__((nonnull(1), // \
-    // expected-warning {{GCC does not allow nonnull attribute in this position on a function definition}}
+    // expected-warning {{GCC does not allow 'nonnull' attribute in this position on a function definition}}
                                      pure)) { // \
-    // expected-warning {{GCC does not allow pure attribute in this position on a function definition}}
+    // expected-warning {{GCC does not allow 'pure' attribute in this position on a function definition}}
   return *a;
 }
 
 int testFundef4(int *a) __attribute__((nonnull(1))) // \
-    // expected-warning {{GCC does not allow nonnull attribute in this position on a function definition}}
+    // expected-warning {{GCC does not allow 'nonnull' attribute in this position on a function definition}}
                       __attribute((pure)) { // \
-    // expected-warning {{GCC does not allow pure attribute in this position on a function definition}}
+    // expected-warning {{GCC does not allow 'pure' attribute in this position on a function definition}}
   return *a;
 }