summaryrefslogtreecommitdiffstats
path: root/clang/test/Format/style-on-command-line.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Re-land Remove REQUIRES:shell from tests that pass for me on WindowsReid Kleckner2019-09-101-1/+1
| | | | | | | | | | | | This reverts r371497 (git commit 3d7e9ab7b9f8c53aa41420c54970f0fb421004a2) Reorder `not` with `env` in these two tests so they pass: Driver/rewrite-map-in-diagnostics.c Index/crash-recovery-modules.m. This will not be necessary after D66531 lands. llvm-svn: 371552
* Revert Remove REQUIRES:shell from tests that pass for me on WindowsJames Henderson2019-09-101-1/+1
| | | | | | This reverts r371478 (git commit a9980f60ce083fa6d5fd03c12c58ca0b293e3d60) llvm-svn: 371497
* Remove REQUIRES:shell from tests that pass for me on WindowsReid Kleckner2019-09-101-1/+1
| | | | | | | | | | | | | I see in the history for some of these tests REQUIRES:shell was used as a way to disable tests on Windows because they are flaky there. I tried not to re-enable such tests, but it's possible that I missed some and this will re-enable flaky tests on Windows. If so, we should disable them with UNSUPPORTED:system-windows and add a comment that they are flaky there. So far as I can tell, the lit internal shell is capable of running all of these tests, and we shouldn't use REQUIRES:shell as a proxy for Windows. llvm-svn: 371478
* [clang] Get rid of "%T" expansionsKuba Mracek2017-08-151-9/+10
| | | | | | | | | | The %T lit expansion expands to a common directory shared between all the tests in the same directory, which is unexpected and unintuitive, and more importantly, it's been a source of subtle race conditions and flaky tests. In https://reviews.llvm.org/D35396, it was agreed that it would be best to simply ban %T and only keep %t, which is unique to each test. When a test needs a temporary directory, it can just create one using mkdir %t. This patch removes %T in clang. Differential Revision: https://reviews.llvm.org/D36437 llvm-svn: 310950
* clang-format: remove tests that assume no config file will be found as this ↵Antonio Maiorano2017-01-231-11/+4
| | | | | | | | | | | | | is not always the case These tests fail for developers who place their build directories under the llvm root directory because llvm's own .clang-format file will be found. Anyway these cases are covered by FormatStyle.GetStyleOfFile tests (FormatTest.cpp). Differential Revision: https://reviews.llvm.org/D28983 llvm-svn: 292787
* [clang-format] Remove redundant test in style-on-command-line.cppKrasimir Georgiev2017-01-201-9/+6
| | | | | | | | | | | | | | | | | | | | | Summary: rL292562 added a fix to always format if the fallback style is set to "none". In test/Format/style-on-command-line.cpp:19 is redundant, since -fallback-style has a default value of LLVM set in ClangFormat.cpp:72. @amaiorano: I believe that the rest of the test cases still cover your change in case the fallback style is explicitly set to "none". Please, if this is not the case, initiate a discussion. Reviewers: ioeric, bkramer Reviewed By: ioeric Subscribers: cfe-commits, klimek, amaiorano Differential Revision: https://reviews.llvm.org/D28943 llvm-svn: 292604
* clang-format: fix fallback style set to "none" not always formattingAntonio Maiorano2017-01-201-0/+20
| | | | | | | | | | | This fixes clang-format not formatting if fallback-style is explicitly set to "none", and either a config file is found or YAML is passed in without a "BasedOnStyle". With this change, passing "none" in these cases will have no affect, and LLVM style will be used as the base style. Differential Revision: https://reviews.llvm.org/D28844 llvm-svn: 292562
* clang-format: Make GetStyle return Expected<FormatStyle> instead of FormatStyleAntonio Maiorano2017-01-171-8/+5
| | | | | | | | | | Change the contract of GetStyle so that it returns an error when an error occurs (i.e. when it writes to stderr), and only returns the fallback style when it can't find a configuration file. Differential Revision: https://reviews.llvm.org/D28081 llvm-svn: 292174
* clang-format: Use pipes instead of temporary files for most lit tests.Nico Weber2015-10-191-10/+9
| | | | | | | | | | | | | | | This makes the format tests look more like most other FileCheck tests in clang. The multiple-inputs tests still use temp files, to make sure that the file input code in clang-format stays tested. Stop stripping out the comment lines in style-on-command-line.cpp as they don't get in the way and it makes the test simpler. Also remove 2>&1s on the tests in that file that don't need it. http://reviews.llvm.org/D13852 llvm-svn: 250706
* Disable style-on-command-line test on WindowsReid Kleckner2015-06-091-0/+4
| | | | llvm-svn: 239416
* Remove rm invocations where the file is immediately rewritten later.Benjamin Kramer2015-06-091-3/+1
| | | | | | | This may or may not help making this test less flaky on windows. There's a race condition in lit somewhere. llvm-svn: 239402
* Remove error message when using the fallback style.Manuel Klimek2015-06-021-1/+0
| | | | llvm-svn: 238822
* clang-format: Introduce style with spaces on both sides of */&.Daniel Jasper2014-06-171-0/+4
| | | | | | | Patch by Janusz Sobczak (slightly extended). This fixes llvm.org/19929. llvm-svn: 211098
* Allow lowercase messages in this test again.Rafael Espindola2014-06-121-3/+3
| | | | | | I misunderstood where the message was being converted. llvm-svn: 210774
* Give clang-format its own error category.Rafael Espindola2014-06-121-3/+3
| | | | | | | | | The posix errno values are probably to the best thing to use for describing parse errors. This should also fix the mingw build. llvm-svn: 210739
* Accomodate for message differences on windows.Rafael Espindola2014-06-111-3/+3
| | | | llvm-svn: 210722
* clang-format: Explicitly set fallback style that is tested.Daniel Jasper2013-12-031-2/+2
| | | | llvm-svn: 196213
* Added an option to specify fallback style.Alexander Kornienko2013-12-021-2/+3
| | | | | | | | | | | | | | | | Summary: Added -fallback-style option. Changed clang-format to stop searching for .clang-format when an invalid file is found. Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2292 llvm-svn: 196108
* Disable this check temporarily.Bill Wendling2013-11-191-1/+1
| | | | | | | | | | | | | | | This is failing for me. When I run the command on my own, I get this: Error reading /usr/local/google/home/morbo/llvm/llvm.obj/tools/clang/test/Format/Output/.clang-format: Invalid argument void f() { int* i; int j; } The formatting is like this because I have the Google format version in my ~/.clang-format file. This test should be made independent of that. llvm-svn: 195080
* Allow _clang-format as alternative to .clang-format config filenameHans Wennborg2013-09-101-0/+5
| | | | | | | | | | | Dotfiles are impractical on Windows. This makes clang-format search for the style configuration file as '_clang-format' in addition to the usual '.clang-format'. This is similar to how VIM searches for '_vimrc' on Windows. Differential Revision: http://llvm-reviews.chandlerc.com/D1629 llvm-svn: 190413
* Trying to fix tests with in-tree builds, that contain a .clang-format files inAlexander Kornienko2013-09-021-2/+2
| | | | | | both tools/clang and llvm directories. llvm-svn: 189761
* Test for empty .clang-format file.Alexander Kornienko2013-09-021-0/+4
| | | | | | | | | | | | | | Summary: Test clang-format's handling of empty .clang-format files. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1562 llvm-svn: 189757
* Switch the default mode for clang-format to '-file'. Make 'LLVM' theChandler Carruth2013-09-021-5/+2
| | | | | | | | | | | | | | | | | | | fallback syntax used when we fail to find a '.clang-format' file. Adjust variable names appropriately. Update the editor integration pieces that specify a '-style' option to specify it as '-style=file'. I left the functionality in place because even if the preferred method is to use '.clang-format' files, this way if someone needs to clobber the style in their editor we show how to do so in these examples. Also check in a '.clang-format' file for Clang to ensure that separate checkouts and builds of Clang from LLVM can still get the nice formatting. =] This unfortunately required nuking the test for the absence of a '.clang-format' file as now the directory happening to be under your clang source tree will cause there to always be a file. ;] llvm-svn: 189741
* [tests] Use 'printf' instead of 'echo -e', which is not part of BSD echo.Daniel Dunbar2013-08-291-1/+1
| | | | llvm-svn: 189562
* Clang-format: allow -style="{yaml/json}" on command lineAlexander Kornienko2013-05-191-0/+23
Summary: + improved handling of default style and predefined styles. Reviewers: djasper, klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D813 llvm-svn: 182205
OpenPOWER on IntegriCloud