Adds new traversal matchers called hasPlacementArg and hasAnyPlacementArg that matches on arguments to placement new operators.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Unit tests: fail. 62272 tests passed, 1 failed and 827 were skipped.
failed: Clang.CodeGenOpenCL/amdgpu-features.cl
clang-tidy: pass.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.
clang/include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
6794 | I think a better design would be something like hasPlacementExpr() as a traversal matcher. Then isPlacement() can be trivially done in the project as hasPlacementExpr(anything()) (we could still consider adding it as a dedicated matcher, but it doesn't seem critical to me), but this would also allow people to check for specific placement new argument expressions. |
Unit tests: fail. 62276 tests passed, 1 failed and 827 were skipped.
failed: Clang.CodeGenOpenCL/amdgpu-features.cl
clang-tidy: pass.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.
I think a better design would be something like hasPlacementExpr() as a traversal matcher. Then isPlacement() can be trivially done in the project as hasPlacementExpr(anything()) (we could still consider adding it as a dedicated matcher, but it doesn't seem critical to me), but this would also allow people to check for specific placement new argument expressions.