From 367e90c1ecd92adb0071b4ec1ddf684213805afc Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 13 Oct 2017 13:15:51 -0400 Subject: Output: Add deprecated attribute Fixes: #92 --- src/Output.cxx | 8 +++++-- test/CMakeLists.txt | 14 ++++++++++++ test/expect/castxml1.any.Class-deprecated.xml.txt | 17 ++++++++++++++ .../castxml1.any.Constructor-deprecated.xml.txt | 17 ++++++++++++++ .../castxml1.any.Converter-deprecated.xml.txt | 19 ++++++++++++++++ .../castxml1.any.Destructor-deprecated.xml.txt | 17 ++++++++++++++ .../castxml1.any.Enumeration-deprecated.xml.txt | 8 +++++++ test/expect/castxml1.any.Field-deprecated.xml.txt | 19 ++++++++++++++++ ...stxml1.any.Function-Argument-deprecated.xml.txt | 10 +++++++++ ...nction-calling-convention-ms-deprecated.xml.txt | 26 ++++++++++++++++++++++ .../castxml1.any.Function-deprecated.xml.txt | 10 +++++++++ test/expect/castxml1.any.Method-deprecated.xml.txt | 21 +++++++++++++++++ ...astxml1.any.OperatorFunction-deprecated.xml.txt | 13 +++++++++++ .../castxml1.any.OperatorMethod-deprecated.xml.txt | 21 +++++++++++++++++ .../expect/castxml1.any.Typedef-deprecated.xml.txt | 7 ++++++ .../castxml1.any.Variable-deprecated.xml.txt | 7 ++++++ test/expect/gccxml.any.Class-deprecated.xml.txt | 17 ++++++++++++++ .../gccxml.any.Constructor-deprecated.xml.txt | 17 ++++++++++++++ .../expect/gccxml.any.Converter-deprecated.xml.txt | 19 ++++++++++++++++ .../gccxml.any.Destructor-deprecated.xml.txt | 17 ++++++++++++++ .../gccxml.any.Enumeration-deprecated.xml.txt | 8 +++++++ test/expect/gccxml.any.Field-deprecated.xml.txt | 19 ++++++++++++++++ ...gccxml.any.Function-Argument-deprecated.xml.txt | 10 +++++++++ ...nction-calling-convention-ms-deprecated.xml.txt | 26 ++++++++++++++++++++++ test/expect/gccxml.any.Function-deprecated.xml.txt | 10 +++++++++ test/expect/gccxml.any.Method-deprecated.xml.txt | 21 +++++++++++++++++ .../gccxml.any.OperatorFunction-deprecated.xml.txt | 13 +++++++++++ .../gccxml.any.OperatorMethod-deprecated.xml.txt | 21 +++++++++++++++++ test/expect/gccxml.any.Typedef-deprecated.xml.txt | 7 ++++++ test/expect/gccxml.any.Variable-deprecated.xml.txt | 7 ++++++ test/input/Class-deprecated.cxx | 3 +++ test/input/Constructor-deprecated.cxx | 4 ++++ test/input/Converter-deprecated.cxx | 4 ++++ test/input/Destructor-deprecated.cxx | 4 ++++ test/input/Enumeration-deprecated.cxx | 4 ++++ test/input/Field-deprecated.cxx | 4 ++++ test/input/Function-Argument-deprecated.cxx | 1 + .../Function-calling-convention-ms-deprecated.cxx | 4 ++++ test/input/Function-deprecated.cxx | 1 + test/input/Method-deprecated.cxx | 4 ++++ test/input/OperatorFunction-deprecated.cxx | 4 ++++ test/input/OperatorMethod-deprecated.cxx | 4 ++++ test/input/Typedef-deprecated.cxx | 1 + test/input/Variable-deprecated.cxx | 1 + 44 files changed, 487 insertions(+), 2 deletions(-) create mode 100644 test/expect/castxml1.any.Class-deprecated.xml.txt create mode 100644 test/expect/castxml1.any.Constructor-deprecated.xml.txt create mode 100644 test/expect/castxml1.any.Converter-deprecated.xml.txt create mode 100644 test/expect/castxml1.any.Destructor-deprecated.xml.txt create mode 100644 test/expect/castxml1.any.Enumeration-deprecated.xml.txt create mode 100644 test/expect/castxml1.any.Field-deprecated.xml.txt create mode 100644 test/expect/castxml1.any.Function-Argument-deprecated.xml.txt create mode 100644 test/expect/castxml1.any.Function-calling-convention-ms-deprecated.xml.txt create mode 100644 test/expect/castxml1.any.Function-deprecated.xml.txt create mode 100644 test/expect/castxml1.any.Method-deprecated.xml.txt create mode 100644 test/expect/castxml1.any.OperatorFunction-deprecated.xml.txt create mode 100644 test/expect/castxml1.any.OperatorMethod-deprecated.xml.txt create mode 100644 test/expect/castxml1.any.Typedef-deprecated.xml.txt create mode 100644 test/expect/castxml1.any.Variable-deprecated.xml.txt create mode 100644 test/expect/gccxml.any.Class-deprecated.xml.txt create mode 100644 test/expect/gccxml.any.Constructor-deprecated.xml.txt create mode 100644 test/expect/gccxml.any.Converter-deprecated.xml.txt create mode 100644 test/expect/gccxml.any.Destructor-deprecated.xml.txt create mode 100644 test/expect/gccxml.any.Enumeration-deprecated.xml.txt create mode 100644 test/expect/gccxml.any.Field-deprecated.xml.txt create mode 100644 test/expect/gccxml.any.Function-Argument-deprecated.xml.txt create mode 100644 test/expect/gccxml.any.Function-calling-convention-ms-deprecated.xml.txt create mode 100644 test/expect/gccxml.any.Function-deprecated.xml.txt create mode 100644 test/expect/gccxml.any.Method-deprecated.xml.txt create mode 100644 test/expect/gccxml.any.OperatorFunction-deprecated.xml.txt create mode 100644 test/expect/gccxml.any.OperatorMethod-deprecated.xml.txt create mode 100644 test/expect/gccxml.any.Typedef-deprecated.xml.txt create mode 100644 test/expect/gccxml.any.Variable-deprecated.xml.txt create mode 100644 test/input/Class-deprecated.cxx create mode 100644 test/input/Constructor-deprecated.cxx create mode 100644 test/input/Converter-deprecated.cxx create mode 100644 test/input/Destructor-deprecated.cxx create mode 100644 test/input/Enumeration-deprecated.cxx create mode 100644 test/input/Field-deprecated.cxx create mode 100644 test/input/Function-Argument-deprecated.cxx create mode 100644 test/input/Function-calling-convention-ms-deprecated.cxx create mode 100644 test/input/Function-deprecated.cxx create mode 100644 test/input/Method-deprecated.cxx create mode 100644 test/input/OperatorFunction-deprecated.cxx create mode 100644 test/input/OperatorMethod-deprecated.cxx create mode 100644 test/input/Typedef-deprecated.cxx create mode 100644 test/input/Variable-deprecated.cxx 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()) { + attrs.push_back("deprecated"); + } + if (d->hasAttr()) { attrs.push_back("dllexport"); } @@ -2188,14 +2192,14 @@ void ASTVisitor::OutputStartXMLTags() // Start dump with castxml-compatible format. /* clang-format off */ this->OS << - "\n" + "\n" ; /* clang-format on */ } else if (this->Opts.GccXml) { // Start dump with gccxml-compatible format (legacy). /* clang-format off */ this->OS << - "\n" + "\n" ; /* clang-format on */ } diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5e61282..e0fbc09 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -346,6 +346,7 @@ castxml_test_output(ArrayType-incomplete) castxml_test_output(Class) castxml_test_output(Class-abstract) castxml_test_output(Class-annotate) +castxml_test_output(Class-deprecated) castxml_test_output(Class-base-offset) castxml_test_output(Class-base-typedef) castxml_test_output(Class-bases) @@ -380,22 +381,29 @@ castxml_test_output(Class-template-member-template) castxml_test_output(Class-template-recurse) castxml_test_output(Constructor) castxml_test_output(Constructor-annotate) +castxml_test_output(Constructor-deprecated) castxml_test_output(Converter) castxml_test_output(Converter-annotate) +castxml_test_output(Converter-deprecated) castxml_test_output(CvQualifiedType) castxml_test_output(CXXLiteral) castxml_test_output(Destructor) castxml_test_output(Destructor-annotate) +castxml_test_output(Destructor-deprecated) castxml_test_output(Elaborated) castxml_test_output(Enumeration) castxml_test_output(Enumeration-annotate) +castxml_test_output(Enumeration-deprecated) castxml_test_output(Enumeration-anonymous) castxml_test_output(Field) castxml_test_output(Field-annotate) +castxml_test_output(Field-deprecated) castxml_test_output(Function) castxml_test_output_14(Function-auto) castxml_test_output(Function-annotate) +castxml_test_output(Function-deprecated) castxml_test_output(Function-Argument-annotate) +castxml_test_output(Function-Argument-deprecated) castxml_test_output(Function-Argument-decay) castxml_test_output(Function-Argument-default) castxml_test_output(Function-Argument-default-cast) @@ -411,6 +419,7 @@ castxml_test_output(FundamentalType) castxml_test_output(FundamentalTypes) castxml_test_output(Method) castxml_test_output(Method-annotate) +castxml_test_output(Method-deprecated) castxml_test_output(Method-Argument-default) castxml_test_output(Method-Argument-default-cast) castxml_test_output(Method-overrides) @@ -435,14 +444,17 @@ castxml_test_output(OffsetType) castxml_test_output(OffsetType-cv) castxml_test_output(OperatorFunction) castxml_test_output(OperatorFunction-annotate) +castxml_test_output(OperatorFunction-deprecated) castxml_test_output(OperatorMethod) castxml_test_output(OperatorMethod-annotate) +castxml_test_output(OperatorMethod-deprecated) castxml_test_output(PointerType) castxml_test_output(ReferenceType) castxml_test_output(RValueReferenceType) castxml_test_output(TypeAlias) castxml_test_output(TypeAliasTemplate) castxml_test_output(Typedef-annotate) +castxml_test_output(Typedef-deprecated) castxml_test_output(Typedef-paren) castxml_test_output(Typedef-to-Class-template) castxml_test_output(Typedef-to-Enumeration) @@ -453,6 +465,7 @@ castxml_test_output(Typedef-to-Struct-anonymous) castxml_test_output(Typedef-to-Union-anonymous) castxml_test_output(Variable) castxml_test_output(Variable-annotate) +castxml_test_output(Variable-deprecated) castxml_test_output(Variable-in-Class) castxml_test_output(Variable-init) castxml_test_output(Variable-init-cast) @@ -502,6 +515,7 @@ if(";${LLVM_TARGETS_TO_BUILD};" MATCHES ";X86;") castxml_test_output(Variable-ms-dllimport) castxml_test_output(Function-calling-convention-ms) castxml_test_output(Function-calling-convention-ms-annotate) + castxml_test_output(Function-calling-convention-ms-deprecated) castxml_test_output(Function-calling-convention-ms-dllexport) castxml_test_output(Function-calling-convention-ms-dllimport) castxml_test_output(implicit-decl-ms) diff --git a/test/expect/castxml1.any.Class-deprecated.xml.txt b/test/expect/castxml1.any.Class-deprecated.xml.txt new file mode 100644 index 0000000..d7234bb --- /dev/null +++ b/test/expect/castxml1.any.Class-deprecated.xml.txt @@ -0,0 +1,17 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + + + + + +$ diff --git a/test/expect/castxml1.any.Constructor-deprecated.xml.txt b/test/expect/castxml1.any.Constructor-deprecated.xml.txt new file mode 100644 index 0000000..43bc72d --- /dev/null +++ b/test/expect/castxml1.any.Constructor-deprecated.xml.txt @@ -0,0 +1,17 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + + + + + +$ diff --git a/test/expect/castxml1.any.Converter-deprecated.xml.txt b/test/expect/castxml1.any.Converter-deprecated.xml.txt new file mode 100644 index 0000000..498508a --- /dev/null +++ b/test/expect/castxml1.any.Converter-deprecated.xml.txt @@ -0,0 +1,19 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + + + + + + + +$ diff --git a/test/expect/castxml1.any.Destructor-deprecated.xml.txt b/test/expect/castxml1.any.Destructor-deprecated.xml.txt new file mode 100644 index 0000000..8170cd2 --- /dev/null +++ b/test/expect/castxml1.any.Destructor-deprecated.xml.txt @@ -0,0 +1,17 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + + + + + +$ diff --git a/test/expect/castxml1.any.Enumeration-deprecated.xml.txt b/test/expect/castxml1.any.Enumeration-deprecated.xml.txt new file mode 100644 index 0000000..37097af --- /dev/null +++ b/test/expect/castxml1.any.Enumeration-deprecated.xml.txt @@ -0,0 +1,8 @@ +^<\?xml version="1.0"\?> +]*> + + + + + +$ diff --git a/test/expect/castxml1.any.Field-deprecated.xml.txt b/test/expect/castxml1.any.Field-deprecated.xml.txt new file mode 100644 index 0000000..8aec90d --- /dev/null +++ b/test/expect/castxml1.any.Field-deprecated.xml.txt @@ -0,0 +1,19 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + + + + + + + +$ diff --git a/test/expect/castxml1.any.Function-Argument-deprecated.xml.txt b/test/expect/castxml1.any.Function-Argument-deprecated.xml.txt new file mode 100644 index 0000000..f475211 --- /dev/null +++ b/test/expect/castxml1.any.Function-Argument-deprecated.xml.txt @@ -0,0 +1,10 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + +$ diff --git a/test/expect/castxml1.any.Function-calling-convention-ms-deprecated.xml.txt b/test/expect/castxml1.any.Function-calling-convention-ms-deprecated.xml.txt new file mode 100644 index 0000000..8ea5cf1 --- /dev/null +++ b/test/expect/castxml1.any.Function-calling-convention-ms-deprecated.xml.txt @@ -0,0 +1,26 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + + + + + + + + + + + + + + +$ diff --git a/test/expect/castxml1.any.Function-deprecated.xml.txt b/test/expect/castxml1.any.Function-deprecated.xml.txt new file mode 100644 index 0000000..402fe34 --- /dev/null +++ b/test/expect/castxml1.any.Function-deprecated.xml.txt @@ -0,0 +1,10 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + +$ diff --git a/test/expect/castxml1.any.Method-deprecated.xml.txt b/test/expect/castxml1.any.Method-deprecated.xml.txt new file mode 100644 index 0000000..cb7400c --- /dev/null +++ b/test/expect/castxml1.any.Method-deprecated.xml.txt @@ -0,0 +1,21 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + + + + + + + + + +$ diff --git a/test/expect/castxml1.any.OperatorFunction-deprecated.xml.txt b/test/expect/castxml1.any.OperatorFunction-deprecated.xml.txt new file mode 100644 index 0000000..66e4a8f --- /dev/null +++ b/test/expect/castxml1.any.OperatorFunction-deprecated.xml.txt @@ -0,0 +1,13 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + +$ diff --git a/test/expect/castxml1.any.OperatorMethod-deprecated.xml.txt b/test/expect/castxml1.any.OperatorMethod-deprecated.xml.txt new file mode 100644 index 0000000..efcc947 --- /dev/null +++ b/test/expect/castxml1.any.OperatorMethod-deprecated.xml.txt @@ -0,0 +1,21 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + + + + + + + + + +$ diff --git a/test/expect/castxml1.any.Typedef-deprecated.xml.txt b/test/expect/castxml1.any.Typedef-deprecated.xml.txt new file mode 100644 index 0000000..a9e2ec2 --- /dev/null +++ b/test/expect/castxml1.any.Typedef-deprecated.xml.txt @@ -0,0 +1,7 @@ +^<\?xml version="1.0"\?> +]*> + + + + +$ diff --git a/test/expect/castxml1.any.Variable-deprecated.xml.txt b/test/expect/castxml1.any.Variable-deprecated.xml.txt new file mode 100644 index 0000000..bb61ecd --- /dev/null +++ b/test/expect/castxml1.any.Variable-deprecated.xml.txt @@ -0,0 +1,7 @@ +^<\?xml version="1.0"\?> +]*> + + + + +$ diff --git a/test/expect/gccxml.any.Class-deprecated.xml.txt b/test/expect/gccxml.any.Class-deprecated.xml.txt new file mode 100644 index 0000000..aad5ed6 --- /dev/null +++ b/test/expect/gccxml.any.Class-deprecated.xml.txt @@ -0,0 +1,17 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + + + + + +$ diff --git a/test/expect/gccxml.any.Constructor-deprecated.xml.txt b/test/expect/gccxml.any.Constructor-deprecated.xml.txt new file mode 100644 index 0000000..c3b9d85 --- /dev/null +++ b/test/expect/gccxml.any.Constructor-deprecated.xml.txt @@ -0,0 +1,17 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + + + + + +$ diff --git a/test/expect/gccxml.any.Converter-deprecated.xml.txt b/test/expect/gccxml.any.Converter-deprecated.xml.txt new file mode 100644 index 0000000..0cdb388 --- /dev/null +++ b/test/expect/gccxml.any.Converter-deprecated.xml.txt @@ -0,0 +1,19 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + + + + + + + +$ diff --git a/test/expect/gccxml.any.Destructor-deprecated.xml.txt b/test/expect/gccxml.any.Destructor-deprecated.xml.txt new file mode 100644 index 0000000..22760be --- /dev/null +++ b/test/expect/gccxml.any.Destructor-deprecated.xml.txt @@ -0,0 +1,17 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + + + + + +$ diff --git a/test/expect/gccxml.any.Enumeration-deprecated.xml.txt b/test/expect/gccxml.any.Enumeration-deprecated.xml.txt new file mode 100644 index 0000000..fff0930 --- /dev/null +++ b/test/expect/gccxml.any.Enumeration-deprecated.xml.txt @@ -0,0 +1,8 @@ +^<\?xml version="1.0"\?> +]*> + + + + + +$ diff --git a/test/expect/gccxml.any.Field-deprecated.xml.txt b/test/expect/gccxml.any.Field-deprecated.xml.txt new file mode 100644 index 0000000..bc7bb93 --- /dev/null +++ b/test/expect/gccxml.any.Field-deprecated.xml.txt @@ -0,0 +1,19 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + + + + + + + +$ diff --git a/test/expect/gccxml.any.Function-Argument-deprecated.xml.txt b/test/expect/gccxml.any.Function-Argument-deprecated.xml.txt new file mode 100644 index 0000000..6d4b8e5 --- /dev/null +++ b/test/expect/gccxml.any.Function-Argument-deprecated.xml.txt @@ -0,0 +1,10 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + +$ diff --git a/test/expect/gccxml.any.Function-calling-convention-ms-deprecated.xml.txt b/test/expect/gccxml.any.Function-calling-convention-ms-deprecated.xml.txt new file mode 100644 index 0000000..345efc2 --- /dev/null +++ b/test/expect/gccxml.any.Function-calling-convention-ms-deprecated.xml.txt @@ -0,0 +1,26 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + + + + + + + + + + + + + + +$ diff --git a/test/expect/gccxml.any.Function-deprecated.xml.txt b/test/expect/gccxml.any.Function-deprecated.xml.txt new file mode 100644 index 0000000..a8a0426 --- /dev/null +++ b/test/expect/gccxml.any.Function-deprecated.xml.txt @@ -0,0 +1,10 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + +$ diff --git a/test/expect/gccxml.any.Method-deprecated.xml.txt b/test/expect/gccxml.any.Method-deprecated.xml.txt new file mode 100644 index 0000000..8665824 --- /dev/null +++ b/test/expect/gccxml.any.Method-deprecated.xml.txt @@ -0,0 +1,21 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + + + + + + + + + +$ diff --git a/test/expect/gccxml.any.OperatorFunction-deprecated.xml.txt b/test/expect/gccxml.any.OperatorFunction-deprecated.xml.txt new file mode 100644 index 0000000..c410d69 --- /dev/null +++ b/test/expect/gccxml.any.OperatorFunction-deprecated.xml.txt @@ -0,0 +1,13 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + +$ diff --git a/test/expect/gccxml.any.OperatorMethod-deprecated.xml.txt b/test/expect/gccxml.any.OperatorMethod-deprecated.xml.txt new file mode 100644 index 0000000..5a4b10f --- /dev/null +++ b/test/expect/gccxml.any.OperatorMethod-deprecated.xml.txt @@ -0,0 +1,21 @@ +^<\?xml version="1.0"\?> +]*> + + + + + + + + + + + + + + + + + + +$ diff --git a/test/expect/gccxml.any.Typedef-deprecated.xml.txt b/test/expect/gccxml.any.Typedef-deprecated.xml.txt new file mode 100644 index 0000000..48e0f19 --- /dev/null +++ b/test/expect/gccxml.any.Typedef-deprecated.xml.txt @@ -0,0 +1,7 @@ +^<\?xml version="1.0"\?> +]*> + + + + +$ diff --git a/test/expect/gccxml.any.Variable-deprecated.xml.txt b/test/expect/gccxml.any.Variable-deprecated.xml.txt new file mode 100644 index 0000000..a23f9cd --- /dev/null +++ b/test/expect/gccxml.any.Variable-deprecated.xml.txt @@ -0,0 +1,7 @@ +^<\?xml version="1.0"\?> +]*> + + + + +$ diff --git a/test/input/Class-deprecated.cxx b/test/input/Class-deprecated.cxx new file mode 100644 index 0000000..d914b8d --- /dev/null +++ b/test/input/Class-deprecated.cxx @@ -0,0 +1,3 @@ +class __attribute__((deprecated)) start +{ +}; diff --git a/test/input/Constructor-deprecated.cxx b/test/input/Constructor-deprecated.cxx new file mode 100644 index 0000000..70cbe0f --- /dev/null +++ b/test/input/Constructor-deprecated.cxx @@ -0,0 +1,4 @@ +class start +{ + __attribute__((deprecated)) start(); +}; diff --git a/test/input/Converter-deprecated.cxx b/test/input/Converter-deprecated.cxx new file mode 100644 index 0000000..e580e92 --- /dev/null +++ b/test/input/Converter-deprecated.cxx @@ -0,0 +1,4 @@ +class start +{ + __attribute__((deprecated)) operator int(); +}; diff --git a/test/input/Destructor-deprecated.cxx b/test/input/Destructor-deprecated.cxx new file mode 100644 index 0000000..620268a --- /dev/null +++ b/test/input/Destructor-deprecated.cxx @@ -0,0 +1,4 @@ +class start +{ + __attribute__((deprecated)) ~start(); +}; diff --git a/test/input/Enumeration-deprecated.cxx b/test/input/Enumeration-deprecated.cxx new file mode 100644 index 0000000..6a3d9c4 --- /dev/null +++ b/test/input/Enumeration-deprecated.cxx @@ -0,0 +1,4 @@ +enum __attribute__((deprecated)) start +{ + ev0 __attribute__((deprecated)) +}; diff --git a/test/input/Field-deprecated.cxx b/test/input/Field-deprecated.cxx new file mode 100644 index 0000000..7c12e8f --- /dev/null +++ b/test/input/Field-deprecated.cxx @@ -0,0 +1,4 @@ +class start +{ + __attribute__((deprecated)) int field; +}; diff --git a/test/input/Function-Argument-deprecated.cxx b/test/input/Function-Argument-deprecated.cxx new file mode 100644 index 0000000..994cc9a --- /dev/null +++ b/test/input/Function-Argument-deprecated.cxx @@ -0,0 +1 @@ +void start(__attribute__((deprecated)) int); diff --git a/test/input/Function-calling-convention-ms-deprecated.cxx b/test/input/Function-calling-convention-ms-deprecated.cxx new file mode 100644 index 0000000..3877478 --- /dev/null +++ b/test/input/Function-calling-convention-ms-deprecated.cxx @@ -0,0 +1,4 @@ +__attribute__((deprecated)) void __cdecl start(void(__cdecl*)()); +__attribute__((deprecated)) void __stdcall start(void(__stdcall*)()); +__attribute__((deprecated)) void __fastcall start(void(__fastcall*)()); +__attribute__((deprecated)) void __thiscall start(void(__thiscall*)()); diff --git a/test/input/Function-deprecated.cxx b/test/input/Function-deprecated.cxx new file mode 100644 index 0000000..c36a86e --- /dev/null +++ b/test/input/Function-deprecated.cxx @@ -0,0 +1 @@ +__attribute__((deprecated)) void start(int); diff --git a/test/input/Method-deprecated.cxx b/test/input/Method-deprecated.cxx new file mode 100644 index 0000000..356a45f --- /dev/null +++ b/test/input/Method-deprecated.cxx @@ -0,0 +1,4 @@ +class start +{ + __attribute__((deprecated)) int method(int); +}; diff --git a/test/input/OperatorFunction-deprecated.cxx b/test/input/OperatorFunction-deprecated.cxx new file mode 100644 index 0000000..3f203db --- /dev/null +++ b/test/input/OperatorFunction-deprecated.cxx @@ -0,0 +1,4 @@ +class A; +namespace start { +__attribute__((deprecated)) A& operator<<(A&, int); +} diff --git a/test/input/OperatorMethod-deprecated.cxx b/test/input/OperatorMethod-deprecated.cxx new file mode 100644 index 0000000..8ec5b68 --- /dev/null +++ b/test/input/OperatorMethod-deprecated.cxx @@ -0,0 +1,4 @@ +class start +{ + __attribute__((deprecated)) start& operator<<(int); +}; diff --git a/test/input/Typedef-deprecated.cxx b/test/input/Typedef-deprecated.cxx new file mode 100644 index 0000000..d20a211 --- /dev/null +++ b/test/input/Typedef-deprecated.cxx @@ -0,0 +1 @@ +typedef int(start) __attribute__((deprecated)); diff --git a/test/input/Variable-deprecated.cxx b/test/input/Variable-deprecated.cxx new file mode 100644 index 0000000..a837e37 --- /dev/null +++ b/test/input/Variable-deprecated.cxx @@ -0,0 +1 @@ +__attribute__((deprecated)) int start; -- cgit v0.12