[cfe-users] How to use clang-apply-replacements with clang-tidy fixit file

2019-04-26 Thread Robert Ankeney via cfe-users
I used clang-tidy to generate some replacements for a code base into a yaml file using the -export-fixits=file option. After editing the file to remove some unwanted changes, I would like to apply those fixes. The documentation says to use clang-apply-replacements, but I don't see how do use it to

Re: [cfe-users] How to use clang-apply-replacements with clang-tidy fixit file

2019-04-29 Thread Robert Ankeney via cfe-users
I used the run-clang-tidy script to operate across a large compilation database using: run-clang-tidy.py -header-filter=.* -checks=-*,-cppcoreguidelines-pro-type-member-init -export-fixes=ctinit.yaml This generated a large YAML fixit file. I've since edited the file to remove and/or change some o

[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

[cfe-users] DeclRefExpr question

2019-12-03 Thread Robert Ankeney via cfe-users
Let's assume I have a DeclRefExpr that is referenceing some variable that is declared as "static const int var;". How can I determine the variable is static? There is no isStaticLocal() or getStorageClass() call as there would be for the VarDecl. Is there something within the QualType that gets me

Re: [cfe-users] DeclRefExpr question

2019-12-03 Thread Robert Ankeney via cfe-users
hat's being referenced (could be a function, etc, > etc) then do whatever you want to do with that VarDecl. > > On Tue, Dec 3, 2019 at 1:33 PM Robert Ankeney via cfe-users < > cfe-users@lists.llvm.org> wrote: > >> Let's assume I have a DeclRefExpr that is referen

[cfe-users] How to determine if variable is templated?

2020-02-16 Thread Robert Ankeney via cfe-users
Suppose I have some code like: template Type tVar; function(tVar); How can I determine that tVar is templated from the VarDecl or a MemberExpr? I don't see any obvious function in QualType or Type. Thanks, Robert ___ cfe-users mailing list cfe-users@li

Re: [cfe-users] cfe-users Digest, Vol 85, Issue 8

2020-02-20 Thread Robert Ankeney via cfe-users
t; You can reach the person managing the list at > cfe-users-ow...@lists.llvm.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of cfe-users digest..." > > > Today's Topics: > >1. How to determine if v

[cfe-users] Template parameter matcher?

2020-06-23 Thread Robert Ankeney via cfe-users
I'm looking for a matcher for variables whose type is a template parameter. For example: template T tVal; // Match tVal int func(T tParam); // Match tParam int i = func(tVal); // Match tVal Our coding standards require the variable to have a 't' at the start of the v

[cfe-users] Order of matchers

2020-07-20 Thread Robert Ankeney via cfe-users
I have a tool with multiple matchers. Each different matcher is added to MatchFinder with a call to addMatcher(). It seems like the order of matches that are called isn't dependent on the order I added them with addMatcher. To give a specific example, I'm looking to match variables whose type is a

[cfe-users] clang-format feature request

2021-06-29 Thread Robert Ankeney via cfe-users
I'm not sure where best to post this, but I'd like to see a couple of features added to clang-format, and from browsing around, have seen others looking for these features, too. 1) Ability to break declaration parameters into groups when more than N parameters are declared. For example, if I have m

[cfe-users] Matcher for templated variable

2021-08-08 Thread Robert Ankeney via cfe-users
I'm looking to create AST matchers for variables that are templated. For example, in the code: template class Class // template <(class or typename or int/float/etc) T> { public: void Func(T* Param)// 1) match Param { Param = nullptr; // 2) match Param } T* Var =

Re: [cfe-users] cfe-users Digest, Vol 105, Issue 6

2022-01-08 Thread Robert Ankeney via cfe-users
I have run into this problem before. Instead of adding more RAM to my machine, I found that doing a "sudo make" will often succeed. Robert On Fri, Dec 24, 2021 at 8:09 AM via cfe-users wrote: > Send cfe-users mailing list submissions to > cfe-users@lists.llvm.org > > To subscribe or un