-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CLI] Fix double clang-tidy config flags
`clang-tidy` can be given config options via --analyzer-config and -config in --tidyargs. --analyzer-config also has a default value, so in case --tidyargs also contains a -config flag then both is given to clang-tidy which thus fails.
- Loading branch information
Showing
8 changed files
with
72 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
analyzer/tests/functional/analyze/test_files/extra_args.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include <functional> | ||
|
||
int add(int x, int y) { return x + y; } | ||
|
||
int main() | ||
{ | ||
#ifdef TIDYARGS | ||
int i = 1 / 0; | ||
#endif | ||
|
||
#ifdef SAARGS | ||
int* p = 0; | ||
*p = 42; | ||
#endif | ||
|
||
int x = 2; | ||
auto clj = std::bind(add, x, std::placeholders::_1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
--extra-arg=-DTIDYARGS | ||
--extra-arg=-DTIDYARGS '-config={"Checks": "modernize-*"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters