Re: [cfe-users] Clang-tidy lexer util issue.

2020-02-18 Thread Lewis, Cannada via cfe-users
I was able to solve my problem by making sure to get the expansion location before calling getPreviousToken. On Feb 17, 2020, at 5:42 PM, Lewis, Cannada mailto:canl...@sandia.gov>> wrote: I am trying to use the getPreviousToken function from clang-tools-extra

[cfe-users] Clang-tidy lexer util issue.

2020-02-17 Thread Lewis, Cannada via cfe-users
I am trying to use the getPreviousToken function from clang-tools-extra/clang-tidy/utils

Re: [cfe-users] clang-tidy

2020-02-05 Thread Mario Charest via cfe-users
Le mer. 5 févr. 2020 09 h 48, Chris Green a écrit : > Hi, > On 1/30/20 12:02 PM, Mario Charest via cfe-users wrote: > > Hello, > > First post, be gentle ;-) > > I'm trying to find a clean solution to an error message that clang-tidy is > giving, tried with 10 and 11) > > This is the code: > > str

Re: [cfe-users] clang-tidy

2020-02-05 Thread Chris Green via cfe-users
Hi, On 1/30/20 12:02 PM, Mario Charest via cfe-users wrote: Hello, First post, be gentle ;-) I'm trying to find a clean solution to an error message that clang-tidy is giving, tried with 10 and 11) This is the code: struct Foo {     Foo(const std::string &value) : m_name(value) {}     Foo(

Re: [cfe-users] clang-tidy

2020-02-05 Thread JVApen via cfe-users
Hey Mario, I logged a bug for this a long time ago: https://bugs.llvm.org/show_bug.cgi?id=25319 >From what I can see, this still ain't solved. It makes sense to register you onto that one. On Thu, Jan 30, 2020, 19:02 Mario Charest via cfe-users < cfe-users@lists.llvm.org> wrote: > Hello, > > Fi

[cfe-users] clang-tidy

2020-02-03 Thread Mario Charest via cfe-users
Hello, First post, be gentle ;-) I'm trying to find a clean solution to an error message that clang-tidy is giving, tried with 10 and 11) This is the code: struct Foo { Foo(const std::string &value) : m_name(value) {} Foo(std::string &&value) : m_name(std::move(value)) {} std::strin

Re: [cfe-users] clang-tidy bug?

2019-10-31 Thread Aaron Ballman via cfe-users
On Thu, Oct 31, 2019 at 2:28 PM David Blaikie wrote: > > > > On Thu, Oct 31, 2019 at 11:19 AM Aaron Ballman wrote: >> >> On Thu, Oct 31, 2019 at 1:31 PM David Blaikie wrote: >> > >> > >> > >> > On Thu, Oct 31, 2019 at 8:45 AM Aaron Ballman >> > wrote: >> >> >> >> On Wed, Oct 30, 2019 at 9:23 P

Re: [cfe-users] clang-tidy bug?

2019-10-31 Thread David Blaikie via cfe-users
On Thu, Oct 31, 2019 at 11:19 AM Aaron Ballman wrote: > On Thu, Oct 31, 2019 at 1:31 PM David Blaikie wrote: > > > > > > > > On Thu, Oct 31, 2019 at 8:45 AM Aaron Ballman > wrote: > >> > >> On Wed, Oct 30, 2019 at 9:23 PM David Blaikie > wrote: > >> > > >> > Two separate issues here > >> > > >

Re: [cfe-users] clang-tidy bug?

2019-10-31 Thread Aaron Ballman via cfe-users
On Thu, Oct 31, 2019 at 1:31 PM David Blaikie wrote: > > > > On Thu, Oct 31, 2019 at 8:45 AM Aaron Ballman wrote: >> >> On Wed, Oct 30, 2019 at 9:23 PM David Blaikie wrote: >> > >> > Two separate issues here >> > >> > 1) the fixit hint, as one of a set of alternatives, isn't likely to be >> > r

Re: [cfe-users] clang-tidy bug?

2019-10-31 Thread David Blaikie via cfe-users
On Thu, Oct 31, 2019 at 8:45 AM Aaron Ballman wrote: > On Wed, Oct 30, 2019 at 9:23 PM David Blaikie wrote: > > > > Two separate issues here > > > > 1) the fixit hint, as one of a set of alternatives, isn't likely to be > removed/changed - the (albeit quirky) convention of using extra () to > in

Re: [cfe-users] clang-tidy bug?

2019-10-31 Thread Aaron Ballman via cfe-users
On Wed, Oct 30, 2019 at 9:23 PM David Blaikie wrote: > > Two separate issues here > > 1) the fixit hint, as one of a set of alternatives, isn't likely to be > removed/changed - the (albeit quirky) convention of using extra () to > indicate an intentional assignment in a condition has been around

Re: [cfe-users] clang-tidy bug?

2019-10-30 Thread David Blaikie via cfe-users
Two separate issues here 1) the fixit hint, as one of a set of alternatives, isn't likely to be removed/changed - the (albeit quirky) convention of using extra () to indicate an intentional assignment in a condition has been around for a while. So if you use the extra parens without writing an ass

Re: [cfe-users] clang-tidy bug?

2019-10-28 Thread David Blaikie via cfe-users
clang-tidy in the command line you gave didn't seem to modify the file for me, did it modify the file for you? Are you objecting to the suggestion, or that it was automatically applied? I would think it'd be a bug to apply any fixit/hint if there are multiple possible suggestions. But the existen

[cfe-users] clang-tidy bug?

2019-10-27 Thread Robert Ankeney via cfe-users
For the following code (wrong.cpp): bool check(bool isValid) { bool retVal = false; if (( isValid == true )) { retVal = true; } return retVal; } when I run: clang-tidy -checks=modernize-use-default-member-init wrong.cpp I get: 4 warnings and 1 error generated. E

Re: [cfe-users] clang-tidy selects toolchain?

2018-06-20 Thread Jonas Toth via cfe-users
I dont think so. What do you want to achieve? Clang-tidy will just build the AST from Code and do its analysis on it. I do not see a reason for a different toolchain. Am 19.06.2018 um 11:30 schrieb kimmyzhang(张亚霏) via cfe-users: > > As is known, clang can select another toolchain through: > > cla

[cfe-users] clang-tidy selects toolchain?

2018-06-20 Thread 张亚霏
As is known, clang can select another toolchain through: clang --gcc-toolchain=/opt/gcc-7.3.0 -v clang++ --gcc-toolchain=/opt/gcc-7.3.0 �Cv Is there an equivalent option for clang-tidy? Thanks. ___ cfe-users mailing list cfe-users@lists.llvm.org http://

[cfe-users] clang-tidy and CUDA

2017-10-30 Thread Jakub Klener via cfe-users
Hello, is it somehow possible to specify source file extension for clang-tidy, can it for example parse ".cu" files? Is there some support for CUDA in clang-tidy? I ran it on my CUDA source file (which I have to rename to ".cc" file), specified -D__CUDACC__, and it found error: unknown type n

[cfe-users] [clang-tidy] modernize-make-unique not working on Mac OS?

2017-03-18 Thread Tetsuo Kiso via cfe-users
Hello, On Mac OS X 10.12.3, I’m trying to use clang-tidy, part of LLVM 4.0.0 (I installed LLVM 4.0.0 using Homebrew.) It seems "clang-tidy -checks=modernize-make-unique" doesn’t work on Mac OS. I’m not sure I’m using clang-tidy and its options correctly, though. Here is the version of clang-tidy