Bug 1612274 - Add checker readability-qualified-auto for clang-tidy static-analysis. r=sylvestre

Differential Revision: https://phabricator.services.mozilla.com/D70481

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andi-Bogdan Postelnicu 2020-04-10 07:06:09 +00:00
parent 36b3aabb21
commit 8731a55350
3 changed files with 9 additions and 0 deletions

View File

@ -247,6 +247,8 @@ clang_checkers:
reliability: high
- name: readability-non-const-parameter
reliability: high
- name: readability-qualified-auto
reliability: high
- name: readability-redundant-control-flow
reliability: high
- name: readability-redundant-preprocessor

View File

@ -0,0 +1,6 @@
typedef int *MyPtr;
MyPtr getPtr();
void foo() {
auto TdNakedPtr = getPtr();
}

View File

@ -0,0 +1 @@
[["warning", "'auto TdNakedPtr' can be declared as 'auto *TdNakedPtr'", "readability-qualified-auto"], {"reliability": "high"}]