summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/CommentSema.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Wdocumentation] Implement \anchorMark de Wever2019-12-211-0/+1
| | | | Differential revision: https://reviews.llvm.org/D69223
* [Wdocumentation] Use C2x/C++14 deprecated attributeMark de Wever2019-12-101-10/+27
| | | | | | | | | This replaces the non-standard __attribute__((deprecated)) with the standard [[deprecated]] when compiling in C2x/C++14 mode. Discovered while looking at https://bugs.llvm.org/show_bug.cgi?id=43753 Differential Revision: https://reviews.llvm.org/D71141
* [Wdocumentation] Properly place deprecated attributeMark de Wever2019-12-101-5/+5
| | | | | | | | | | It is now placed before the function: - allows to replace __attribute__((deprecated)) with [[deprecated]]. - required for trailing returns. Fixes bug: https://bugs.llvm.org/show_bug.cgi?id=43753 Differential Revision: https://reviews.llvm.org/D71140
* [Wdocumentation] Use the command marker.Mark de Wever2019-12-101-3/+2
| | | | | | | | | Use the proper marker for -Wdocumentation-deprecated-sync instead of hard-coded the backslash. Discovered while looking at https://bugs.llvm.org/show_bug.cgi?id=43753 Differential Revision: https://reviews.llvm.org/D71139
* [Wdocumentation] fixes an assertion failure with typedefed function and ↵Dmitri Gribenko2019-09-021-0/+8
| | | | | | | | | | | | | | | | | | | | | block pointer Summary: The assertion happens when compiling with -Wdocumentation with variable declaration to a typedefed function pointer. I not too familiar with the ObjC syntax but first two tests assert without this patch. Fixes https://bugs.llvm.org/show_bug.cgi?id=42844 Reviewers: gribozavr Reviewed By: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66706 llvm-svn: 370677
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Port getLocEnd -> getEndLocStephen Kelly2018-08-091-4/+3
| | | | | | | | | | Reviewers: teemperor! Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50351 llvm-svn: 339386
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-091-1/+1
| | | | | | | | | | | | | | | | | | | This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 llvm-svn: 331834
* -Wdocumentation should allow '...' params in variadic function type aliasesAlex Lorenz2017-10-061-1/+9
| | | | | | rdar://34811344 llvm-svn: 315103
* -Wdocumentation should not check the @returns command for Objective-CAlex Lorenz2017-04-261-2/+4
| | | | | | | | | | | | | | | | function/block pointer properties The commit r300981 allowed @param/@return commands for function/block pointer property declarations. This meant that -Wdocumentation started warning about @return that was used to document properties whose function/block type returned void. However, prior to that commit, we allowed @return for all property declarations, because it can be used to document the value that's returned by the property getter. This commit restores the previous behaviour: now the @return command can be used to document all properties without warnings. rdar://24978538 llvm-svn: 301402
* [PR32667] -Wdocumentation should allow @param/@returns for fields/variablesAlex Lorenz2017-04-211-2/+26
| | | | | | | | | | | | | | | | that have a function/block pointer type This commit improves the -Wdocumentation warning by making sure that @param and @returns commands won't trigger warnings when used for fields, variables, or properties whose type is a function/block pointer type. The function/block pointer type must be specified directly with the declaration, and when a typedef is used the warning is still emitted. In the future we might also want to handle the std::function type as well. rdar://24978538 llvm-svn: 300981
* AST: improve layout of SimpleTypoCorrectorSaleem Abdulrasool2016-08-281-6/+5
| | | | | | | | | Add the "explicit" specifier to the single-argument constructor of SimpleTypoCorrector. Reorder the fields to remove excessive padding (8 bytes). Patch by Alexander Shaposhnikov! llvm-svn: 279946
* Fix some Clang-tidy readability-redundant-control-flow warnings; other minor ↵Eugene Zelenko2016-02-101-7/+4
| | | | | | | | fixes. Differential revision: http://reviews.llvm.org/D17060 llvm-svn: 260414
* [C++11] Use 'nullptr'. AST edition.Craig Topper2014-05-121-5/+6
| | | | llvm-svn: 208517
* Comment parsing: remove HTML attribute validationDmitri Gribenko2014-04-301-13/+8
| | | | | | | | | | | | Since the community says that a blacklist is not good enough, and I don't have enough time now to implement a proper whitelist, let's just remove the attribute validation. But, nevertheless, we can still communicate in the generated XML if our parser found an issue with the HTML. But this bit is best-effort and is specifically called out in the schema as such. llvm-svn: 207712
* Comment parsing: in the generated XML file, mark HTML that is safe to passDmitri Gribenko2014-04-221-4/+29
| | | | | | | | | | | through to the output even if the input comment comes from an untrusted source Attribute filtering is currently based on a blacklist, which right now includes all event handler attributes (they contain JavaScipt code). It should be switched to a whitelist, but going over all of the HTML5 spec requires a significant amount of time. llvm-svn: 206882
* Comment parsing: recognize \param ... on function templates with variadicDmitri Gribenko2014-03-191-1/+4
| | | | | | | | parameters Patch by Joe Ranieri. llvm-svn: 204235
* Comment parsing: don't crash while parsing \deprecated in a standalone commentDmitri Gribenko2014-01-271-2/+11
| | | | | | | | | | | (comment without a decl). I think this can not happen during normal compilation with -Wdocumentation, only while using Clang APIs to parse comments outside of a source file. Based on a patch by Olivier Goffart. llvm-svn: 200230
* Rename getResultType() on function and method declarations to getReturnType()Alp Toker2014-01-251-1/+1
| | | | | | | | | | | | | | | A return type is the declared or deduced part of the function type specified in the declaration. A result type is the (potentially adjusted) type of the value of an expression that calls the function. Rule of thumb: * Declarations have return types and parameters. * Expressions have result types and arguments. llvm-svn: 200082
* Fix strange indentation and remove trailing whitespace on empty linesDmitri Gribenko2013-12-171-10/+10
| | | | llvm-svn: 197513
* Avoid double StringMap lookups. No functionality change.Benjamin Kramer2013-11-101-5/+3
| | | | llvm-svn: 194355
* CommentSema: Factor code better. No functionality change.Benjamin Kramer2013-11-101-44/+28
| | | | llvm-svn: 194354
* Use pop_back_val() instead of both back() and pop_back().Robert Wilhelm2013-08-231-2/+1
| | | | | | No functionality change intended. llvm-svn: 189112
* Comment parsing: allow "\param ..." to describe variadic argumentsDmitri Gribenko2013-06-241-1/+19
| | | | | | | | Original patch by Fariborz Jahanian; extended by me. Fixes rdar://14124644 llvm-svn: 184688
* Move comment on Sema::isFunctionPointerVarDecl() to the header fileDmitri Gribenko2013-06-241-3/+1
| | | | llvm-svn: 184677
* Comment parsing: followup to r184610: allow multiple \returnsDmitri Gribenko2013-06-221-7/+1
| | | | | | | | | 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
* [document parsing]: Allow multiple adjacent \return and the likeFariborz Jahanian2013-06-211-3/+2
| | | | | | | commands. Render them properly in XML output. // rdar://14207725 llvm-svn: 184610
* documentation parsing: patch to make @class work forFariborz Jahanian2013-06-191-3/+21
| | | | | | | class templates; and similarly, @function works for function templates. // rdar://14124702 llvm-svn: 184329
* Revert r184249, "doc. parsing: Allow parameter name "..." for variadic ↵NAKAMURA Takumi2013-06-191-15/+1
| | | | | | | | | | | functions/methods." It crashes in the case; /// Without any "param"s in the description. int printf(const char *format, ...); llvm-svn: 184283
* doc. parsing: Allow parameter name "..." for variadic functions/methods.Fariborz Jahanian2013-06-181-1/+15
| | | | | | // rdar://14124644 llvm-svn: 184249
* doc. parsing. HeaderDoc documentaton allows use ofFariborz Jahanian2013-05-201-0/+5
| | | | | | | @class command on an @interface declaration. Turn off the warning for this case. // rdar://13927330 llvm-svn: 182334
* documentation comment parsing. Added couple of Fariborz Jahanian2013-03-181-2/+8
| | | | | | | | top-level HeaderDoc tags @functiongroup and @methodgroup to doc. tags recognized. // rdar://12379114 llvm-svn: 177358
* Documentation parsing. Some refactoring and codeFariborz Jahanian2013-03-081-36/+81
| | | | | | improvements per Dmtiri's comments. // rdar://12379114 llvm-svn: 176739
* HeaderDoc: Support more of HeaderDoc documentation Fariborz Jahanian2013-03-071-2/+100
| | | | | | | | commands; top level tags such as @interface and their 2nd level tags such as @coclass, etc. // rdar://12379114 llvm-svn: 176667
* say objective-C in the warning and streamlineFariborz Jahanian2013-03-061-9/+8
| | | | | | several diagnostics into one. // rdar://13094352 llvm-svn: 176560
* fix a missing check in my last patch.Fariborz Jahanian2013-03-051-3/+11
| | | | | | // rdar://13094352 llvm-svn: 176529
* doc. parsing. Improve on diagnostics on my last patch.Fariborz Jahanian2013-03-051-7/+19
| | | | | | // rdar://13094352. llvm-svn: 176525
* Fix this checkin.Fariborz Jahanian2013-03-051-1/+1
| | | | llvm-svn: 176510
* doc parsing. Add @method and @callback forFariborz Jahanian2013-03-051-3/+21
| | | | | | | checkings and few other refactoring/cleanup. // rdar://13094352. llvm-svn: 176509
* doc parsing. We want to issue a strong warning whenFariborz Jahanian2013-03-051-0/+9
| | | | | | | an @function comment is not followed by a function decl. // rdar://13094352 llvm-svn: 176468
* Comment parsing: refactor handling of command markers in ASTDmitri Gribenko2013-03-041-23/+29
| | | | | | | | | | | | | | | * 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. llvm-svn: 176461
* [comment parsing] source fidelity for tparam command too.Fariborz Jahanian2013-03-041-0/+1
| | | | | | // rdar://13066276 llvm-svn: 176448
* comment parsing. Missed a case of referringFariborz Jahanian2013-03-041-0/+1
| | | | | | to original command in diagnostic. // rdar://13066276 llvm-svn: 176444
* Some refactoring in my patch on documentFariborz Jahanian2013-03-021-12/+15
| | | | | | command source fidelity. // rdar://13066276 llvm-svn: 176401
* comment parsing. Keep the original command format Fariborz Jahanian2013-03-011-0/+6
| | | | | | | in AST for source fidelity and use it in diagnostics to refer to the original format. // rdar://13066276 llvm-svn: 176387
* comment parsing: Properties are considered like methods, and people Fariborz Jahanian2013-02-271-0/+11
| | | | | | | think of them as having return values that may be computed. Don't warn when using @return in their comment. // rdar://13189938 llvm-svn: 176147
* [Comment parsing] Add support for recognizingFariborz Jahanian2013-01-311-1/+8
| | | | | | | | \headerfile command and representing it in an xml document. Patch reviewed by Dmitri Gribenko. // rdar://12397511 llvm-svn: 174109
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-3/+3
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-1/+1
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't ↵Benjamin Kramer2012-12-011-1/+2
| | | | | | | | | pull in all the generated Attr code. Required to pull some functions out of line, but this shouldn't have a perf impact. No functionality change. llvm-svn: 169092
OpenPOWER on IntegriCloud