summaryrefslogtreecommitdiffstats
path: root/clang/include
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/AST/Attr.h13
-rw-r--r--clang/include/clang/Basic/DiagnosticKinds.def2
-rw-r--r--clang/include/clang/Parse/AttributeList.h3
3 files changed, 16 insertions, 2 deletions
diff --git a/clang/include/clang/AST/Attr.h b/clang/include/clang/AST/Attr.h
index 25172884604..0e5ae58efac 100644
--- a/clang/include/clang/AST/Attr.h
+++ b/clang/include/clang/AST/Attr.h
@@ -26,7 +26,8 @@ public:
Aligned,
Packed,
Annotate,
- NoReturn
+ NoReturn,
+ Deprecated
};
private:
@@ -107,6 +108,16 @@ public:
static bool classof(const NoReturnAttr *A) { return true; }
};
+class DeprecatedAttr : public Attr {
+public:
+ DeprecatedAttr() : Attr(Deprecated) {}
+
+ // Implement isa/cast/dyncast/etc.
+
+ static bool classof(const Attr *A) { return A->getKind() == Deprecated; }
+ static bool classof(const DeprecatedAttr *A) { return true; }
+};
+
} // end namespace clang
#endif
diff --git a/clang/include/clang/Basic/DiagnosticKinds.def b/clang/include/clang/Basic/DiagnosticKinds.def
index 21f348216da..3d0a3f8815f 100644
--- a/clang/include/clang/Basic/DiagnosticKinds.def
+++ b/clang/include/clang/Basic/DiagnosticKinds.def
@@ -617,6 +617,8 @@ DIAG(err_unexpected_typedef, ERROR,
"unexpected type name '%0': expected expression")
DIAG(err_undeclared_var_use, ERROR,
"use of undeclared identifier '%0'")
+DIAG(warn_deprecated, WARNING,
+ "'%0' is deprecated")
DIAG(err_redefinition, ERROR,
"redefinition of '%0'")
DIAG(err_static_non_static, ERROR,
diff --git a/clang/include/clang/Parse/AttributeList.h b/clang/include/clang/Parse/AttributeList.h
index a6a699ef8ba..6300b984b5b 100644
--- a/clang/include/clang/Parse/AttributeList.h
+++ b/clang/include/clang/Parse/AttributeList.h
@@ -49,7 +49,8 @@ public:
AT_aligned,
AT_packed,
AT_annotate,
- AT_noreturn
+ AT_noreturn,
+ AT_deprecated
};
IdentifierInfo *getName() const { return AttrName; }
OpenPOWER on IntegriCloud