summaryrefslogtreecommitdiffstats
path: root/clang/unittests/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* Comment parser tests: test that we allow placing no whitespace between \paramDmitri Gribenko2012-08-011-0/+3
| | | | | | and [direction]. llvm-svn: 161146
* Comment parsing: add support for \tparam command on all levels.Dmitri Gribenko2012-07-311-0/+60
| | | | | | | | | | The only caveat is renumbering CXCommentKind enum for aesthetic reasons -- this breaks libclang binary compatibility, but should not be a problem since API is so new. This also fixes PR13372 as a side-effect. llvm-svn: 161087
* Comment parser: add one more testDmitri Gribenko2012-07-301-4/+23
| | | | llvm-svn: 160965
* Implement resolving of HTML character references (named: &, decimal: *,Dmitri Gribenko2012-07-272-2/+321
| | | | | | | | | hex: ) during comment parsing. Now internal representation of plain text in comment AST does not contain character references, but the characters themselves. llvm-svn: 160891
* Comment parsing: allow newlines between \param, direction specification (e.g.,Dmitri Gribenko2012-07-241-44/+82
| | | | | | [in]), parameter name and description paragraph. llvm-svn: 160682
* Comment parsing: retokenized text tokens are now pushed back in correct (notDmitri Gribenko2012-07-241-0/+25
| | | | | | reverse) order llvm-svn: 160675
* Comment parser unit tests: split a huge test caseDmitri Gribenko2012-07-231-34/+51
| | | | llvm-svn: 160649
* Comment parser unit tests: reduce code duplicationDmitri Gribenko2012-07-231-122/+45
| | | | llvm-svn: 160647
* add AST unittests to CMake build systemDmitri Gribenko2012-07-231-0/+1
| | | | llvm-svn: 160640
* Fix PR13411: Comment parsing: failed assertion on unterminated verbatim block.Dmitri Gribenko2012-07-201-15/+58
| | | | | | | | | | The assertion was wrong in case we have a verbatim block without a closing command. Also add tests for closing command name in a verbatim block, since now it can be empty in such cases. llvm-svn: 160568
* Comment parsing: don't parse whitespace before \endverbatim as a separate ↵Dmitri Gribenko2012-07-182-35/+59
| | | | | | line of whitespace. llvm-svn: 160464
* Comment AST nodes: rename getXXXCount() methods to getNumXXXs() to be in ↵Dmitri Gribenko2012-07-131-15/+15
| | | | | | line with Statement AST nodes. llvm-svn: 160182
* Comment parsing: repaint the bikesched: rename 'HTML open tags' to 'HTML ↵Dmitri Gribenko2012-07-132-157/+157
| | | | | | start tags' and 'HTML close tags' to 'HTML end tags' according to HTML spec. llvm-svn: 160153
* Enable comment parsing and semantic analysis to emit diagnostics. A fewDmitri Gribenko2012-07-113-10/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | diagnostics implemented -- see testcases. I created a new TableGen file for comment diagnostics, DiagnosticCommentKinds.td, because comment diagnostics don't logically fit into AST diagnostics file. But I don't feel strongly about it. This also implements support for self-closing HTML tags in comment lexer and parser (for example, <br />). In order to issue precise diagnostics CommentSema needs to know the declaration the comment is attached to. There is no easy way to find a decl by comment, so we match comments and decls in lockstep: after parsing one declgroup we check if we have any new, not yet attached comments. If we do -- then we do the usual comment-finding process. It is interesting that this automatically handles trailing comments. We pick up not only comments that precede the declaration, but also comments that *follow* the declaration -- thanks to the lookahead in the lexer: after parsing the declgroup we've consumed the semicolon and looked ahead through comments. Added -Wdocumentation-html flag for semantic HTML errors to allow the user to disable only HTML warnings (but not HTML parse errors, which we emit as warnings in -Wdocumentation). llvm-svn: 160078
* Comment lexing: fix lexing to actually work in non-error cases.Dmitri Gribenko2012-07-091-12/+107
| | | | llvm-svn: 159963
* Implement AST classes for comments, a real parser for Doxygen comments and aDmitri Gribenko2012-07-062-26/+1290
| | | | | | | | | | | | | | very simple semantic analysis that just builds the AST; minor changes for lexer to pick up source locations I didn't think about before. Comments AST is modelled along the ideas of HTML AST: block and inline content. * Block content is a paragraph or a command that has a paragraph as an argument or verbatim command. * Inline content is placed within some block. Inline content includes plain text, inline commands and HTML as tag soup. llvm-svn: 159790
* Fix an infinite loop in comment lexer: we were not advancing in the input ↵Dmitri Gribenko2012-06-271-10/+32
| | | | | | character stream when we saw a '<' that is not a start of an HTML tag. llvm-svn: 159303
* Remove unsigned and a pointer from a comment token (so that each token can ↵Dmitri Gribenko2012-06-271-29/+32
| | | | | | have only one semantic string value attached to it), at a cost of adding an additional token. llvm-svn: 159270
* Implement a lexer for structured comments.Dmitri Gribenko2012-06-263-0/+1032
| | | | llvm-svn: 159223
* C++11 constexpr: Add note stacks containing backtraces if constant evaluationRichard Smith2011-12-162-98/+0
| | | | | | | | | | fails within a call to a constexpr function. Add -fconstexpr-backtrace-limit argument to driver and frontend, to control the maximum number of notes so produced (default 10). Fix APValue printing to be able to pretty-print all APValue types, and move the testing for this functionality from a unittest to a -verify test now that it's visible in clang's output. llvm-svn: 146749
* Attempt to fix unit testsDouglas Gregor2011-09-291-0/+4
| | | | llvm-svn: 140748
* Rename DiagnosticInfo to Diagnostic as per issue 5397David Blaikie2011-09-261-1/+1
| | | | llvm-svn: 140493
* Rename DiagnosticClient to DiagnosticConsumer as per issue 5397David Blaikie2011-09-251-1/+1
| | | | llvm-svn: 140479
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-251-2/+2
| | | | llvm-svn: 140478
* Define DiagnosticBuilder<<APValue so it's easy to include APValues inJeffrey Yasskin2011-07-182-0/+94
diagnostics. llvm-svn: 135398
OpenPOWER on IntegriCloud