aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/API/python_api
diff options
context:
space:
mode:
authormandymi <131526806+mandymimi@users.noreply.github.com>2024-12-04 00:22:56 +0800
committerGitHub <noreply@github.com>2024-12-03 11:22:56 -0500
commitc9fbabfdc92f12b2b0148762e6e789157a172e4d (patch)
tree91012c02cc0722737d2d791c2d6c6fc388fd4233 /lldb/test/API/python_api
parent17cfd016b4621b8ae52bc7cc27570dd6fa8c0129 (diff)
downloadllvm-c9fbabfdc92f12b2b0148762e6e789157a172e4d.zip
llvm-c9fbabfdc92f12b2b0148762e6e789157a172e4d.tar.gz
llvm-c9fbabfdc92f12b2b0148762e6e789157a172e4d.tar.bz2
[ASTMatcher] Fix redundant macro expansion checks in getExpansionLocOfMacro (#117143)
A performance issue was descibed in #114521 **Root Cause**: The function getExpansionLocOfMacro is responsible for finding the expansion location of macros. When dealing with macro parameters, it recursively calls itself to check the expansion of macro arguments. This recursive logic redundantly checks previous macro expansions, leading to significant performance degradation when macros are heavily nested. Solution **Modification**: Track already processed macros during recursion. Implementation Details: Introduced a data structure to record processed macros. Before each recursive call, check if the macro has already been processed to avoid redundant calculations. **Testing**: 1. refer to #114521 Finder->addMatcher(expr(isExpandedFromMacro("NULL")).bind("E"), this); run clang-tidy on freecad/src/Mod/Path/App/AreaPyImp.cpp clang-tidy src/Mod/Path/App/AreaPyImp.cpp -checks=-*,testchecker -p=build/compile_commands.json checker runs normally 2. check-clang-unit pass
Diffstat (limited to 'lldb/test/API/python_api')
0 files changed, 0 insertions, 0 deletions