Improve anonymous class heuristic in ClangASTContext::CreateRecordType
authorShafik Yaghmour <syaghmour@apple.com>
Wed, 14 Aug 2019 22:30:29 +0000 (22:30 +0000)
committerShafik Yaghmour <syaghmour@apple.com>
Wed, 14 Aug 2019 22:30:29 +0000 (22:30 +0000)
commit62abe494fb36cd4c523d36f05cb0e3839df50c04
tree5b9306c76f60fded49007107ffea012a4defe083
parent6ba7992031cc803a01f0622f4899668b15a20a98
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
lldb/packages/Python/lldbsuite/test/expression_command/completion-crash-lambda/TestCompletionCrashInLambda.py [deleted file]
lldb/packages/Python/lldbsuite/test/expression_command/completion-crash-lambda/main.cpp [deleted file]
lldb/packages/Python/lldbsuite/test/expression_command/completion-in-lambda-and-unnnamed-class/TestCompletionInLambdaAndUnnamedClass.py [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/expression_command/completion-in-lambda-and-unnnamed-class/main.cpp [new file with mode: 0644]
lldb/source/Symbol/ClangASTContext.cpp