summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index/CommentToXML.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Wdocumentation] Implement \anchorMark de Wever2019-12-211-0/+8
| | | | Differential revision: https://reviews.llvm.org/D69223
* Use llvm::stable_sortFangrui Song2019-04-241-5/+2
| | | | llvm-svn: 359098
* 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
* Fix clang -Wimplicit-fallthrough warnings across llvm, NFCReid Kleckner2018-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch should not introduce any behavior changes. It consists of mostly one of two changes: 1. Replacing fall through comments with the LLVM_FALLTHROUGH macro 2. Inserting 'break' before falling through into a case block consisting of only 'break'. We were already using this warning with GCC, but its warning behaves slightly differently. In this patch, the following differences are relevant: 1. GCC recognizes comments that say "fall through" as annotations, clang doesn't 2. GCC doesn't warn on "case N: foo(); default: break;", clang does 3. GCC doesn't warn when the case contains a switch, but falls through the outer case. I will enable the warning separately in a follow-up patch so that it can be cleanly reverted if necessary. Reviewers: alexfh, rsmith, lattner, rtrieu, EricWF, bollu Differential Revision: https://reviews.llvm.org/D53950 llvm-svn: 345882
* Print enum constant values using the original source formattingAlex Lorenz2017-08-171-0/+1
| | | | | | | | if possible when creating "Declaration" nodes in XML comments rdar://14765746 llvm-svn: 311085
* Delete unused IncompleteFormat variable, NFCi.Krasimir Georgiev2017-04-201-3/+1
| | | | llvm-svn: 300841
* [clang-format] Add a new flag FixNamespaceComments to FormatStyleKrasimir Georgiev2017-03-011-2/+4
| | | | | | | | | | | | | | | | Summary: This patch enables namespace end comments under a new flag FixNamespaceComments, which is enabled for the LLVM and Google styles. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30405 llvm-svn: 296632
* Remove FormatContext from libClang as it is now unused.Daniel Jasper2016-11-081-24/+5
| | | | llvm-svn: 286279
* Revert "Remove now unnecessary FormatRewriterContext."Daniel Jasper2016-11-081-0/+2
| | | | | | | This reverts commit r286262. I accidentally committed it without all of the changes. llvm-svn: 286264
* Remove now unnecessary FormatRewriterContext.Daniel Jasper2016-11-081-2/+0
| | | | llvm-svn: 286262
* [clang-format] Remove (SourceManager, FileID) variantsDaniel Jasper2016-11-081-13/+13
| | | | | | | | | | | | | In Format, remove the reformat() and clean() functions taking a SourceManager and a FileID. Keep the versions taking StringRef Code. - there was duplicated functionality - the FileID versions were harder to use - the clean() version is dead code anyways Patch by Krasimir Georgiev. Thank you. llvm-svn: 286243
* Reduce the number of implicit StringRef->std::string conversions by ↵Benjamin Kramer2016-02-131-3/+2
| | | | | | | | threading StringRef through more APIs. No functionality change intended. llvm-svn: 260815
* Roll-back r250822.Angel Garcia Gomez2015-10-201-1/+1
| | | | | | | | | | Summary: It breaks the build for the ASTMatchers Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D13893 llvm-svn: 250827
* Apply modernize-use-default to clang.Angel Garcia Gomez2015-10-201-1/+1
| | | | | | | | | | | | Summary: Replace empty bodies of default constructors and destructors with '= default'. Reviewers: bkramer, klimek Subscribers: klimek, alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13890 llvm-svn: 250822
* Replace double negation of !FileID.isInvalid() with FileID.isValid().Yaron Keren2015-10-031-1/+1
| | | | | | +couple more of double-negated !SourceLocation.isInvalid() unfixed in r249228. llvm-svn: 249235
* Remove and forbid raw_svector_ostream::flush() calls.Yaron Keren2015-08-131-3/+0
| | | | | | | | | | After r244870 flush() will only compare two null pointers and return, doing nothing but wasting run time. The call is not required any more as the stream and its SmallString are always in sync. Thanks to David Blaikie for reviewing. llvm-svn: 244928
* Format: ArrayRefize some implicit copies away.Benjamin Kramer2014-10-031-3/+2
| | | | | | NFC. llvm-svn: 219000
* clang-format: [JS] Support regex literals with trailing escaped slash.Daniel Jasper2014-09-091-6/+1
| | | | | | | | | | | | | | | | | | Before: var regex = / a\//; int i; After: var regex = /a\//; int i; This required pushing the Lexer into its wrapper class and generating a new one in this specific case. Otherwise, the sequence get lexed as a //-comment. This is hacky, but I don't know a better way (short of supporting regex literals in the Lexer). Pushing the Lexer down seems to make all the call sites simpler. llvm-svn: 217444
* [C++11] Use 'nullptr'.Craig Topper2014-05-261-2/+2
| | | | llvm-svn: 209612
* Comment parsing: remove HTML attribute validationDmitri Gribenko2014-04-301-4/+4
| | | | | | | | | | | | 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
* CommentToXMLConverter: Don't use "default" to method(s). It is unavailable ↵NAKAMURA Takumi2014-04-241-1/+1
| | | | | | in msc17. llvm-svn: 207107
* Comment to XML conversion: use unique_ptr for SimpleFormatContextDmitri Gribenko2014-04-241-10/+6
| | | | llvm-svn: 207087
* Fix leak introduced in r194610, found by LSan.Nico Weber2014-04-231-0/+4
| | | | | | | | | | LSan folks: LSan pointed to #0 0x4953e0 in operator new[](unsigned long) llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:64 #1 0x7fb82af5372f in clang::RewriteRope::MakeRopeString(char const*, char const*) llvm/tools/clang/lib/Rewrite/Core/RewriteRope.cpp:796 instead of to the actual leak, which made tracking this down slower than it could have been. llvm-svn: 207031
* Comment parsing: close a hole in CDATA escaping in XML outputDmitri Gribenko2014-04-221-3/+33
| | | | llvm-svn: 206886
* Comment parsing: in the generated XML file, mark HTML that is safe to passDmitri Gribenko2014-04-221-2/+8
| | | | | | | | | | | 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
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-071-1/+1
| | | | | | | encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well. llvm-svn: 198686
* Documentation parsing: move comment-to-XML conversion routines to libIndexDmitri Gribenko2013-11-131-0/+1136
llvm-svn: 194610
OpenPOWER on IntegriCloud