llvm-project/clang-tools-extra/test
Ben Hamilton 490811ec3f [clang-tidy] Function-scoped static variables should not trigger google-objc-global-variable-declaration
Summary:
google-objc-global-variable-declaration currently triggers on
valid code like:

  - (void)foo {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{ /* ... */ });
  }

The Google Objective-C style guide says:

http://google.github.io/styleguide/objcguide.html#common-variable-names

> File scope or global variables (as opposed to constants) declared
> outside the scope of a method or function should be rare, and should
> have the prefix g.

which is meant to insinuate that static variables inside a method or
function don't need a special name.

Test Plan: `make -j12 check-clang-tools`

Reviewers: Wizard, hokein, klimek

Reviewed By: Wizard

Subscribers: xazax.hun, cfe-commits

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

llvm-svn: 321914
2018-01-05 23:26:06 +00:00
..
Unit Resubmit "[lit] Force site configs to run before source-tree configs" 2017-09-15 22:10:46 +00:00
change-namespace [change-namepsace] make it possible to whitelist symbols so they don't get updated. 2017-02-24 11:54:45 +00:00
clang-apply-replacements [clang-tidy] Fixup clang-apply-replacements/invalid-files test 2017-07-25 14:39:08 +00:00
clang-move [clang-move] Extend clang-move to support moving global variable. 2017-02-27 13:19:13 +00:00
clang-query
clang-reorder-fields [clang-reorder-fields] Emit warning when reordering breaks member init list dependencies 2017-07-30 06:43:03 +00:00
clang-tidy [clang-tidy] Function-scoped static variables should not trigger google-objc-global-variable-declaration 2018-01-05 23:26:06 +00:00
clangd [clangd] Switch xrefs and documenthighlight to annotated-code unit tests. NFC 2017-12-20 16:06:05 +00:00
include-fixer [cmake] Support running extra clang tool tests without static analyzer 2017-08-29 05:58:08 +00:00
modularize Fixed some cases in the modularize assistant mode where header file names didn't translate to valid module names. 2016-03-21 23:05:14 +00:00
pp-trace Revert 318668, which is associated with a broken patch 2017-11-20 22:10:28 +00:00
.clang-format
CMakeLists.txt [clangd] Add a tool to build YAML-format global symbols. 2017-12-22 14:38:05 +00:00
lit.cfg Resubmit "[lit] Force site configs to run before source-tree configs" 2017-09-15 22:10:46 +00:00
lit.site.cfg.in [cmake] Support running extra clang tool tests without static analyzer 2017-08-29 05:58:08 +00:00