[PATCH] D137263: add boundary check for ASTUnresolvedSet::erase
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 4 19:48:56 PDT 2022
MaskRay added a comment.
We need a regression test. See `clang/test/SemaCXX/using-decl*` for some other using declaration tests. Find a file which is appropriate and add a reduced case there.
Use `ninja check-clang-semacxx` to run `clang/test/SemaCXX` tests. Use `$build/bin/llvm-lit -v clang/test/SemaCXX/using-decl-1.cpp` to run one test.
`removeConversion` looks weird: the for loop and `erase` has quadratic time complexity and can be easily optimized to linear time.
That said, I find that if I comment out ` cast<CXXRecordDecl>(Shadow->getDeclContext())->removeConversion(Shadow);` in `Sema::HideUsingShadowDecl`, no test fails... So we have a missing coverage issue.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137263/new/
https://reviews.llvm.org/D137263
More information about the cfe-commits
mailing list