summaryrefslogtreecommitdiffstats
path: root/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix Clang-tidy modernize-use-nullptr warnings in headers and generated ↵Hans Wennborg2015-09-291-2/+1
| | | | | | | | | | files; other minor cleanups. By Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13187 llvm-svn: 248828
* Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial typesBenjamin Kramer2015-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | If the type isn't trivially moveable emplace can skip a potentially expensive move. It also saves a couple of characters. Call sites were found with the ASTMatcher + some semi-automated cleanup. memberCallExpr( argumentCountIs(1), callee(methodDecl(hasName("push_back"))), on(hasType(recordDecl(has(namedDecl(hasName("emplace_back")))))), hasArgument(0, bindTemporaryExpr( hasType(recordDecl(hasNonTrivialDestructor())), has(constructExpr()))), unless(isInTemplateInstantiation())) No functional change intended. llvm-svn: 238601
* Documentation parsing: add support for \throws \throw \exception commandsDmitri Gribenko2013-11-121-0/+1
| | | | llvm-svn: 194521
* doce parsing: adding few more headerdoc tags.Fariborz Jahanian2013-04-051-0/+3
| | | | | | // rdar://12379114 llvm-svn: 178903
* Documentation parsing. Some refactoring and codeFariborz Jahanian2013-03-081-2/+2
| | | | | | improvements per Dmtiri's comments. // rdar://12379114 llvm-svn: 176739
* HeaderDoc: Support more of HeaderDoc documentation Fariborz Jahanian2013-03-071-0/+2
| | | | | | | | commands; top level tags such as @interface and their 2nd level tags such as @coclass, etc. // rdar://12379114 llvm-svn: 176667
* doc parsing. We want to issue a strong warning whenFariborz Jahanian2013-03-051-0/+1
| | | | | | | an @function comment is not followed by a function decl. // rdar://13094352 llvm-svn: 176468
* Comment parsing: improve the fidelity of XML output for many block commandsDmitri Gribenko2013-02-011-0/+44
| | | | | | | | | | | | | | 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
* [Comment parsing] Add support for recognizingFariborz Jahanian2013-01-311-0/+1
| | | | | | | | \headerfile command and representing it in an xml document. Patch reviewed by Dmitri Gribenko. // rdar://12397511 llvm-svn: 174109
* TableGen backends: use emitSourceFileHeader() to emit the warning aboutDmitri Gribenko2013-01-301-2/+4
| | | | | | file contents being autogenerated llvm-svn: 173979
* Comment sema: warn when comment has \deprecated but declaration does not have aDmitri Gribenko2012-09-221-0/+1
| | | | | | | | | deprecation attribute ('deprecated', 'availability' or 'unavailable'). This warning is under a separate flag, -Wdocumentation-deprecated-sync, so it can be turned off easily while leaving other -Wdocumentation warnings on. llvm-svn: 164467
* Comment parsing: handle \deprecated command. It is a block command, but itDmitri Gribenko2012-09-131-0/+1
| | | | | | | should be fine to use it without further explanations in the attached paragraph, so the warning about empty paragraph was turned off for it. llvm-svn: 163836
* Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.Dmitri Gribenko2012-09-101-0/+70
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
OpenPOWER on IntegriCloud