aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Index/CommentToXML.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-04-20Delete unused IncompleteFormat variable, NFCi.Krasimir Georgiev1-3/+1
llvm-svn: 300841
2017-03-01[clang-format] Add a new flag FixNamespaceComments to FormatStyleKrasimir Georgiev1-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
2016-11-08Remove FormatContext from libClang as it is now unused.Daniel Jasper1-24/+5
llvm-svn: 286279
2016-11-08Revert "Remove now unnecessary FormatRewriterContext."Daniel Jasper1-0/+2
This reverts commit r286262. I accidentally committed it without all of the changes. llvm-svn: 286264
2016-11-08Remove now unnecessary FormatRewriterContext.Daniel Jasper1-2/+0
llvm-svn: 286262
2016-11-08[clang-format] Remove (SourceManager, FileID) variantsDaniel Jasper1-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
2016-02-13Reduce the number of implicit StringRef->std::string conversions by ↵Benjamin Kramer1-3/+2
threading StringRef through more APIs. No functionality change intended. llvm-svn: 260815
2015-10-20Roll-back r250822.Angel Garcia Gomez1-1/+1
Summary: It breaks the build for the ASTMatchers Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D13893 llvm-svn: 250827
2015-10-20Apply modernize-use-default to clang.Angel Garcia Gomez1-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
2015-10-03Replace double negation of !FileID.isInvalid() with FileID.isValid().Yaron Keren1-1/+1
+couple more of double-negated !SourceLocation.isInvalid() unfixed in r249228. llvm-svn: 249235
2015-08-13Remove and forbid raw_svector_ostream::flush() calls.Yaron Keren1-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
2014-10-03Format: ArrayRefize some implicit copies away.Benjamin Kramer1-3/+2
NFC. llvm-svn: 219000
2014-09-09clang-format: [JS] Support regex literals with trailing escaped slash.Daniel Jasper1-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
2014-05-26[C++11] Use 'nullptr'.Craig Topper1-2/+2
llvm-svn: 209612
2014-04-30Comment parsing: remove HTML attribute validationDmitri Gribenko1-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
2014-04-24CommentToXMLConverter: Don't use "default" to method(s). It is unavailable ↵NAKAMURA Takumi1-1/+1
in msc17. llvm-svn: 207107
2014-04-24Comment to XML conversion: use unique_ptr for SimpleFormatContextDmitri Gribenko1-10/+6
llvm-svn: 207087
2014-04-23Fix leak introduced in r194610, found by LSan.Nico Weber1-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
2014-04-22Comment parsing: close a hole in CDATA escaping in XML outputDmitri Gribenko1-3/+33
llvm-svn: 206886
2014-04-22Comment parsing: in the generated XML file, mark HTML that is safe to passDmitri Gribenko1-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
2014-01-07Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth1-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
2013-11-13Documentation parsing: move comment-to-XML conversion routines to libIndexDmitri Gribenko1-0/+1136
llvm-svn: 194610