summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/support/funcutils.py
diff options
context:
space:
mode:
authorEric Liu <ioeric@google.com>2018-03-15 14:45:02 +0000
committerEric Liu <ioeric@google.com>2018-03-15 14:45:02 +0000
commit9a54397f81c9882d9cd25bde666f4b0c50bf0654 (patch)
treed5da805a01b5954ca3ff7c2e7cd9275e6545f113 /lldb/packages/Python/lldbsuite/support/funcutils.py
parent69a4132f63e2aeea5ca3827f44996b1f376f3ac2 (diff)
downloadbcm5719-llvm-9a54397f81c9882d9cd25bde666f4b0c50bf0654.tar.gz
bcm5719-llvm-9a54397f81c9882d9cd25bde666f4b0c50bf0654.zip
[change-namespace] Don't match a function call/ref multiple times.
Summary: Previously, the matcher matches a function call/ref multiple times, one for each decl ancestor. This might cause problems. For example, in the following case, `func()` would be matched once (with namespace context) before using decl is seen and once after using decl is seeing, which would result in different conflicting replacements as the first match would replace `func` with "ns::func" as it doesn't know about the using decl. ``` namespace x { namespace { using ::ns::func; void f() { func(); } } } ``` Switching from `hasDescendant` matching to `hasAncestor` matching solves the problem. Reviewers: hokein Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D44517 llvm-svn: 327629
Diffstat (limited to 'lldb/packages/Python/lldbsuite/support/funcutils.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud