[Lldb-commits] [PATCH] D66175: Improve anonymous class heuristic in ClangASTContext::CreateRecordType

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 14 13:57:31 PDT 2019


aprantl added inline comments.


================
Comment at: source/Symbol/ClangASTContext.cpp:1505
 
-  bool is_anonymous = (!name) || (!name[0]);
+  bool has_name = (!name) || (!name[0]);
 
----------------
aprantl wrote:
> The condition needs to be reversed now to match the new name.
`bool has_name = (name && name[0])`


================
Comment at: source/Symbol/ClangASTContext.cpp:1511
 
-  if (is_anonymous)
-    decl->setAnonymousStructOrUnion(true);
+  if (has_name) {
+    // In C++ a lambda is also represented as an unnamed class. This is
----------------
`if (!has_name)`


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66175/new/

https://reviews.llvm.org/D66175





More information about the lldb-commits mailing list