| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This check verifies if buffer type and MPI (Message Passing Interface)
datatype pairs match. All MPI datatypes defined by the MPI standard (3.1)
are verified by this check. User defined typedefs, custom MPI datatypes and
null pointer constants are skipped, in the course of verification.
Instructions on how to apply the check can be found at: https://github.com/0ax1/MPI-Checker/tree/master/examples
Reviewers: alexfh
Subscribers: cfe-commits
Projects: #clang-tools-extra
Patch by Alexander Droste!
Differential Revision: https://reviews.llvm.org/D21962
llvm-svn: 276640
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Although there is no guarantee of getOptions/getRawOptions receiving an
absolute path, we try to make it if possible. So FileOptionProvider subclasses
don't have to convert the path to an absolute path.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D22154
llvm-svn: 275051
|
|
|
|
|
|
| |
With minor manual tweaks. No functionality change intended.
llvm-svn: 272795
|
|
|
|
|
|
| |
http://reviews.llvm.org/D18136
llvm-svn: 268079
|
|
|
|
|
|
| |
enabled.
llvm-svn: 267697
|
|
|
|
|
|
|
|
|
|
|
|
| |
comes from.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D18694
llvm-svn: 267683
|
|
|
|
| |
llvm-svn: 260065
|
|
|
|
|
|
|
|
|
| |
Similar in format to the `-checks=` argument, this new `-warnings-as-errors=`
argument upgrades any warnings emitted by the former to errors.
http://reviews.llvm.org/D15528
llvm-svn: 257642
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
module in ClangTidy
Summary:
The patch adds a new ClangTidy check that detects when expensive-to-copy types are unnecessarily copy initialized from a const reference that has the same or are larger scope than the copy.
It currently only detects this when the copied variable is const qualified. But this will be extended to non const variables if they are only used in a const fashion.
Reviewers: alexfh
Subscribers: cfe-commits
Patch by Felix Berger!
Differential Revision: http://reviews.llvm.org/D15623
llvm-svn: 256632
|
|
|
|
|
|
|
|
| |
those guidelines: cppcoreguidelines-pro-type-reinterpret-cast.
Patch by Matthias Gehre!
llvm-svn: 249399
|
|
|
|
|
|
| |
existing checkers to CERT secure coding rules and recommendations for both C (https://www.securecoding.cert.org/confluence/display/c/SEI+CERT+C+Coding+Standard) and C++ (https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=637).
llvm-svn: 249130
|
|
|
|
| |
llvm-svn: 247792
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix LoopConvertCheck bug: StringRef to temporaries.
Also add LLVM_ATTRIBUTE_UNUSED to ModernizeModuleAnchorDestination.
http://reviews.llvm.org/D12157
Patch by Angel Garcia!
llvm-svn: 245458
|
|
|
|
| |
llvm-svn: 245215
|
|
|
|
|
|
|
|
|
|
|
|
| |
Initialize CommonOptionsParser with ZeroOrOne NumOccurrenceFlag so callers can
pass -list-checks without the need to pass additional positional parameters,
then add dummy file if none were supplied.
http://reviews.llvm.org/D12070
Patch by Don Hinton!
llvm-svn: 245205
|
|
|
|
|
|
|
|
|
|
| |
This is the first step for migrating cppmodernize to clang-tidy.
http://reviews.llvm.org/D11946
Patch by Angel Garcia!
llvm-svn: 245045
|
|
|
|
| |
llvm-svn: 244329
|
|
|
|
|
|
| |
from the documentation, and removes shell-specific single quote characters as they cause issues for some shells (such as on Windows).
llvm-svn: 243266
|
|
|
|
|
|
| |
Also purge dead code found by it. NFC.
llvm-svn: 232948
|
|
|
|
| |
llvm-svn: 223777
|
|
|
|
|
|
| |
Fixed incorrect examples of configuration, clarified the usage of -dump-config.
llvm-svn: 223235
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Added -fix-errors option to allow applying fixes when compiler errors
are present. Without this flag -fix would bail out if there are compiler errors.
This is needed to avoid applying wrong fixes if Clang fails to recover from
compilation errors correctly.
Reviewers: djasper, klimek
Reviewed By: klimek
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D6059
llvm-svn: 221152
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Enable only compiler diagnostics and safe static analyzer checks by
default. Let the defaults be conservative and safe for an average project.
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6027
llvm-svn: 220865
|
|
|
|
|
|
|
| |
Added -system-headers option to allow display of warnings from system headers.
This is needed for testing libcxx, for example.
llvm-svn: 220826
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Register readability checks in a separate module. Renamed the checks
and test file names accordingly.
Reviewers: djasper, klimek
Reviewed By: klimek
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D5936
llvm-svn: 220631
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add flag --enable-check-profile to clang-tidy.
It turns on per-matcher profiles in MatchFinder and prints a report to
stderr at the end.
Reviewers: alexfh
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D5937
llvm-svn: 220491
|
|
|
|
| |
llvm-svn: 218512
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add -config option to allow specifying configuration in YAML/JSON
format on the command line.
Reviewers: klimek
Reviewed By: klimek
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D5501
llvm-svn: 218511
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This adds the ClangTidyOptions::User field and fills it from the USER
or the USERNAME environment variable, if possible. The FileOptionsProvider now
takes "default" options instead of "fallback" options, as it now uses these when
an option is not set in the configuration file (one exception is the checks
list).
Reviewers: bkramer, klimek
Reviewed By: klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5440
llvm-svn: 218402
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Each check can implement readOptions and storeOptions methods to read
and store custom options. Each check's options are stored in a local namespace
to avoid name collisions and provide some sort of context to the user.
Reviewers: bkramer, klimek
Reviewed By: klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5296
llvm-svn: 217661
|
|
|
|
| |
llvm-svn: 217493
|
|
|
|
| |
llvm-svn: 217163
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This adds a support for the .clang-tidy file reading using
FileOptionsProvider, -dump-config option, and changes tests to not depend on
default checks set.
Reviewers: klimek, bkramer, djasper
Reviewed By: djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5186
llvm-svn: 217155
|
|
|
|
|
|
|
|
| |
Allows gathering fixes and applying them with clang-apply-fixes.
Differential Revision: http://reviews.llvm.org/D5176
llvm-svn: 217139
|
|
|
|
| |
llvm-svn: 210776
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch makes it possible for clang-tidy clients to provide
different options for different translation units. The option, which doesn't
make sense to be file-dependent, was moved to a separate ClangTidyGlobalOptions
struct. Added parsing of ClangTidyOptions.
Reviewers: klimek
Reviewed By: klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3979
llvm-svn: 210260
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This seems like a more appropriate reaction to the user specifying a
single check with a wrong name, for example.
Reviewers: klimek
Reviewed By: klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3981
llvm-svn: 210043
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This is going to be used for a clang-tidy-diff script to display
warnings in changed lines only. The option uses JSON, as its value is not
intended to be entered manually.
Reviewers: klimek
Reviewed By: klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3873
llvm-svn: 209450
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Handle various forms of existing namespace closing comments, fix
existing comments with wrong namespace name, ignore short namespaces.
The state of this check now seems to be enough to enable it by default to gather
user feedback ;)
Reviewers: klimek
Reviewed By: klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3825
llvm-svn: 209141
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Updated the help message, updated description of -checks=, removed
mentions of -disable-checks.
Reviewers: klimek
Reviewed By: klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3793
llvm-svn: 208979
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Make checks filtering more intuitive and easy to use. Remove
-disable-checks and change the format of -checks= to a comma-separated list of
globs with optional '-' prefix to denote exclusion. The -checks= option is now
cumulative, so it modifies defaults, not overrides them. Each glob adds or
removes to the current set of checks, so the filter can be refined or overriden
by adding globs.
Example:
The default value for -checks= is
'*,-clang-analyzer-alpha*,-llvm-include-order,-llvm-namespace-comment,-google-*',
which allows all checks except for the ones named clang-analyzer-alpha* and
others specified with the leading '-'. To allow all google-* checks one can
write:
clang-tidy -checks=google-* ...
If one needs only google-* checks, we first need to remove everything (-*):
clang-tidy -checks=-*,google-*
etc.
I'm not sure if we need to change something here, so I didn't touch the docs
yet.
Reviewers: klimek, alexfh
Reviewed By: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3770
llvm-svn: 208883
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
array. This simplifies usage of ClangTidyContext a bit and seems to be more
consistent.
Reviewers: klimek
Reviewed By: klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3685
llvm-svn: 208407
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Also displays a hint to use -header-filter='.*' in case any warnings
are in non-user code. This will help discoverability of this option.
Reviewers: klimek
Reviewed By: klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3621
llvm-svn: 208174
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add clang-tidy -header-filter option to specify from which headers we
want diagnostics to be printed. By default we don't print diagnostics from
headers. We always print diagnostics from the main file of each translation
unit.
Reviewers: djasper, klimek
Reviewed By: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D3590
llvm-svn: 207970
|
|
|
|
|
|
|
|
|
|
|
|
| |
(workaround for bug 15599).
Reviewers: alexfh
Subscribers: jordan_rose, klimek, djasper, cfe-commits
Differential Revision: http://reviews.llvm.org/D3556
llvm-svn: 207652
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3544
llvm-svn: 207532
|
|
|
|
| |
llvm-svn: 207490
|
|
|
|
|
|
|
|
| |
Also make tests slightly less dependent on default flags. Once we have
implemented configuration file support, we might want to store the
clang-tidy configuration for the tests there.
llvm-svn: 205408
|
|
|
|
|
|
|
|
| |
The goal is to be able to run clang-tidy on LLVM files without further
configuration for now. Once llvm.org/PR19306 is addressed, we can add a
configuration file instead and choose other defaults.
llvm-svn: 205407
|
|
|
|
| |
llvm-svn: 202970
|