summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index 2f92d3dbb2d..42cfd9afa01 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -4254,6 +4254,13 @@ static void handleDeprecatedAttr(Sema &S, Decl *D, const AttributeList &Attr) {
return;
}
}
+
+ if (!S.getLangOpts().CPlusPlus14)
+ if (Attr.isCXX11Attribute() &&
+ !(Attr.hasScope() && Attr.getScopeName()->isStr("gnu")))
+ S.Diag(Attr.getLoc(), diag::ext_use_of_attribute_is_a_cxx14_extension)
+ << Attr.getName()->getNameStart();
+
handleAttrWithMessage<DeprecatedAttr>(S, D, Attr);
}
OpenPOWER on IntegriCloud