https://github.com/PiotrZSL requested changes to this pull request.

I do not like this "CustomChecks"

What I would like to have in config is:

```
custom-call-main-function.Engine: Query
custom-call-main-function.Language: C
custom-call-main-function.Traverse: AsIs
custom-call-main-function.Code: 'match 
callExpr(callee(functionDecl(isMain()).bind("fn"))).bind("callee")'
custom-call-main-function.Diagnostic.Warning.BindName: callee
custom-call-main-function.Diagnostic.Warning.Message: "call to {fn} function"
custom-call-main-function.Diagnostic.Note.1.BindName: fn
custom-call-main-function.Diagnostic.Note.1.Message: "fn is defined here"
custom-call-main-function.Diagnostic.Note.2.BindName: fn
custom-call-main-function.Diagnostic.Note.2.Message: "fn here is not nice"
```

Main reason is simple, easy to modify check and add new check in subconfigs.
I do not see need for warnings, always someone can use warnings as errors.
If you do not want to split this into separate options, then at least move 
configs into invidual checks.

https://github.com/llvm/llvm-project/pull/131804
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to