This makes them composable with mapAnyOf().
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/include/clang/ASTMatchers/ASTMatchersInternal.h | ||
---|---|---|
1994 | Not certain how much we want to care about it, but I think we need to check whether there's exactly one parameter of type int to meet the language rules for these to be replacement APIs: http://eel.is/c++draft/over.inc#1 e.g., the user could do something rather unlikely like: int operator++(float); for their overload and we're report it as being equivalent when it really isn't. | |
2142–2150 | Can we reuse the implementation from getOpName() to simplify this? |
clang/include/clang/ASTMatchers/ASTMatchersInternal.h | ||
---|---|---|
1994 | It doesn't compile with the big three at least: https://godbolt.org/z/Kns8We So, we can't write a test for it. So, we shouldn't add a condition for it. | |
2142–2150 | Yes, good idea. I went one step further and removed this new function entirely. |
LGTM
clang/include/clang/ASTMatchers/ASTMatchersInternal.h | ||
---|---|---|
1994 | I had a think-o there and realize now that such a declaration is illegal per http://eel.is/c++draft/over.oper#over.inc-1 So agreed that we shouldn't handle it. |
Not certain how much we want to care about it, but I think we need to check whether there's exactly one parameter of type int to meet the language rules for these to be replacement APIs: http://eel.is/c++draft/over.inc#1
e.g., the user could do something rather unlikely like: int operator++(float); for their overload and we're report it as being equivalent when it really isn't.