summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy
Commit message (Collapse)AuthorAgeFilesLines
...
* Recommit r360345 with fixes (was reverted in r360348).Aaron Ballman2019-05-101-0/+563
| | | | | | | | Add the modernize-use-trailing-return check to rewrite function signatures to use trailing return types. Patch by Bernhard Manfred Gruber. llvm-svn: 360438
* check_clang_tidy.py now passes `-format-style=none` to clang_tidyDmitri Gribenko2019-05-091-7/+19
| | | | | | | | | | | | | | | | | Summary: If the test does not specify a formatting style, force "none"; otherwise autodetection logic can discover a ".clang-tidy" file that is not related to the test. Reviewers: alexfh Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61739 llvm-svn: 360358
* Revert r360345 and r360346, as they are not passing the testbots.Aaron Ballman2019-05-091-563/+0
| | | | | | http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/48063/steps/test/logs/stdio llvm-svn: 360348
* Add the modernize-use-trailing-return check to rewrite function signatures ↵Aaron Ballman2019-05-091-0/+563
| | | | | | | | to use trailing return types. Patch by Bernhard Manfred Gruber. llvm-svn: 360345
* [clang-tidy] Do not show incorrect fix in modernize-make-uniqueIlya Biryukov2019-05-081-0/+8
| | | | | | | | | | | | | | | | | | Summary: The case when initialize_list hides behind an implicit case was not handled before. Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61642 llvm-svn: 360231
* [clang-tidy] Extend bugprone-sizeof-expression to check sizeof(pointers to ↵Adam Balogh2019-05-071-0/+12
| | | | | | | | | | | | structures) Accidentally taking the size of a struct-pointer type or a value of this type is more common than explicitly using the & operator for the value. This patch extends the check to include these cases. Differential Revision: https://reviews.llvm.org/D61260 llvm-svn: 360114
* [clang-tidy] Extend bugprone-sizeof-expression check to detect sizeof misuse ↵Adam Balogh2019-05-061-0/+29
| | | | | | | | | | | | | | | in pointer arithmetic Some programmers tend to forget that subtracting two pointers results in the difference between them in number of elements of the pointee type instead of bytes. This leads to codes such as `size_t size = (p - q) / sizeof(int)` where `p` and `q` are of type `int*`. Or similarily, `if (p - q < buffer_size * sizeof(int)) { ... }`. This patch extends `bugprone-sizeof-expression` to detect such cases. Differential Revision: https://reviews.llvm.org/D61422 llvm-svn: 360032
* [clang-tidy] openmp-exception-escape check: point to the structured-blockRoman Lebedev2019-05-051-7/+7
| | | | | | | | | | | | | I'm not sure what i was thinking when i wrote it to point at the directive. It's at the very least confusing, and in the `for` is very misleading. We should point at the actual Stmt out of which the exception escapes, to highlight where it should be fixed e.g. via adding try-catch block. Yes, this breaks existing NOLINT, which is why this change needs to happen now, not any later. llvm-svn: 360002
* Fixed: Duck-typing in readability-redundant-smartptr-get didn't catch MSVC ↵Florian Gross2019-05-021-0/+94
| | | | | | | | STL smart pointers. Differential Revision: https://reviews.llvm.org/D61209 llvm-svn: 359801
* [clang-tidy] Add new checker: llvm-prefer-isa-or-dyn-cast-in-conditionalsDon Hinton2019-04-241-0/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Looks at conditionals and finds cases of ``cast<>``, which will assert rather than return a null pointer, and ``dyn_cast<>`` where the return value is not captured. Additionally, finds cases that match the pattern ``var.foo() && isa<X>(var.foo())``, where the method is called twice and could be expensive. .. code-block:: c++ // Finds cases like these: if (auto x = cast<X>(y)) <...> if (cast<X>(y)) <...> // But not cases like these: if (auto f = cast<Z>(y)->foo()) <...> if (cast<Z>(y)->foo()) <...> Reviewers: alexfh, rjmccall, hokein, aaron.ballman, JonasToth Reviewed By: aaron.ballman Subscribers: xbolva00, Eugene.Zelenko, mgorny, xazax.hun, cfe-commits Tags: #clang-tools-extra, #clang Differential Revision: https://reviews.llvm.org/D59802 llvm-svn: 359142
* [clang-tidy] Address post-commit commentsHaojian Wu2019-04-181-0/+9
| | | | | | | | | | | | | | | | Summary: Also add a test to verify clang-tidy only apply the first alternative fix. Reviewers: alexfh Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60857 llvm-svn: 358666
* [clang-tidy] Don't issue cppcoreguidelines-macro-usage on builtin macrosAlexander Kornienko2019-04-171-1/+1
| | | | | | | | | | | | | | | | | Before the patch calling clang-tidy with -header-filter=.* -system-headers would result in a few hundred useless warnings: warning: macro '_GNU_SOURCE' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] warning: macro '_LP64' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] warning: macro '__ATOMIC_ACQUIRE' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] warning: macro '__ATOMIC_ACQ_REL' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] warning: macro '__ATOMIC_CONSUME' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] warning: macro '__ATOMIC_RELAXED' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] warning: macro '__ATOMIC_RELEASE' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] warning: macro '__ATOMIC_SEQ_CST' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] warning: macro '__BIGGEST_ALIGNMENT__' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] ... and so on llvm-svn: 358621
* [clang-tidy] Add a check for [super self] in initializers 🔍Stephane Moore2019-04-171-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This check aims to address a relatively common benign error where Objective-C subclass initializers call -self on their superclass instead of invoking a superclass initializer, typically -init. The error is typically benign because libobjc recognizes that improper initializer chaining is common¹. One theory for the frequency of this error might be that -init and -self have the same return type which could potentially cause inappropriate autocompletion to -self instead of -init. The equal selector lengths and triviality of common initializer code probably contribute to errors like this slipping through code review undetected. This check aims to flag errors of this form in the interests of correctness and reduce incidence of initialization failing to chain to -[NSObject init]. [1] "In practice, it will be hard to rely on this function. Many classes do not properly chain -init calls." From _objc_rootInit in https://opensource.apple.com/source/objc4/objc4-750.1/runtime/NSObject.mm.auto.html. Test Notes: Verified via `make check-clang-tools`. Subscribers: mgorny, xazax.hun, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59806 llvm-svn: 358620
* [clang-tidy] Fix invalid location in readability-misleading-indentation ↵Alexander Kornienko2019-04-171-2/+11
| | | | | | | | | | diagnostic Before this patch readability-misleading-indentation could issue diagnostics with an invalid location, which would lead to an assertion failure in ClangTidyContext::diag() llvm-svn: 358589
* [clang-tidy] Add fix descriptions to clang-tidy checks.Haojian Wu2019-04-171-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Motivation/Context: in the code review system integrating with clang-tidy, clang-tidy doesn't provide a human-readable description of the fix. Usually developers have to preview a code diff (before vs after apply the fix) to understand what the fix does before applying a fix. This patch proposes that each clang-tidy check provides a short and actional fix description that can be shown in the UI, so that users can know what the fix does without previewing diff. This patch extends clang-tidy framework to support fix descriptions (will add implementations for existing checks in the future). Fix descriptions and fixes are emitted via diagnostic::Note (rather than attaching the main warning diagnostic). Before this patch: ``` void MyCheck::check(...) { ... diag(loc, "my check warning") << FixtItHint::CreateReplacement(...); } ``` After: ``` void MyCheck::check(...) { ... diag(loc, "my check warning"); // Emit a check warning diag(loc, "fix description", DiagnosticIDs::Note) << FixtItHint::CreateReplacement(...); // Emit a diagnostic note and a fix } ``` Reviewers: sammccall, alexfh Reviewed By: alexfh Subscribers: MyDeveloperDay, Eugene.Zelenko, aaron.ballman, JonasToth, xazax.hun, jdoerfert, cfe-commits Tags: #clang-tools-extra, #clang Differential Revision: https://reviews.llvm.org/D59932 llvm-svn: 358576
* [clang-tidy] Add MagnitudeBitsUpperLimit option to ↵Tamas Zolnai2019-04-142-1/+28
| | | | | | | | | | | | | | | | | | | | | bugprone-too-small-loop-variable Summary: The bugprone-too-small-loop-variable check often catches loop variables which can represent "big enough" values, so we don't actually need to worry about that this variable will overflow in a loop when the code iterates through a container. For example a 32 bit signed integer type's maximum value is 2 147 483 647 and a container's size won't reach this maximum value in most of the cases. So the idea of this option to allow the user to specify an upper limit (using magnitude bit of the integer type) to filter out those catches which are not interesting for the user, so he/she can focus on the more risky integer incompatibilities. Next to the option I replaced the term "positive bits" to "magnitude bits" which seems a better naming both in the code and in the name of the new option. Reviewers: JonasToth, alexfh, aaron.ballman, hokein Reviewed By: JonasToth Subscribers: Eugene.Zelenko, xazax.hun, jdoerfert, cfe-commits Tags: #clang-tools-extra, #clang Differential Revision: https://reviews.llvm.org/D59870 llvm-svn: 358356
* [clang-tidy] Fix PR28406Alexander Kornienko2019-03-291-0/+7
| | | | | | | | Fix the crash resulting from a careless use of getLocWithOffset. At the beginning of a macro expansion it produces an invalid SourceLocation that causes an assertion failure later on. llvm-svn: 357312
* [clang-tidy] Handle missing yaml module in run-clang-tidy.pyZinovy Nis2019-03-272-0/+1
| | | | | | | | | | | | The Yaml module is missing on some systems and on many of clang buildbots. But the test for run-clang-tidy.py doesn't fail due to 'NOT' statement masking a python runtime error. This patch conditionally imports and enables the yaml module only if it's present in the system. If not, then '-export-fixes' is disabled. Differential Revision: https://reviews.llvm.org/D59734 llvm-svn: 357114
* [clang-tidy] Fix more false positives for bugprone-string-integer-assignmentClement Courbet2019-03-251-1/+41
| | | | | | | | | | | | | | | | | Summary: And add various tests gleaned for our codebase. See PR27723. Reviewers: JonasToth, alexfh, xazax.hun Subscribers: rnkovacs, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59360 llvm-svn: 356871
* [clang-tidy] openmp-exception-escape - a new checkRoman Lebedev2019-03-222-0/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Finally, we are here! Analyzes OpenMP Structured Blocks and checks that no exception escapes out of the Structured Block it was thrown in. As per the OpenMP specification, structured block is an executable statement, possibly compound, with a single entry at the top and a single exit at the bottom. Which means, ``throw`` may not be used to to 'exit' out of the structured block. If an exception is not caught in the same structured block it was thrown in, the behaviour is undefined / implementation defined, the program will likely terminate. Reviewers: JonasToth, aaron.ballman, baloghadamsoftware, gribozavr Reviewed By: aaron.ballman, gribozavr Subscribers: mgorny, xazax.hun, rnkovacs, guansong, jdoerfert, cfe-commits, ABataev Tags: #clang-tools-extra, #openmp, #clang Differential Revision: https://reviews.llvm.org/D59466 llvm-svn: 356802
* [clang-tidy] openmp-use-default-none - a new checkRoman Lebedev2019-03-221-0/+160
| | | | | | | | | | | | | | | | | | | | | | | Summary: Finds OpenMP directives that are allowed to contain `default` clause, but either don't specify it, or the clause is specified but with the kind other than `none`, and suggests to use `default(none)` clause. Using `default(none)` clause changes the default variable visibility from being implicitly determined, and thus forces developer to be explicit about the desired data scoping for each variable. Reviewers: JonasToth, aaron.ballman, xazax.hun, hokein, gribozavr Reviewed By: JonasToth, aaron.ballman Subscribers: jdoerfert, openmp-commits, klimek, sbenza, arphaman, Eugene.Zelenko, ABataev, mgorny, rnkovacs, guansong, cfe-commits Tags: #clang-tools-extra, #openmp, #clang Differential Revision: https://reviews.llvm.org/D57113 llvm-svn: 356801
* [clang-tidy] Expand modular headers for PPCallbacksAlexander Kornienko2019-03-225-0/+43
| | | | | | | | | | | | | | | | | | | | | | Summary: Add a way to expand modular headers for PPCallbacks. Checks can opt-in for this expansion by overriding the new registerPPCallbacks virtual method and registering their PPCallbacks in the preprocessor created for this specific purpose. Use module expansion in the readability-identifier-naming check Reviewers: gribozavr, usaxena95, sammccall Reviewed By: gribozavr Subscribers: nemanjai, mgorny, xazax.hun, kbarton, jdoerfert, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D59528 llvm-svn: 356750
* [clang-tidy] Disable google-runtime-int in Objective-C++ 🔓Stephane Moore2019-03-201-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In contrast to Google C++, Objective-C often uses built-in integer types other than `int`. In fact, the Objective-C runtime itself defines the types NSInteger¹ and NSUInteger² which are variant types depending on the target architecture. The Objective-C style guide indicates that usage of system types with variant sizes is appropriate when handling values provided by system interfaces³. Objective-C++ is commonly the result of conversion from Objective-C to Objective-C++ for the purpose of integrating C++ functionality. The opposite of Objective-C++ being used to expose Objective-C functionality to C++ is less common, potentially because Objective-C has a signficantly more uneven presence on different platforms compared to C++. This generally predisposes Objective-C++ to commonly being more Objective-C than C++. Forcing Objective-C++ developers to perform conversions between variant system types and fixed size integer types depending on target architecture when Objective-C++ commonly uses variant system types from Objective-C is likely to lead to more bugs and overhead than benefit. For that reason, this change proposes to disable google-runtime-int in Objective-C++. [1] https://developer.apple.com/documentation/objectivec/nsinteger?language=objc [2] https://developer.apple.com/documentation/objectivec/nsuinteger?language=objc [3] "Types long, NSInteger, NSUInteger, and CGFloat vary in size between 32- and 64-bit builds. Use of these types is appropriate when handling values exposed by system interfaces, but they should be avoided for most other computations." https://github.com/google/styleguide/blob/gh-pages/objcguide.md#types-with-inconsistent-sizes Subscribers: xazax.hun, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59336 llvm-svn: 356627
* [clang-tidy] Fix redundant check breaking the test on many platforms.Zinovy Nis2019-03-201-1/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D57662 llvm-svn: 356589
* Fixed global constant/variable naming check on C++ class for ObjC++ files.Yan Zhang2019-03-151-0/+10
| | | | | | | | | | Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59283 llvm-svn: 356220
* [clang-tidy] Add additional patterns to the ↵Hyrum Wright2019-03-142-12/+57
| | | | | | | | abseil-duration-unnecessary-conversion check. Differential Revision: https://reviews.llvm.org/D59183 llvm-svn: 356141
* [clang-tidy] NOLINT support for "clang-diagnostic-*".Haojian Wu2019-03-121-1/+2
| | | | | | | | | | | | | | Reviewers: alexfh, aaron.ballman Reviewed By: alexfh Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59255 llvm-svn: 355934
* [clang-tidy] Add the abseil-time-compare checkHyrum Wright2019-03-111-0/+129
| | | | | | | | | This is an analog of the abseil-duration-comparison check, but for the absl::Time domain. It has a similar implementation and tests. Differential Revision: https://reviews.llvm.org/D58977 llvm-svn: 355835
* [clang-tidy] Fix bugprone-string-constructor crashAlexander Kornienko2019-03-051-0/+8
| | | | llvm-svn: 355401
* [clang-tidy] add OverrideMacro to modernize-use-override checkPaul Hoad2019-02-282-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The usefulness of **modernize-use-override** can be reduced if you have to live in an environment where you support multiple compilers, some of which sadly are not yet fully C++11 compliant some codebases have to use override as a macro OVERRIDE e.g. ``` // GCC 4.7 supports explicit virtual overrides when C++11 support is enabled. ``` This allows code to be compiled with C++11 compliant compilers and get warnings and errors that clang, MSVC,gcc can give, while still allowing other legacy pre C++11 compilers to compile the code. This can be an important step towards modernizing C++ code whilst living in a legacy codebase. When it comes to clang tidy, the use of the **modernize-use-override** is one of the most useful checks, but the messages reported are inaccurate for that codebase if the standard approach is to use the macros OVERRIDE and/or FINAL. When combined with fix-its that introduce the C++11 override keyword, they become fatal, resulting in the modernize-use-override check being turned off to prevent the introduction of such errors. This revision, allows the possibility for the replacement **override **to be a macro instead, Allowing the clang-tidy check to be run on both pre and post C++11 code, and allowing fix-its to be applied. Reviewers: alexfh, JonasToth, hokein, Eugene.Zelenko, aaron.ballman Reviewed By: alexfh, JonasToth Subscribers: lewmpk, malcolm.parsons, jdoerfert, xazax.hun, cfe-commits, llvm-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D57087 llvm-svn: 355132
* [clang-tidy] added cppcoreguidelines-explicit-virtual-functionsJonas Toth2019-02-281-0/+16
| | | | | | | | | | | | Addresses the bugzilla bug #30397. (https://bugs.llvm.org/show_bug.cgi?id=30397) modernize-use-override suggests that destructors require the override specifier and the CPP core guidelines do not recommend this. Patch by lewmpk. Differential Revision: https://reviews.llvm.org/D58731 llvm-svn: 355093
* [clang-tidy] bugprone-string-integer-assignment: Reduce false positives.Clement Courbet2019-02-281-0/+7
| | | | | | | | | | | | | | Summary: Detect a few expressions as likely character expressions, see PR27723. Reviewers: xazax.hun, alexfh Subscribers: rnkovacs, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58609 llvm-svn: 355089
* [clang-tidy] misc-string-integer-assignment: fix false positiveClement Courbet2019-02-281-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: using CodePoint = uint32_t; CodePoint cp; basic_string<CodePoint> s; s += cp; See PR27723. Reviewers: xazax.hun, alexfh Subscribers: rnkovacs, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58606 llvm-svn: 355076
* [clang-tidy] Add the abseil-time-subtraction checkHyrum Wright2019-02-272-0/+119
| | | | | | Differential Revision: https://reviews.llvm.org/D58137 llvm-svn: 355024
* [clang-tidy] misc-string-integer-assignment: ignore toupper/tolowerClement Courbet2019-02-251-0/+9
| | | | | | | | | | | | | | Summary: Tis represents ~20% of false positives. See PR27723. Reviewers: xazax.hun, alexfh Subscribers: rnkovacs, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58604 llvm-svn: 354780
* [clang-tidy] Make google-objc-function-naming ignore implicit functions 🙈Stephane Moore2019-02-212-1/+27
| | | | | | | | | | | | | | | | | | | | | | Summary: Implicit functions are outside the control of source authors and should be exempt from style restrictions. Tested via running clang tools tests. This is an amended followup to https://reviews.llvm.org/D57207 Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: jdoerfert, xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58095 llvm-svn: 354534
* Update property prefix regex to allow numbers.Yan Zhang2019-02-201-0/+1
| | | | | | | | Subscribers: jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D56896 llvm-svn: 354485
* [clang-tidy] Mention language version in test explicitly.Volodymyr Sapsai2019-02-141-1/+1
| | | | | | | | | "modernize-use-using" check is applicable only to C++11 and later. Spell it out to avoid relying on default language version. rdar://problem/47932196 llvm-svn: 354069
* [clang-tidy] Don't use assignment for value-initialized enumsMalcolm Parsons2019-02-082-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The modernize-use-default-member-init check crashes when trying to create an assignment value for a value-initialized enum because it isn't a BuiltinType. An enum cannot be initialized by assigning 0 to it unless a cast is added. It could be initialized with an enumerator with the value 0, but there might not be one. Avoid these issues by ignoring the UseAssignment setting for value-initialized enums. Fixes PR35050. Reviewers: aaron.ballman, alexfh, JonasToth Reviewed By: JonasToth Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57852 llvm-svn: 353554
* [clang-tidy] Add options to bugprone-argument-comment to add missing ↵Paul Hoad2019-02-081-0/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument comments to literals bugprone-argument-comment only supports identifying those comments which do not match the function parameter name This revision add 3 options to adding missing argument comments to literals (granularity on type is added to control verbosity of fixit) ``` CheckOptions: - key: bugprone-argument-comment.CommentBoolLiterals value: '1' - key: bugprone-argument-comment.CommentFloatLiterals value: '1' - key: bugprone-argument-comment.CommentIntegerLiterals value: '1' - key: bugprone-argument-comment.CommentStringLiterals value: '1' - key: bugprone-argument-comment.CommentCharacterLiterals value: '1' - key: bugprone-argument-comment.CommentUserDefinedLiterals value: '1' - key: bugprone-argument-comment.CommentNullPtrs value: '1' ``` After applying these options, literal arguments will be preceded with /*ParameterName=*/ Reviewers: JonasToth, Eugene.Zelenko, alexfh, hokein, aaron.ballman Reviewed By: aaron.ballman, Eugene.Zelenko Differential Revision: https://reviews.llvm.org/D57674 llvm-svn: 353535
* [clang-tidy] Fixed a std::bind() transformationJonas Toth2019-02-071-0/+44
| | | | | | | | There was an extra semicolon that was somehow working in some contexts. Patch by oleg.smolsky. llvm-svn: 353389
* [clang-tidy] modernize-avoid-c-arrays: avoid main function (PR40604)Roman Lebedev2019-02-062-0/+38
| | | | | | | | | | | | | | | | | | | | | Summary: The check should ignore the main function, the program entry point. It is not possible to use `std::array<>` for the `argv`. The alternative is to use `char** argv`. Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=40604 | PR40604 ]] Reviewers: JonasToth, aaron.ballman Reviewed By: aaron.ballman Subscribers: xazax.hun, hans, cfe-commits Tags: #clang-tools-extra, #clang Differential Revision: https://reviews.llvm.org/D57787 llvm-svn: 353327
* [clang-tidy] Handle unions with existing default-member-initMalcolm Parsons2019-02-041-0/+10
| | | | | | | | | | | | | | | | | | | | Summary: clang-tidy's modernize-use-default-member-init was crashing for unions with an existing default member initializer. Fixes PR40492 Reviewers: aaron.ballman, alexfh, JonasToth Reviewed By: JonasToth Subscribers: JonasToth, riccibruno, xazax.hun, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D57665 llvm-svn: 353092
* [clang-tidy] Add the abseil-duration-unnecessary-conversion checkHyrum Wright2019-02-042-0/+71
| | | | | | Differential Revision: https://reviews.llvm.org/D57353 llvm-svn: 353079
* Revert rCTE352968 due to compilation failures 💥Stephane Moore2019-02-021-8/+0
| | | | llvm-svn: 352969
* [clang-tidy] Make google-objc-function-naming ignore implicit functions 🙈Stephane Moore2019-02-021-0/+8
| | | | | | | | | | | | | | | | | | Summary: Implicit functions are outside the control of source authors and should be exempt from style restrictions. Tested via running clang tools tests. Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D57207 llvm-svn: 352968
* [clang-tidy] Add the abseil-duration-addition checkHyrum Wright2019-01-282-0/+111
| | | | | | Differential Revision: https://reviews.llvm.org/D57185 llvm-svn: 352362
* Fix a lit test failure after D54438Kristof Umann2019-01-261-1/+1
| | | | llvm-svn: 352290
* [clang-tidy] fix unit tests for dropped _Float16 support in X86Jonas Toth2019-01-253-47/+51
| | | | | | | | | | | | | | | | Summary: Because _Float16 was disabled for X86 targets the unit-tests started failing. Extract the pieces for _Float16 and run theses tests under AArch64. Reviewers: aaron.ballman, erichkeane, lebedev.ri Reviewed By: erichkeane Subscribers: javed.absar, xazax.hun, kristof.beyls, cfe-commits Differential Revision: https://reviews.llvm.org/D57249 llvm-svn: 352231
* Temporairly disable readability-uppercase-literal-suffix tests that depend ↵Roman Lebedev2019-01-252-0/+4
| | | | | | on _Float16, to get bots back to green llvm-svn: 352224
OpenPOWER on IntegriCloud