summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/TestCallOverriddenMethod.py
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-10-17 18:16:50 +0000
committerRaphael Isemann <teemperor@gmail.com>2019-10-17 18:16:50 +0000
commit6237c9fe6ce966ce366005a55df8c267ea32a064 (patch)
treed702956f0d3d59cb14b104c66c6bb5fcbdd23282 /lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/TestCallOverriddenMethod.py
parent5be7eb3ab4da6e89ed23b137e6baaa13a530c9b3 (diff)
downloadbcm5719-llvm-6237c9fe6ce966ce366005a55df8c267ea32a064.tar.gz
bcm5719-llvm-6237c9fe6ce966ce366005a55df8c267ea32a064.zip
[lldb] Don't emit artificial constructor declarations as global functions
Summary: When we have a artificial constructor DIE, we currently create from that a global function with the name of that class. That ends up causing a bunch of funny errors such as "must use 'struct' tag to refer to type 'Foo' in this scope" when doing `Foo f`. Also causes that constructing a class via `Foo()` actually just calls that global function. The fix is that when we have an artificial method decl, we always treat it as handled even if we don't create a CXXMethodDecl for it (which we never do for artificial methods at the moment). Fixes rdar://55757491 and probably some other radars. Reviewers: aprantl, vsk, shafik Reviewed By: aprantl Subscribers: jingham, shafik, labath, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68130 llvm-svn: 375151
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/TestCallOverriddenMethod.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/TestCallOverriddenMethod.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/TestCallOverriddenMethod.py b/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/TestCallOverriddenMethod.py
index c22fffb4f23..93b91854281 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/TestCallOverriddenMethod.py
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/TestCallOverriddenMethod.py
@@ -49,3 +49,7 @@ class ExprCommandCallOverriddenMethod(TestBase):
# Test calling the base class.
self.expect("expr realbase.foo()", substrs=["1"])
+
+ # Test with locally constructed instances.
+ self.expect("expr Base().foo()", substrs=["1"])
+ self.expect("expr Derived().foo()", substrs=["2"])
OpenPOWER on IntegriCloud