Commit Graph

10 Commits

Author SHA1 Message Date
Alexander Kornienko 9f58fe08bf Remove deprecated methods ast_matchers::BoundNodes::{getStmtAs,getDeclAs}
llvm-svn: 289542
2016-12-13 16:19:19 +00:00
Mandeep Singh Grang 7c7ea7d0ae [clang-tools-extra] Format sources with clang-format. NFC.
Summary:
Ran clang-format on all .c/.cpp/.h files in clang-tools-extra.
Excluded the test, unittests, clang-reorder-fields, include-fixer, modularize and pptrace directories.

Reviewers: klimek, alexfh

Subscribers: nemanjai

Tags: #clang-tools-extra

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

llvm-svn: 286221
2016-11-08 07:50:19 +00:00
Piotr Padlewski e93a73fb7a [ASTMatchers] Added ignoringParenImpCasts to has matchers
has matcher changed behaviour, and now it matches "as is" and
doesn't skip implicit and paren casts

http://reviews.llvm.org/D20801

llvm-svn: 271289
2016-05-31 15:26:56 +00:00
Etienne Bergeron e15ef2f609 [clang-tidy] Lift common matchers to utils namespace
Summary:
This patch is lifting matchers used by more than one checkers
to the common namespace.

Reviewers: aaron.ballman, alexfh

Subscribers: aaron.ballman, cfe-commits

Differential Revision: http://reviews.llvm.org/D19841

llvm-svn: 269804
2016-05-17 19:36:09 +00:00
Etienne Bergeron 456177b98f [clang-tidy] Cleaning namespaces to be more consistant across checkers.
Summary:
The goal of the patch is to bring checkers in their appropriate namespace.
This path doesn't change any behavior.

Reviewers: alexfh

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D19811

llvm-svn: 268264
2016-05-02 18:00:29 +00:00
Etienne Bergeron 9d26599078 [clang-tidy] Cleanup some ast-matchers and lift some to utils.
Summary:
Little cleanup to lift-out and to remove some frequently used
ast-matchers.

Some of theses matchers are candidates to be lifted to ASTMatchers.h.

Reviewers: alexfh

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D19200

llvm-svn: 267003
2016-04-21 16:57:56 +00:00
Gabor Horvath 5273f615c4 [clang-tidy] Extension of checker misc-misplaced-widening-cast
Summary:
Existing checker misc-misplaced-widening-cast was extended:
- New use cases: casted expression as lhs or rhs of a logical comparison or function argument
- New types: beside int, long and long long various char types, short and int128 added
- New option to check implicit casts: forgetting a cast is at least as common and as dangerous as misplacing it. This option can be disabled.

This patch depends on AST Matcher patches D17986 and D18243 and also contains fix for checker misc-bool-pointer-implicit-conversion needed because of the fix in the AST Matcher patch.

Reviewers: hokein, alexfh

Subscribers: o.gyorgy, xazax.hun, cfe-commits

Differential Revision: http://reviews.llvm.org/D17987

llvm-svn: 265532
2016-04-06 12:04:51 +00:00
Aaron Ballman b9ea09c445 Refactors AST matching code to use the new AST matcher names. This patch correlates to r247885 which performs the AST matcher rename in Clang.
llvm-svn: 247886
2015-09-17 13:31:25 +00:00
Alexander Kornienko 50d7f4617f [clang-tidy] Move user-defined matches to unnamed namespaces to prevent ODR violations.
llvm-svn: 239904
2015-06-17 13:11:37 +00:00
Alexander Kornienko 5b982e539d [clang-tidy] Refactor: Rename clang-tidy misc check files and classes to follow naming conventions
Classes are named WhateverCheck, files are named WhateverCheck.cpp and
WhateverCheck.h.

http://reviews.llvm.org/D8145

Patch by Richard Thomson!

llvm-svn: 231648
2015-03-09 11:48:54 +00:00