| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
| |
Pass the full structure instead of just the StartNames field.
We may need information about other options later.
|
| |
|
|
|
|
|
| |
Build with compiler flag '-std=c++11' since the Clang API now uses
C++11. Update our implementation to account for Clang API changes.
Update our search for the Clang resource directory to include the
LLVM/Clang version patch level.
|
| |
|
|
| |
Include the LLVM header for OwningPtr before using it.
|
| |
|
|
| |
Clang creates an "EmptyDecl" for a stray semicolon. Ignore it.
|
| |
|
|
| |
Also pass the flag through so Clang reports its help too.
|
| |
|
|
|
|
|
|
| |
Avoid requiring the option to be last by using the form
--castxml-cc-<id> "(" <cc> <cc-opt>... ")"
to specify compiler commands with arguments.
|
| | |
|
| |
|
|
|
| |
The gccxml output format has no representation for extern "C"
declaration contexts, so simply report the enclosing namespace.
|
| |
|
|
|
| |
The gccxml output format does not support uninstantiated templates
so we need to skip friend declarations referencing them.
|
| |
|
|
|
|
| |
In case our traversal accidentally reaches a class or function template
due to a bug, generate an Unimplemented element instead of trying to
generate a Class-like or Function-like element for a template.
|
| |
|
|
|
|
| |
Since gccxml does not output uninstantiated templates we must desugar
typedef types that would refer to declarations whose context is a
template. This is consistent with gccxml behavior.
|
| |
|
|
|
|
| |
Clang presents non-inline class members in the list of declarations in
a namespace. Teach PrintMembersAttribute to skip declarations whose
actual context is not the context that listed them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement the HandleTagDeclDefinition method in our ASTConsumer. Clang
calls this method during parsing on completion of each class definition.
This gives us a chance to modify class definitions.
Teach HandleTagDeclDefinition to add the implicit member declarations.
For each implicit member, ask Clang to try instantiating its definition
to see if a call to the member will actually work. Suppress errors
during this check using a clang::Sema::SFINAETrap and simply mark
the declaration as invalid if there were errors.
Add test cases for:
* implicit members that cannot be used due to access, const data members,
or reference data members.
* a POD array data member since Clang uses special logic when creating
implicit members that copy the data.
* a mutable data member since Clang adds implicit member declarations
itself (via clang::Sema::AddImplicitlyDeclaredMembersToClass),
but we still need to try defining them.
* a class that uses its implicit members so they are already defined.
|
| |
|
|
|
| |
When a typedef is "moded" the underlying type may be different from the
named type. Report the real type.
|
| |
|
|
|
| |
Report the actual function argument type even if it decayed from the
type originally specified.
|
| |
|
|
| |
When an enum has no name but does have a typedef, use the typedef name.
|
| | |
|
| | |
|
| |
|
|
|
| |
Report the canonical base type instead of a typedef type in order to
match gccxml behavior.
|
| |
|
|
|
|
|
| |
The gccxml output format originally reported bases as an attribute of
<Class> elements and later added the <Base> nested elements to produce
valid XML IDREFs and indicate virtual inheritance. We need to include
the old bases="" attribute to match the gccxml format.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
| |
Also pass the flag through so Clang reports its version too.
|
| |
|
|
| |
Start with "0.1". Compute the version number from Git if possible.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Use llvm::sys::Process::GetArgumentVector instead of KWSys Encoding to
load process command-line arguments. This reduces dependency on KWSys
and stores the arguments in LLVM-provided data structures.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Report in Class elements a befriending="" attribute listing the class
friends. Queue the friends for output, but not necessarily as complete
types.
|
| |
|
|
|
| |
Inside Class elements generate Base elements reporting the type="",
access="", and virtual="" information about base classes, if any.
|
| |
|
|
| |
Factor out a PrintAccessAttribute method from PrintContextAttribute.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
Clang represents pointer-to-member-function as a pointer-to-member type
whose pointee is a normal function-type. The gccxml output format
represents them as a normal pointer whose pointee is a "method-type".
Since clang::QualType cannot represent a "method-type", introduce our
own DumpType struct to contain a clang::QualType and a clang::Type*
where the latter can be used to point to the containing class.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
| |
Implement the OutputFieldDecl method to generate the Field element.
Report the name="", type="", bits="", mutable="", context="",
and location="" of the declaration. Queue the type.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Without function bodies Clang generates an error when code attempts
an explicit function template instantiation.
|
| | |
|
| |
|
|
| |
Replace them with the underlying type.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Tell Clang to add the implicit method declarations before we
traverse a CXXRecordDecl.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|