llvm-project/clang/utils
Dmitri Gribenko 7acbf00f96 Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.
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
2012-09-10 20:32:42 +00:00
..
ABITest utils/ABITest: Factor out type naming code slightly. 2010-09-27 20:13:24 +00:00
C++Tests Remove the vestiges of the C backend. 2012-03-23 05:51:52 +00:00
CIndex Wrap 'data' key in quotes. 2010-04-17 00:37:35 +00:00
OptionalTests fix a bunch of comment typos found by codespell. Patch by 2011-04-15 05:22:18 +00:00
TableGen Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp. 2012-09-10 20:32:42 +00:00
TestUtils Fix typo in test program 2010-07-14 00:09:17 +00:00
VtableTest More magic. 2010-03-29 03:26:49 +00:00
analyzer Add handy script for updating plist FileCheck expected output for 2012-09-10 06:19:34 +00:00
valgrind Add a valgrind suppressions file for x86_64-pc-linux-gnu and gcc-4.3.3 which 2009-09-04 02:53:57 +00:00
CaptureCmd Use /usr/bin/env trick to find python. Patch by Krister Walfridsson. 2009-07-10 20:15:12 +00:00
CmpDriver fix a bunch of comment typos found by codespell. Patch by 2011-04-15 05:22:18 +00:00
FindSpecRefs Use /usr/bin/env trick to find python. Patch by Krister Walfridsson. 2009-07-10 20:15:12 +00:00
FuzzTest [utils/FuzzTest] Add '--stop-on-fail' to stop the script on the first failure 2012-03-08 20:29:39 +00:00
SummarizeErrors Use /usr/bin/env trick to find python. Patch by Krister Walfridsson. 2009-07-10 20:15:12 +00:00
builtin-defines.c
clang-completion-mode.el Minor comments and changes to clang-completion-mode.el, from David Wood! 2012-06-07 22:33:29 +00:00
clangVisualizers.txt Updating the visualizers to include more datatypes. Patch thanks to Jay Blanchard. 2012-05-31 19:27:30 +00:00
find-unused-diagnostics.sh Add a script that produces a list of all diagnostics that are defined in 2012-02-13 20:21:52 +00:00
token-delta.py