[Lldb-commits] [PATCH] D66175: Improve anonymous class heuristic in ClangASTContext::CreateRecordType
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 13 16:40:27 PDT 2019
aprantl added inline comments.
================
Comment at: packages/Python/lldbsuite/test/expression_command/completion-crash-lambda/TestCompletionCrashInLambda.py:4
-lldbinline.MakeInlineTest(__file__, globals(), [decorators.skipIf(bugnumber="rdar://53755023")])
+lldbinline.MakeInlineTest(__file__, globals(), [])
----------------
Can you rename that test to not contain the word "crash" and instead describe the action being performed?
(CompletionOfLambda or something like that should be fine)
================
Comment at: source/Symbol/ClangASTContext.cpp:1505
bool is_anonymous = (!name) || (!name[0]);
----------------
rename this to `has_name`
================
Comment at: source/Symbol/ClangASTContext.cpp:1509
*ast, (TagDecl::TagKind)kind, decl_ctx, SourceLocation(),
SourceLocation(), is_anonymous ? nullptr : &ast->Idents.get(name));
----------------
`has_name ? &ast->Idents.get(name) : nullptr`
================
Comment at: source/Symbol/ClangASTContext.cpp:1513
+ // The current heuristic for checking if a CXXRecordDecl is anonymous is if
+ // there is no name or if it is just a null terminator.
+ // This is not accurate since currently this can sweep up both unnamed
----------------
if (!has_name) {
// In C++ a lambda is also represented as an unnamed class. This is different from
// an *anonymous class* that the user wrote. Anonymous ...
...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66175/new/
https://reviews.llvm.org/D66175
More information about the lldb-commits
mailing list