llvm-project/clang/unittests
Martin Probst 02656f29ab clang-format: [JS] options for arrow functions.
Summary:
clang-format currently always wraps the body of non-empty arrow
functions:

    const x = () => {
      z();
    };

This change implements support for the `AllowShortLambdasOnASingleLine`
style options, controlling the indent style for arrow function bodies
that have one or fewer statements. SLS_All puts all on a single line,
SLS_Inline only arrow functions used in an inline position.

    const x = () => { z(); };

Multi-statement arrow functions continue to be wrapped. Function
expressions (`a = function() {}`) and function/method declarations are
unaffected as well.

Reviewers: krasimir

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D73335
2020-01-27 16:27:25 +01:00
..
AST Fix the invisible-traversal to ignore more nodes 2020-01-20 11:59:13 +00:00
ASTMatchers [ASTMatchers] Fix parent traversal with InitListExpr 2020-01-27 11:19:59 +00:00
Analysis [DataFlow] Factor two worklist implementations out 2020-01-17 08:11:15 -08:00
Basic [clang] Fix out-of-bounds memory access in ComputeLineNumbers 2020-01-10 11:22:41 -08:00
CodeGen Removed PointerUnion3 and PointerUnion4 aliases in favor of the variadic template 2020-01-14 18:56:29 +01:00
CrossTU [Tooling] Migrated APIs that take ownership of objects to unique_ptr 2019-08-30 09:29:34 +00:00
DirectoryWatcher Use ASSERT_THAT_ERROR instead of logAllUnhandledErrors/exit 2019-08-09 06:14:54 +00:00
Driver [Clang] Bypass distro detection on non-Linux hosts 2019-11-28 17:02:06 -05:00
Format clang-format: [JS] options for arrow functions. 2020-01-27 16:27:25 +01:00
Frontend [modules] Do not cache invalid state for modules that we attempted to load. 2020-01-16 17:12:41 -08:00
Index [clang][index] Index the injected class name types. 2020-01-22 10:07:54 +01:00
Lex [clang-scan-deps] do not skip empty #if/#elif in the minimizer to avoid missing `__has_include` dependencies 2019-12-02 18:47:22 -08:00
Rename cmake: Add CLANG_LINK_CLANG_DYLIB option 2019-07-03 22:45:55 +00:00
Rewrite [Rewrite][NFC] Add FIXMEs and tests for RemoveLineIfEmpty bug 2019-08-15 21:17:48 +00:00
Sema [CodeComplete] Fix a crash in preferred type and signature help 2019-12-11 09:43:28 +01:00
Serialization [modules] Do not cache invalid state for modules that we attempted to load. 2020-01-16 17:12:41 -08:00
StaticAnalyzer [analyzer][NFC] Fix inconsistent references to checkers as "checks" 2019-09-12 19:09:24 +00:00
Tooling [libTooling] Fix bug in Stencil handling of macro ranges 2020-01-17 12:11:25 -05:00
libclang Revert "[Support] make report_fatal_error `abort` instead of `exit`" 2020-01-15 17:52:25 -08:00
CMakeLists.txt [clang] [unittest] Import LLVMTestingSupport if necessary 2019-09-12 13:06:12 +00:00