History log of /external/clang/lib/AST/CommentLexer.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4967a710c84587c654b56c828382219c3937dacb 20-Sep-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master Clang for rebase to r275480

Bug: http://b/31320715

This merges commit ac9cc4764cf47a6c3f031687d8592e080c9f5001 from
aosp/dev.

Test: Build AOSP and run RenderScript tests (host tests for slang and
libbcc, RsTest, CTS)

Change-Id: Ic2875e5c3673c83448cd7d1013861e42947b1b55
/external/clang/lib/AST/CommentLexer.cpp
58878f85ab89b13e9eea4af3ccf055e42c557bc8 06-May-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r235153

Change-Id: Ia94bbcb6da7c75b6e7c2afedd1001094d62a7324
/external/clang/lib/AST/CommentLexer.cpp
176edba5311f6eff0cad2631449885ddf4fbc9ea 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master Clang for rebase to r222490.

Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/lib/AST/CommentLexer.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/AST/CommentLexer.cpp
edb95d3f9eb354b30baddd58fee5d2e7b3da2c92 02-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196048:
------------------------------------------------------------------------
r196048 | d0k | 2013-12-01 07:09:32 -0800 (Sun, 01 Dec 2013) | 3 lines

CommentLexer: When proceeding with a typo corrected name don't clobber the token.

This would crash if the token is used in another diagnostic. PR18051.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
31c71ca0eb83967085f21713b1dedff8c7f7a90f 23-Aug-2013 Dmitri Gribenko <gribozavr@gmail.com> Fix indentation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189119 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
f4030ae4638d1831a2a031f1e33b86de8c5fef28 09-May-2013 Fariborz Jahanian <fjahanian@apple.com> [doc parsing]: make single character command impostures
warn in pedantic mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
5cd4c41422b8d65a08e0ec007743d7a0ae72ec27 09-May-2013 Fariborz Jahanian <fjahanian@apple.com> [doc parsing]: So, in this patch, single character
'commands' will not go through typo fixit logic,
preserving the old behavior (no typo, no diagnostics).
// rdar://12381408


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
abbfa671539c74b5bec66a64964de984c908cdfa 08-May-2013 Fariborz Jahanian <fjahanian@apple.com> Turn off a warning caused by my last patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
0089bc4ddee6bb309ad25f4c7ad4b7ffe5df4512 08-May-2013 Fariborz Jahanian <fjahanian@apple.com> documentation parsing. Patch to do typo correction for
documentation commands. Patch was reviewed, along with
great suggestions for improvement, by Doug.
// rdar://12381408


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
efa78d163214fd9e909ab2bf6911edfbc7a2b9df 04-May-2013 Fariborz Jahanian <fjahanian@apple.com> [doc parsing]: Make warning about unknown command
tags off by default for now. Move diagnostic code
to DiagnosticCommentKinds.td. // rdar://12381408


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
ad6fd9f93ce0d328397e8d57ef7117ced24fc8e2 04-May-2013 Fariborz Jahanian <fjahanian@apple.com> [Doc parsing] Provide diagnostics for unknown documentation
commands. // rdar://12381408


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
808383d2d6d58a7c7db85f8c7618fb74d821309f 05-Mar-2013 Dmitri Gribenko <gribozavr@gmail.com> Comment parsing: refactor handling of command markers in AST

* Use the term 'command marker', because the semantics of 'backslash' and 'at'
commands are the same. (Talking about 'at commands' makes them look like a
special entity.)

* Sink the flag down into bitfields, reducing the size of AST nodes.

* Change the flag into an enum for clarity. Boolean function parameters are
not very clear.

* Add unittests for new tok::at_command tokens.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176461 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
8536fa14ee1048e5e2d62cb3dc11fc640c7dc00d 02-Mar-2013 Fariborz Jahanian <fjahanian@apple.com> Some refactoring in my patch on document
command source fidelity. // rdar://13066276



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
c98e9130bcddd0258c110d30749edd2284087e3d 01-Mar-2013 Fariborz Jahanian <fjahanian@apple.com> comment parsing. Keep the original command format
in AST for source fidelity and use it in diagnostics
to refer to the original format. // rdar://13066276


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176387 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
0ff4f8bf47c924b4b01d989a53432a95471a068d 10-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> Use static functions instead of an unnamed namespace


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
bf8814478fddfa611911bdbd6a53a6614938cc63 09-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> Comment parsing: use CharInfo.h

This also gives us 0.2% speedup on '-fsyntax-only -Wdocumentation' time for
a testcase that consists of all Clang headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174810 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
5bd1e5ba000023910ad986a16dd16d7ca914750a 30-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Comment parsing: resolve more named character references

This reimplements r173850 with a better approach:
(1) use a TableGen-generated matcher instead of doing a linear search;
(2) avoid allocations for new strings by converting code points to string
iterals with TableGen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
cb5620c9b213f4bd323912159fdddda35e258a14 30-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Move UTF conversion routines from clang/lib/Basic to llvm/lib/Support

This is required to use them in TableGen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
4b1a0e4ab6648894c63bffe8564a669c1df3d683 30-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> Removed couple of html named character references in
my last patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
658a115c8e0d5bddf607a13d2ce13cd306ef2389 30-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> [Doc parsing] Patch to parse Doxygen-supported HTML character
references to their UTIF-8 encoding. Reviewed offline by Doug.
// rdar://12392215


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
c934dfe950a14fe447aa14a7dae25d00ee87c8bb 19-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Use llvm::hexDigitValue in comment lexer


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
aa7dbafc3539868ce271cb336444ec544260905a 30-Dec-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment lexing: replace manual comparison with StringRef::find_first_of

This gives an about 1.8% improvement on Clang bootstrap with -Wdocumentation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
8c05da3fd8db98af482826ba059ab1ad6d58010f 14-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment parsing: don't parse comment marker followed by a digit as a command
since no Doxygen command starts with a digit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163909 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
e4330a302ac20b41b9800267ebd4b5b01f8553f8 10-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163540 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
af503a6f218cbef8704609812668360b0cbd0b60 31-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Remove the useless CommentOptions class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
c24a76e376a767edc14e60bed716396a84cb127a 31-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment HTML tag name machers: move from StringSwitch to an efficient
TableGen-generated string matcher.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
834a5bd311b4a32f89937ca5b6dd2b4111891859 23-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment parsing: parse "<blah" as an HTML tag only if "blah" is a known tag
name. This should reduce the amount of warning false positives about bad HTML
in comments when the comment author intended to put a reference to a template.
This change will also enable us parse the comment as intended in these cases.

Fixes part 1 of PR13374.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
aa58081902ad31927df02e8537d972eabe29d6df 09-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment parsing: extract TableGen'able pieces into new CommandTraits class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
477a9f58c1b197f315befd03b42a8a0b3a2f0ff9 27-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Implement resolving of HTML character references (named: &amp;, decimal: &#42;,
hex: &#x1a;) during comment parsing.

Now internal representation of plain text in comment AST does not contain
character references, but the characters themselves.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
64da4e55c111f4733135e1780216609569767351 19-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment parsing: don't parse whitespace before \endverbatim as a separate line of whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
3f38bf2d441fac379c427f86153fbb0cb41256c6 13-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment parsing: repaint the bikesched: rename 'HTML open tags' to 'HTML start tags' and 'HTML close tags' to 'HTML end tags' according to HTML spec.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
a5ef44ff5d93a3be6ca67782828157a71894cf0c 11-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Enable comment parsing and semantic analysis to emit diagnostics. A few
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).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
a99ec107ba6b5abaf27c6cc9318e65689163f2a1 09-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment lexing: fix lexing to actually work in non-error cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
8d3ba23f2d9e6c87794d059412a0808c9cbacb25 06-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Implement AST classes for comments, a real parser for Doxygen comments and a
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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
5676d32a23faf0506f5c295980c2876c862488d5 28-Jun-2012 Dmitri Gribenko <gribozavr@gmail.com> Fix an infinite loop in comment lexer: we were not advancing in the input character stream when we saw a '<' that is not a start of an HTML tag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159303 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
962668d2c192dd02f75b8ec3628a89964bfb738b 27-Jun-2012 Dmitri Gribenko <gribozavr@gmail.com> Remove unsigned and a pointer from a comment token (so that each token can have only one semantic string value attached to it), at a cost of adding an additional token.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
f5e0aeac8a510ba1fd4c83391978cffd31e5ac69 27-Jun-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment lexer: counting backwards from token end is thought to be confusing. We already have a pointer to the beginning of the token, so use it to extract the text instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp
2d44d77fed3200e2eff289f55493317e90d3398c 26-Jun-2012 Dmitri Gribenko <gribozavr@gmail.com> Implement a lexer for structured comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/CommentLexer.cpp