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
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
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
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
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
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
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
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
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
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
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 =
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
12 matches
Mail list logo