| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
These are unnecessary, the declarations already carry the 'extern C' property, and if there is mismatch
between declaration and definition then we will get linker errors via libclang.exports.
llvm-svn: 290025
|
|
|
|
|
|
|
|
|
|
| |
Summary: Removed unused headers, replaced some headers with forward class declarations
Patch by: Eugene <claprix@yandex.ru>
Differential Revision: https://reviews.llvm.org/D20100
llvm-svn: 275882
|
|
|
|
|
|
|
| |
No functionality changed, this is a purely mechanical cleanup to ensure
the #include order remains consistent across the project.
llvm-svn: 225975
|
|
|
|
| |
llvm-svn: 210422
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's possible that the "comment AST" may be replaced or split out in the
midterm, any anyway this makes the headers easier to read.
Developers don't currently need to include "clang-c/Documentation.h" explicitly
and there's no macro to test for availability yet.
The raw comment and brief comment accessors have been kept in Index.h though
brief support may also move here as a separate proposal.
This is not a deprecation, just a gentle separation of concerns as we look to
simplify the built-in representation of comment nodes and support external
comment processors.
llvm-svn: 207392
|
|
|
|
|
|
| |
ambiguity between index() function and clang::index namespace.
llvm-svn: 194638
|
|
|
|
| |
llvm-svn: 194610
|
|
|
|
| |
llvm-svn: 194521
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let me tell you a tale...
Within some twisted maze of debug info I've ended up implementing an
insane man's Include What You Use device. When the debugger emits debug
info it really shouldn't, I find out why & then realize the code could
be improved too.
In this instance CIndexDiagnostics.cpp had a lot more debug info with
Clang than GCC. Upon inspection a major culprit was all the debug info
describing clang::Sema. This was emitted because clang::Sema is
befriended by DiagnosticEngine which was rightly required, but GCC
doesn't emit debug info for friends so it never emitted anything for
Clang. Clang does emit debug info for friends (will be fixed/changed to
reduce debug info size).
But why didn't Clang just emit a declaration of Sema if this entire TU
didn't require a definition?
1) Diagnostic.h did the right thing, only using a declaration of Sema
and not including Sema.h at all.
2) Some other dependency of CIndexDiagnostics.cpp didn't do the right
thing. ASTUnit.h, only needing a declaration, still included Sema.h
(hence this commit which removes that include and adds the necessary
includes to the cpp files that were relying on this)
3) -flimit-debug-info didn't save us because of
EnterExpressionEvaluationContext, defined inline in Sema.h which fires
the "requiresCompleteType" check/flag (since it uses nested types from
Sema and calls Sema member functions) and thus, if debug info is ever
emitted for the type, the whole type is emitted and not just a
declaration.
Improving -flimit-debug-info to account for this would be... hard.
Modifying the code so that's not 'required to be complete' might be
possible, but probably only by moving EnterExpressionEvaluationContext
either into Sema, or out of Sema.h. That might be a bit too much of a
contortion to be bothered with.
Also, this is only one of the cases where emitting debug info for
friends caused us to emit a lot more debug info (this change reduces
Clang's DWO size by 0.93%, dropping friends entirely reduces debug info
by 3.2%) - I haven't hunted down the other cases, but I assume they
might be similar (Sema or something like it). IWYU or a similar tool
might help us reduce build times a bit, but analyzing debug info to find
these differences isn't worthwhile. I'll take the 3.2% win, provide this
small improvement to the code itself, and move on.
llvm-svn: 190715
|
|
|
|
|
|
|
|
| |
Original patch by Fariborz Jahanian; extended by me.
Fixes rdar://14124644
llvm-svn: 184688
|
|
|
|
|
|
|
|
|
| |
Remove unneeded member in CommentSema, add a test for the XML schema (the
schema already allowed multiple paragraphs in <ResultDiscussion>, but there
were no tests for that), fix HTML generation (it is not allowed to have <p>
inside <dl>).
llvm-svn: 184652
|
|
|
|
|
|
|
| |
commands. Render them properly in XML output.
// rdar://14207725
llvm-svn: 184610
|
|
|
|
|
|
| |
doxygen commands. // rdar://12379053
llvm-svn: 176127
|
|
|
|
| |
llvm-svn: 174290
|
|
|
|
| |
llvm-svn: 174285
|
|
|
|
|
|
| |
Also migrate all clients from the old API.
llvm-svn: 174263
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change introduces a 'kind' attribute for the <Para> tag, that captures the
kind of the parent block command.
For example:
\todo Meow.
used to be just <Para>Meow.</Para>, but now it is
<Para kind="todo">Meow.</Para>
llvm-svn: 174216
|
|
|
|
| |
llvm-svn: 174173
|
|
|
|
|
|
|
|
| |
\headerfile command and representing it in an xml
document. Patch reviewed by Dmitri Gribenko.
// rdar://12397511
llvm-svn: 174109
|
|
|
|
| |
llvm-svn: 173589
|
|
|
|
|
|
| |
into a getter cxtu::getASTUnit(TU)
llvm-svn: 173585
|
|
|
|
|
|
| |
brought into 'clang' namespace by clang/Basic/LLVM.h
llvm-svn: 172323
|
|
|
|
|
|
| |
<Declaration> tag
llvm-svn: 171763
|
|
|
|
|
|
|
| |
Removes a duplicate #include as well as cleaning up some sort order
regressions since I last ran the script over Clang.
llvm-svn: 171364
|
|
|
|
|
|
|
| |
use it to format xml declaration tags.
// rdar://12378714
llvm-svn: 170727
|
|
|
|
|
|
|
|
|
| |
fix any bad objectiveC syntax coming out of
DeclPrinter. This is on going. Also, introduce a new
PrintPolicy and use it as needed when declaration tag
is to be produced via DeclPrinter.
llvm-svn: 170606
|
|
|
|
|
|
| |
is created to 1000.
llvm-svn: 170481
|
|
|
|
| |
llvm-svn: 170478
|
|
|
|
|
|
|
|
|
|
| |
use clang's formatter. Currently, formatter is used
to format declaration tags for xml comments. Since formatter
is in flux and its change will break several of the clang comment
tests, only a single tests is formatted using this facility.
Doug has reviewed and approved it for check-in.
llvm-svn: 170467
|
|
|
|
|
|
| |
Completely automated with sort_includes.py
llvm-svn: 169240
|
|
|
|
|
|
| |
declaration.
llvm-svn: 166707
|
|
|
|
| |
llvm-svn: 166287
|
|
|
|
|
|
|
| |
for current(rewritten) comment and getParamNameAsWritten
to access param name coming with \param marker.
llvm-svn: 166231
|
|
|
|
| |
llvm-svn: 166163
|
|
|
|
|
|
|
|
|
|
|
| |
XML comment for declarations which pretty-prints
declaration. I had to XFAIL one test annotate-comments.cpp.
This test is currently unmaintainable as written.
Dmitri G., can you see what we can do about this test.
We should change this test such that adding a new tag does not wreck
havoc to the test.
llvm-svn: 166130
|
|
|
|
|
|
| |
of their own.
llvm-svn: 165972
|
|
|
|
|
|
|
| |
template when comment is comming from overridden declaration.
// rdar://12378793
llvm-svn: 165953
|
|
|
|
|
|
|
| |
has none of its own. Factor in Doug's comments.
// rdar://12378793
llvm-svn: 165771
|
|
|
|
|
|
|
|
|
|
| |
methods looking for documentation on a particular base
class inherited by any method that overrides the base class.
In case of redeclaration, as when objc method is defined
in the implementation, it also looks up for documentation
in class/class extension being redeclared.
llvm-svn: 165643
|
|
|
|
|
|
| |
regex for version tuples.
llvm-svn: 165104
|
|
|
|
|
|
| |
attribute going iinto XML document.
llvm-svn: 165066
|
|
|
|
|
|
| |
to XML output. // rdar://12378879
llvm-svn: 165039
|
|
|
|
|
|
| |
care of comments by Dimitri and Doug.
llvm-svn: 164957
|
|
|
|
|
|
|
| |
(I still need to add a test once I figure it out).
Reviewed off-line by Doug. // rdar://12378879
llvm-svn: 164861
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now we have a list of all commands. This is a good thing in itself, but it
also enables us to easily implement typo correction for command names.
With this change we have objects that contain information about each command,
so it makes sense to resolve command name just once during lexing (currently we
store command names as strings and do a linear search every time some property
value is needed). Thus comment token and AST nodes were changed to contain a
command ID -- index into a tables of builtin and registered commands. Unknown
commands are registered during parsing and thus are also uniformly assigned an
ID. Using an ID instead of a StringRef is also a nice memory optimization
since ID is a small integer that fits into a common bitfield in Comment class.
This change implies that to get any information about a command (even a command
name) we need a CommandTraits object to resolve the command ID to CommandInfo*.
Currently a fresh temporary CommandTraits object is created whenever it is
needed since it does not have any state. But with this change it has state --
new commands can be registered, so a CommandTraits object was added to
ASTContext.
Also, in libclang CXComment has to be expanded to include a CXTranslationUnit
so that all functions working on comment AST nodes can get a CommandTraits
object. This breaks binary compatibility of CXComment APIs.
Now clang_FullComment_getAsXML(CXTranslationUnit TU, CXComment CXC) doesn't
need TU parameter anymore, so it was removed. This is a source-incompatible
change for this C API.
llvm-svn: 163540
|
|
|
|
|
|
| |
as their argument. For example, \fn, \function, \typedef, \method, \class etc.
llvm-svn: 161601
|
|
|
|
|
|
|
| |
This also fixes a bug in comment to XML conversion: \result was just an
ordinary paragraph, not an alias for \returns.
llvm-svn: 161596
|
|
|
|
|
|
| |
not compress spaces in verbatim content.
llvm-svn: 161531
|
|
|
|
|
|
| |
Comment XML: add a root node kind for enums.
llvm-svn: 161442
|
|
|
|
|
|
|
|
|
|
|
|
| |
The implementation also includes a Relax NG schema and tests for the schema
itself. The schema is used in c-index-test to verify that XML documents we
produce are valid. In order to do the validation, we add an optional libxml2
dependency for c-index-test.
Credits for CMake part go to Doug Gregor. Credits for Autoconf part go to Eric
Christopher. Thanks!
llvm-svn: 161431
|