summaryrefslogtreecommitdiffstats
path: root/test/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
...
* Output: Decay Function Argument typesBrad King2014-03-241-0/+1
| | | | | Report the actual function argument type even if it decayed from the type originally specified.
* Output: Use typedef name for anonymous enumBrad King2014-03-241-0/+2
| | | | When an enum has no name but does have a typedef, use the typedef name.
* Output: Add default="" to Function Argument elementsBrad King2014-03-241-0/+2
|
* Output: Desugar Class base class referencesBrad King2014-03-241-0/+1
| | | | | Report the canonical base type instead of a typedef type in order to match gccxml behavior.
* test: Add case for multiple class forward declarationsBrad King2014-03-241-0/+1
|
* Output: Fix output of forward-declared classesBrad King2014-03-241-0/+1
| | | | | | | When adding a dump node for a class, use the class definition, if available, instead of the canonical declaration. They may not be the same when a class is forward-declared before it is defined. We need to use the definition to get all members.
* test: Add case for class template basesBrad King2014-03-241-0/+1
|
* castxml: Report version number with '--version'Brad King2014-03-241-0/+1
| | | | Also pass the flag through so Clang reports its version too.
* castxml: Expand response file references on command lineBrad King2014-03-241-0/+3
| | | | | | Add support for @args.rsp file references on the command line. Add test cases covering missing response files, empty response files, and response files that actually provide arguments.
* test: Avoid duplication of path to test input directoryBrad King2014-03-241-4/+5
| | | | Store the path in a local "input" variable.
* Output: Make FundamentalType names match gccxmlBrad King2014-03-241-0/+1
| | | | | | The gccxml FundamentalType names used different variants for integer type names than Clang uses. Hard-code the names for these types. Add a test case to cover these names.
* test: Add cases for C-mode gccxml-like outputBrad King2014-03-241-0/+5
| | | | | | | Although gccxml did not support C, it was occasionally requested. The gccxml output format supports C and Clang can easily handle parsing it. Add test cases that verify Clang can parse sources as C code and not C++.
* test: Add infrastructure for C-mode testsBrad King2014-03-241-5/+13
|
* test: Add case for using declaration in derived classBrad King2014-03-241-0/+1
| | | | | Cover a class that brings overloads from a base through a using declaration.
* test: Add cases for class member template instantiationBrad King2014-03-241-0/+2
| | | | Cover member templates of both classes and class templates.
* Output: Report class friendsBrad King2014-03-241-0/+1
| | | | | | Report in Class elements a befriending="" attribute listing the class friends. Queue the friends for output, but not necessarily as complete types.
* Output: Report class basesBrad King2014-03-211-0/+1
| | | | | Inside Class elements generate Base elements reporting the type="", access="", and virtual="" information about base classes, if any.
* Output: Add abstract="" attribute to Class elementsBrad King2014-03-211-0/+1
|
* Output: Generate Enumeration elementsBrad King2014-03-211-0/+2
| | | | | | | | | Implement the OutputEnumDecl method to generate the Enumeration element. Report the name="", context="", and location="" of the declaration. Inside the Enumeration element generate EnumValue elements describing the enumeration names and initializers. Also map enum types to the corresponding declarations.
* Output: Add init="" attribute to Variable elementsBrad King2014-03-211-0/+1
|
* Output: Handle using declarations and directivesBrad King2014-03-211-0/+4
| | | | | | | | Honor both for purposes of the start node lookup. Walk through using declarations (Clang UsingShadowDecl) to output the referenced declarations in their original context. Do not include names brought into a context by a using declaration or directive in the members of that context.
* Output: Generate MethodType and OffsetType elementsBrad King2014-03-211-0/+4
| | | | | | | | | | Implement the OutputMemberPointerType method. If a type is a pointer to a data member, call a new OutputOffsetType method to generate an OffsetType element representing it directly. If a type is a pointer to a function member, queue a DumpType node that holds the pointee function type and the containing class. Teach the main OutputType method to recognize this case and dispatch to a new OutputMethodType method to generate a MethodType element.
* Output: Generate Ellipsis element inside variadic functions and typesBrad King2014-03-211-0/+2
|
* Output: Generate FunctionType elementsBrad King2014-03-211-0/+1
| | | | | | | | | | | | Implement the OutputFunctionProtoType method to generate the FunctionType element. Report the return type. Inside the FunctionType element generate Argument elements describing the function type parameter types. For each argument report the type and queue it. Create a OutputFunctionTypeHelper method to hold the main implementation and call it from OutputFunctionProtoType with the "FunctionType" name as an argument. This will allow it to be re-used for other function types later.
* Output: Map Paren type to the inner typeBrad King2014-03-211-0/+1
|
* test: Add case for a Variable as Class memberBrad King2014-03-211-0/+1
|
* Output: Generate Field elementsBrad King2014-03-211-0/+1
| | | | | | Implement the OutputFieldDecl method to generate the Field element. Report the name="", type="", bits="", mutable="", context="", and location="" of the declaration. Queue the type.
* Output: Generate function template instantiations and specializationsBrad King2014-03-211-0/+1
| | | | | | | Teach the AddStartDecl and PrintMembersAttribute methods to queue function template instantiations and specializations for output using an AddFunctionTemplateDecl helper to share common implementation. Map the Clang SubstTemplateTypeParm type to its replacement type.
* test: Add cases for Method, OperatorMethod, and OperatorFunctionBrad King2014-03-211-0/+3
| | | | | Use operator name "<<" and verify that the word "operator" does not appear in the name as is the case in original gccxml.
* Output: Follow qualified type namesBrad King2014-03-211-0/+2
|
* Output: Desugar template specialization typesBrad King2014-03-211-0/+1
| | | | Replace them with the underlying type.
* Output: Generate class template instantiations and specializationsBrad King2014-03-211-0/+1
| | | | | | | | | | | | | Teach the AddStartDecl and PrintMembersAttribute methods to queue class template instantiations and specializations for output using an AddClassTemplateDecl helper to share common implementation. Implement the OutputClassTemplateSpecializationDecl method to forward to the OutputCXXRecordDecl method. Teach the underlying OutputRecordDecl implementation to use a new PrintNameAttribute overload that extracts the full name from a NamedDecl so that template arguments are included in the class template specialization name.
* Extend xml test cases to validate with xmllint if availableBrad King2014-03-211-0/+3
| | | | Look for xmllint and use it to validate the xml format in test results.
* Restrict --castxml-gccxml to C++98 and C89 modesBrad King2014-03-211-0/+11
| | | | | | | The gccxml output format was designed for C++98 and does not support constructs in C++11 or other newer language standards. Reject such combinations up front. An alternative output format will be needed for such interfaces.
* Output: Generate Function and related elementsBrad King2014-03-211-0/+2
| | | | | | | | | | | | | | Implement the OutputFunctionDecl, OutputCXXMethodDecl, OutputCXXConversionDecl, OutputCXXConstructorDecl, and OutputCXXDestructorDecl methods to generate these elements. Report the name="", returns="", context="", and location="" of the function declaration. Also add static="1", explicit="1", const="1", virtual="1", inline="1", extern="1", and artificial="1" (compiler generated), and throws="..." as appropriate. Inside the function element generate Argument elements describing the function parameters. For each argument report the name="", type="", and location="". Queue the argument types.
* Output: Generate Variable elementsBrad King2014-03-211-0/+1
| | | | | | | Implement the OutputVarDecl method to generate the Variable element. Report the name="", type="", context="", location="", and storage class (static="1" or extern="1") of the declaration. Queue the type.
* Output: Generate ArrayType elementsBrad King2014-03-211-0/+2
| | | | | | Implement the OutputConstantArrayType and OutputIncompleteArrayType methods to generate the ArrayType element. Report the min="", max="", and type="" of the array elements and queue the type.
* Output: Generate ReferenceType elementsBrad King2014-03-211-0/+1
| | | | | | Implement the OutputLValueReferenceType method to generate the RefernceType element. Report the type="" of the pointee and queue it.
* Output: Generate PointerType elementsBrad King2014-03-211-0/+1
| | | | | Implement the OutputPointerType method to generate the PointerType element. Report the type="" of the pointee and queue it.
* Output: Generate Class, Struct, and Union elementsBrad King2014-03-211-0/+2
| | | | | | | | | Implement the OutputRecordDecl and OutputCXXRecordDecl methods to generate Class, Struct, and Union elements. Report the name="", context="", location="", incomplete="", and members="" of the declaration. Queue its members. Also map record types to the corresponding declarations.
* Output: Generate CvQualifiedType elementsBrad King2014-03-211-0/+1
| | | | | | | | Implement the OutputCvQualifiedType method to generate an element whose ID attribute id="" is that of an unqualified type plus 'c', 'v', or 'r' letters appended to indicate qualification. Reference the IDREF of the unqualified type in a type="" attribute and describe the qualifiers with const="1", volatile="1", and restrict="1" attributes as appropriate.
* Output: Generate FundamentalType elementsBrad King2014-03-211-0/+1
| | | | | Implement the OutputBuiltinType method to generate the FundamentalType element. Report the name="" of the type.
* Output: Generate declared Namespace elementsBrad King2014-03-211-0/+2
| | | | | | Implement the OutputNamespaceDecl method to generate a Namespace element for explicitly declared namespaces. Report the name="", context="", and members="" of the namespace. Queue its members.
* Teach test infrastructure to check generated xml filesBrad King2014-02-261-0/+16
| | | | | | Teach test/run.cmake to optionally read the actual and expected xml content and compare them. Add to test/CMakeLists.txt a castxml_test_gccxml macro to add tests for --castxml-gccxml mode.
* Add test cases for castxml command-line errorsBrad King2014-02-261-0/+10
| | | | | Test that running with no arguments produces no output or error. Test command-line option error messages produced by our code.
* Add test infrastructure to run castxml and validate resultsBrad King2014-02-261-0/+26
Create a test/run.cmake test driver script that uses execute_process to run a castxml test command line and then compares the results to those we expect. Validate the process result (return code) and the content of stdout and stderr. In test/CMakeLists.txt create a castxml_test_cmd macro to add tests that use "run.cmake".