forked from OSchip/llvm-project
Sema: partially address post-commit comments
Un-parameterize the warning as there is exactly one attribute added in C++14. Partially addresses post-commit review comments from Richard Smith. llvm-svn: 229636
This commit is contained in:
parent
6d86bb2f8b
commit
b47d606e17
|
@ -7233,8 +7233,8 @@ def err_asm_naked_this_ref : Error<
|
|||
def err_asm_naked_parm_ref : Error<
|
||||
"parameter references not allowed in naked functions">;
|
||||
|
||||
def ext_use_of_attribute_is_a_cxx14_extension : ExtWarn<
|
||||
"use of the %0 attribute is a C++14 extension">, InGroup<CXX14>;
|
||||
def ext_deprecated_attr_is_a_cxx14_extension : ExtWarn<
|
||||
"use of the 'deprecated' attribute is a C++14 extension">, InGroup<CXX14>;
|
||||
|
||||
// OpenCL warnings and errors.
|
||||
def err_invalid_astype_of_different_size : Error<
|
||||
|
|
|
@ -4258,8 +4258,7 @@ static void handleDeprecatedAttr(Sema &S, Decl *D, const AttributeList &Attr) {
|
|||
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();
|
||||
S.Diag(Attr.getLoc(), diag::ext_deprecated_attr_is_a_cxx14_extension);
|
||||
|
||||
handleAttrWithMessage<DeprecatedAttr>(S, D, Attr);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue