Go to file
Ben Hamilton b060ad870f [clang-format] Don't detect C++11 attribute specifiers as ObjC
Summary:
Previously, clang-format would detect C++11 and C++17 attribute
specifiers like the following as Objective-C method invocations:

  [[noreturn]];
  [[clang::fallthrough]];
  [[noreturn, deprecated("so sorry")]];
  [[using gsl: suppress("type")]];

To fix this, I ported part of the logic from
tools/clang/lib/Parse/ParseTentative.cpp into TokenAnnotator.cpp so we
can explicitly parse and identify C++11 attribute specifiers.

This allows the guessLanguage() and getStyle() APIs to correctly
guess files containing the C++11 attribute specifiers as C++,
not Objective-C.

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

Reviewers: krasimir, jolesiak, djasper

Reviewed By: djasper

Subscribers: aaron.ballman, cfe-commits, klimek

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

llvm-svn: 327284
2018-03-12 15:42:38 +00:00
clang [clang-format] Don't detect C++11 attribute specifiers as ObjC 2018-03-12 15:42:38 +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.