Downgrade 'attribute ignored when parsing type' from error to warning, to match
the diagnostic's warn_ name. Switch some places (notably C++11 attributes)
which really wanted an error over to a different diagnostic. Finally, suppress
the diagnostic entirely for __ptr32, __ptr64 and __w64, to avoid producing
diagnostics in important system headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173788 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 20d8f71..e11fb91 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -1151,7 +1151,7 @@
AttributeList *AttrList = attrs.getList();
while (AttrList) {
if (AttrList->isCXX11Attribute()) {
- Diag(AttrList->getLoc(), diag::warn_attribute_no_decl)
+ Diag(AttrList->getLoc(), diag::err_attribute_not_type_attr)
<< AttrList->getName();
AttrList->setInvalid();
}
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index 4f0c893..5af3ea7 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/lib/Parse/ParseDeclCXX.cpp
@@ -439,8 +439,8 @@
/// unqualified-id
/// 'using' :: unqualified-id
///
-/// alias-declaration: C++0x [decl.typedef]p2
-/// 'using' identifier = type-id ;
+/// alias-declaration: C++11 [dcl.dcl]p1
+/// 'using' identifier attribute-specifier-seq[opt] = type-id ;
///
Decl *Parser::ParseUsingDeclaration(unsigned Context,
const ParsedTemplateInfo &TemplateInfo,
@@ -564,7 +564,7 @@
tok::semi);
// Diagnose an attempt to declare a templated using-declaration.
- // In C++0x, alias-declarations can be templates:
+ // In C++11, alias-declarations can be templates:
// template <...> using id = type;
if (TemplateInfo.Kind && !IsAliasDecl) {
SourceRange R = TemplateInfo.getSourceRange();