AaronBallman wrote:

Thanks for the ping! I'm not convinced this is a matcher we should provide in 
general (it may be acceptable as a local matcher to solve a particular problem 
for clang-tidy though). It's not a need people will have very often, and it's 
ill-defined what an "adjacent" substatement is. Because all `Expr` nodes 
inherit from `Stmt`, it reads like this will also be used to find things like 
the paren operator as being adjacent to the string literal: `"test", (1 + 2)`. 
Are things like interwoven null statements a special case? e.g., `2; ; ; ; 3;` 
are the two integer literals "adjacent" in this case? What about when 
preprocessor things are involved, like:
```
2;
#pragma clang whatever
3;
```

I think it would make more sense for this matcher (and #169965 as well) to live 
local to the clang-tidy checks, let us get experience with how well they work 
and what the rough edges are, and then consider inclusion with the rest of the 
matchers when there are more use cases along with the usage experience.

https://github.com/llvm/llvm-project/pull/173587
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to