summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-13 17:15:51 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-13 17:32:02 (GMT)
commit367e90c1ecd92adb0071b4ec1ddf684213805afc (patch)
tree831dbd5c22934af630cdd13b89beedfbfdf199c1 /src
parentae62b1a29c8233c3dd40fc3e293ddcdbe0bdcccc (diff)
downloadCastXML-367e90c1ecd92adb0071b4ec1ddf684213805afc.zip
CastXML-367e90c1ecd92adb0071b4ec1ddf684213805afc.tar.gz
CastXML-367e90c1ecd92adb0071b4ec1ddf684213805afc.tar.bz2
Output: Add deprecated attribute
Fixes: #92
Diffstat (limited to 'src')
-rw-r--r--src/Output.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Output.cxx b/src/Output.cxx
index 1e72abb..e67fcd3 100644
--- a/src/Output.cxx
+++ b/src/Output.cxx
@@ -1448,6 +1448,10 @@ void ASTVisitor::GetDeclAttributes(clang::Decl const* d,
attrs.push_back("annotate(" + a->getAnnotation().str() + ")");
}
+ if (d->hasAttr<clang::DeprecatedAttr>()) {
+ attrs.push_back("deprecated");
+ }
+
if (d->hasAttr<clang::DLLExportAttr>()) {
attrs.push_back("dllexport");
}
@@ -2188,14 +2192,14 @@ void ASTVisitor::OutputStartXMLTags()
// Start dump with castxml-compatible format.
/* clang-format off */
this->OS <<
- "<CastXML format=\"" << Opts.CastXmlEpicFormatVersion << ".1.3\">\n"
+ "<CastXML format=\"" << Opts.CastXmlEpicFormatVersion << ".1.4\">\n"
;
/* clang-format on */
} else if (this->Opts.GccXml) {
// Start dump with gccxml-compatible format (legacy).
/* clang-format off */
this->OS <<
- "<GCC_XML version=\"0.9.0\" cvs_revision=\"1.143\">\n"
+ "<GCC_XML version=\"0.9.0\" cvs_revision=\"1.144\">\n"
;
/* clang-format on */
}