aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Format/TokenAnalyzer.h
AgeCommit message (Collapse)AuthorFilesLines
2021-11-19Make clang-format fuzz through Lexing with asserts enabled.Manuel Klimek1-2/+10
Makes clang-format bail out if an in-memory source file with an unsupported BOM is handed in instead of creating source locations that are violating clang's assumptions. In the future, we should add support to better transport error messages like this through clang-format instead of printing to stderr and not creating any changes.
2019-04-18[clang-format] Remove unused Environment constructor.Alexander Kornienko1-4/+0
llvm-svn: 358630
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth1-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
2018-05-09Add SourceManagerForFile helper which sets up SourceManager and dependencies ↵Eric Liu1-35/+14
for a single file with code snippet Summary: This can be used to create a virtual environment (incl. VFS, source manager) for code snippets. Reviewers: sammccall, klimek Reviewed By: sammccall Subscribers: klimek, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D46176 llvm-svn: 331923
2018-05-09Remove \brief commands from doxygen comments.Adrian Prantl1-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
2017-10-30[clang-format] Format raw string literalsKrasimir Georgiev1-8/+39
Summary: This patch adds raw string literal formatting. Reviewers: djasper, klimek Reviewed By: klimek Subscribers: klimek, mgorny Differential Revision: https://reviews.llvm.org/D35943 llvm-svn: 316903
2016-12-19[Format] Remove dead code.Benjamin Kramer1-3/+0
No functionality change. llvm-svn: 290135
2016-11-29Removed DEBUG_TYPE from TokenAnalyzer.hKrasimir Georgiev1-2/+0
Summary: Defining DEBUG_TYPE in a header file doesn't make sense. It is already defined in the corresponding source file. Reviewers: klimek, ioeric Subscribers: klimek Differential Revision: https://reviews.llvm.org/D27164 llvm-svn: 288125
2016-09-02clang-format: [JS] merge requoting replacements.Martin Probst1-1/+1
Summary: When formatting source code that needs both requoting and reindentation, merge the replacements to avoid erroring out for conflicting replacements. Also removes the misleading Replacements parameter from the TokenAnalyzer API. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D24155 llvm-svn: 280487
2016-05-20clang-format: [JS] sort ES6 imports.Martin Probst1-0/+108
Summary: This change automatically sorts ES6 imports and exports into four groups: absolute imports, parent imports, relative imports, and then exports. Exports are sorted in the same order, but not grouped further. To keep JS import sorting out of Format.cpp, this required extracting the TokenAnalyzer infrastructure to separate header and implementation files. Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D20198 llvm-svn: 270203