diff options
author | Shafik Yaghmour <syaghmour@apple.com> | 2019-08-14 22:30:29 +0000 |
---|---|---|
committer | Shafik Yaghmour <syaghmour@apple.com> | 2019-08-14 22:30:29 +0000 |
commit | 62abe494fb36cd4c523d36f05cb0e3839df50c04 (patch) | |
tree | 5b9306c76f60fded49007107ffea012a4defe083 /lldb/packages/Python/lldbsuite/test/expression_command/completion-in-lambda-and-unnnamed-class | |
parent | 6ba7992031cc803a01f0622f4899668b15a20a98 (diff) | |
download | bcm5719-llvm-62abe494fb36cd4c523d36f05cb0e3839df50c04.tar.gz bcm5719-llvm-62abe494fb36cd4c523d36f05cb0e3839df50c04.zip |
Improve anonymous class heuristic in ClangASTContext::CreateRecordType
Summary:
Currently the heuristic used in ClangASTContext::CreateRecordType to identify an anonymous class is that there is that name is a nullptr or simply a null terminator. This heuristic is not accurate since it will also sweep up unnamed classes and lambdas. The improved heuristic relies on the requirement that an anonymous class must be contained within a class.
Differential Revision: https://reviews.llvm.org/D66175
llvm-svn: 368937
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/completion-in-lambda-and-unnnamed-class')
2 files changed, 15 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/completion-in-lambda-and-unnnamed-class/TestCompletionInLambdaAndUnnamedClass.py b/lldb/packages/Python/lldbsuite/test/expression_command/completion-in-lambda-and-unnnamed-class/TestCompletionInLambdaAndUnnamedClass.py new file mode 100644 index 00000000000..57fb94b6d66 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/expression_command/completion-in-lambda-and-unnnamed-class/TestCompletionInLambdaAndUnnamedClass.py @@ -0,0 +1,4 @@ +from lldbsuite.test import lldbinline +from lldbsuite.test import decorators + +lldbinline.MakeInlineTest(__file__, globals(),) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/completion-in-lambda-and-unnnamed-class/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/completion-in-lambda-and-unnnamed-class/main.cpp new file mode 100644 index 00000000000..a3d8ab6532e --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/expression_command/completion-in-lambda-and-unnnamed-class/main.cpp @@ -0,0 +1,11 @@ +int main() { + []() + { //%self.dbg.GetCommandInterpreter().HandleCompletion("e ", len("e "), 0, -1, lldb.SBStringList()) + } + (); + struct { + void f() + { //%self.dbg.GetCommandInterpreter().HandleCompletion("e ", len("e "), 0, -1, lldb.SBStringList()) + } + } A; +} |