Go to file
Yan Zhang 2d83647007 [clang-tidy/google] Improve the Objective-C global variable declaration check 🔧
Summary:
The current Objective-C global variable declaration check restricts naming that is permitted by the Google Objective-C style guide.

The Objective-C style guide states the following:
"Global and file scope constants should have an appropriate prefix. [...] Constants may use a lowercase k prefix when appropriate"
http://google.github.io/styleguide/objcguide#constants

This change fixes the check to allow two or more capital letters as an appropriate prefix. This change intentionally avoids making a decision regarding whether to flag constants that use a two letter prefix (two letter prefixes are reserved by Apple¹ but many projects seem to violate this guideline).

This change eliminates an important category of false positives (constants prefixed with '[A-Z]{2,}') at the cost of introducing a less important category of false negatives (constants prefixed with only '[A-Z]'). The false positives are observed in standard recommended code while the false negatives occur in non-standard unrecommended code. The number of eliminated false positives is expected to be significantly larger than the number of exposed false negatives.

❧

(1)
"Two-letter prefixes like these are reserved by Apple for use in framework classes."
https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Conventions/Conventions.html

Reviewers: aaron.ballman, Wizard, hokein, benhamilton

Reviewed By: aaron.ballman, Wizard

Subscribers: aaron.ballman, cfe-commits

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

llvm-svn: 326046
2018-02-25 04:11:26 +00:00
clang [RISCV] Enable __int128_t and __uint128_t through clang flag 2018-02-25 03:58:23 +00:00
clang-tools-extra [clang-tidy/google] Improve the Objective-C global variable declaration check 🔧 2018-02-25 04:11:26 +00:00
compiler-rt [ubsan-minimal] Fix the ubsan_minimal debug build (COMPILER_RT_DEBUG=1) on macOS. 2018-02-24 13:14:44 +00:00
debuginfo-tests [Darwin] Add a test to make sure clang emits __apple accelerator tables. 2018-02-23 18:04:55 +00:00
libclc utils: Adapt to llvm r325155 2018-02-23 07:37:03 +00:00
libcxx Cleanup __config indention NFC 2018-02-24 07:57:32 +00:00
libcxxabi [demangler] Support for exception specifications on function types. 2018-02-14 01:08:20 +00:00
libunwind [cmake] [libunwind] LLVM_FOUND isn't always set, so just test if 2018-01-27 19:31:44 +00:00
lld [WebAssembly] Remove dead code. 2018-02-24 02:43:31 +00:00
lldb Delete dead code in MachVMMemory.cpp, NFC 2018-02-24 00:17:05 +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 [TargetLowering] SimplifyDemandedVectorElts - pass demanded elts through ADD/SUB ops 2018-02-24 20:59:14 +00:00
openmp [OMPT] Fix parallel_data in implicit barrier-end 2018-02-23 16:46:25 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly Use isl::manage_copy to simplify calls to isl::manage(isl_.._copy()) 2018-02-20 07:26:58 +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.