diff options
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Parse/Parser.cpp | 2 | ||||
-rw-r--r-- | clang/test/Parser/attributes.c | 12 |
3 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 60cb48f6760..32f7a7a85de 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -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); diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index a62d4c3d16a..54857164ef6 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -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(); } diff --git a/clang/test/Parser/attributes.c b/clang/test/Parser/attributes.c index 376ed2e7d2c..8d7e5fe503a 100644 --- a/clang/test/Parser/attributes.c +++ b/clang/test/Parser/attributes.c @@ -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; } |