diff options
author | Marco Borgeaud <marco.borgeaud@sonarsource.com> | 2024-06-05 10:20:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-05 10:20:37 +0200 |
commit | 04a02c1b88cfb8445ce962ba5ce496401a3e27fe (patch) | |
tree | 4579abee4230b1eed94cb2fc0f8db72670d4784d /clang/docs | |
parent | 419e7b825647779dc3415aa1129627b284baf6ca (diff) | |
download | llvm-04a02c1b88cfb8445ce962ba5ce496401a3e27fe.zip llvm-04a02c1b88cfb8445ce962ba5ce496401a3e27fe.tar.gz llvm-04a02c1b88cfb8445ce962ba5ce496401a3e27fe.tar.bz2 |
[ASTMatchers] forCallable should not erase binding on success (#89657)
Do not erase Builder when the first check fails because it could succeed
on the second stack frame.
The problem was that `InnerMatcher.matches` erases the bindings when it
returns false. The appropriate solution is to pass a copy of the
bindings, similar to what `matchesFirstInRange` does.
Diffstat (limited to 'clang/docs')
-rw-r--r-- | clang/docs/ReleaseNotes.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 39a9013..deb1560 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -996,6 +996,7 @@ AST Matchers - Fixed ``forEachArgumentWithParam`` and ``forEachArgumentWithParamType`` to not skip the explicit object parameter for operator calls. - Fixed captureVars assertion failure if not capturesVariables. (#GH76425) +- ``forCallable`` now properly preserves binding on successful match. (#GH89657) clang-format ------------ |