Go to file
Ben Hamilton 788a2227b7 [clang-format] Improve detection of Objective-C block types
Summary:
Previously, clang-format would detect the following as an
Objective-C block type:

  FOO(^);

when it actually must be a C or C++ macro dealing with an XOR
statement or an XOR operator overload.

According to the Clang Block Language Spec:

https://clang.llvm.org/docs/BlockLanguageSpec.html

block types are of the form:

  int (^)(char, float)

and block variables of block type are of the form:

  void (^blockReturningVoidWithVoidArgument)(void);
  int (^blockReturningIntWithIntAndCharArguments)(int, char);
  void (^arrayOfTenBlocksReturningVoidWithIntArgument[10])(int);

This tightens up the detection so we don't unnecessarily detect
C macros which pass in the XOR operator.

Depends On D43904

Test Plan: New tests added. Ran tests with:
  make -j12 FormatTests &&
  ./tools/clang/unittests/Format/FormatTests

Reviewers: krasimir, jolesiak, djasper

Reviewed By: djasper

Subscribers: djasper, cfe-commits, klimek

Differential Revision: https://reviews.llvm.org/D43906

llvm-svn: 327285
2018-03-12 15:42:40 +00:00
clang [clang-format] Improve detection of Objective-C block types 2018-03-12 15:42:40 +00:00
clang-tools-extra [clangd] Revamp handling of diagnostics. 2018-03-12 15:28:22 +00:00
compiler-rt [Fuzzer] When building for Fuchsia, add an explicit libc++ dependency 2018-03-10 02:00:18 +00:00
debuginfo-tests [Darwin] Specify DWARF 2/4 when running apple accelerator tests. 2018-02-26 20:56:45 +00:00
libclc amdgcn/fmax: fcanonicalize operands 2018-03-08 23:01:01 +00:00
libcxx [CMake] Copy the generated __config header into build directory 2018-03-10 01:20:11 +00:00
libcxxabi [demangler] Simplify printing of structured bindings. 2018-03-10 22:33:49 +00:00
libunwind [libunwind][MIPS]: Add support for unwinding in N32 processes. 2018-02-27 21:24:02 +00:00
lld [ELF] - Formatted comment, fixed mistype. NFC. 2018-03-12 15:18:35 +00:00
lldb [lldb] Unbreak lldb builds due to r327219 2018-03-10 21:13:55 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm [X86][Btver2] Use JWriteResFpuPair wrapper for AES/CLMUL/HADD scheduler cases. NFCI. 2018-03-12 15:29:00 +00:00
openmp fix a typo on the website 2018-03-11 10:53:40 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly Revert untested changes in SCEVAffinator 2018-03-10 19:15:23 +00:00
README.md Add an svn project to contain the files that appear at the root of the 2017-10-19 21:09:49 +00:00

README.md

Low Level Virtual Machine (LLVM)

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.