[Lldb-commits] [PATCH] D131858: [clang] Track the templated entity in type substitution.

2023-01-12 Thread Vassil Vassilev via Phabricator via lldb-commits
v.g.vassilev added a comment.

In D131858#4047785 , @erichkeane 
wrote:

> @mizvekov : I'm looking at the revert of this since no work seems to have 
> been done to fix @steven_wu 's problem.  Unfortunately, it seems that 
> reverting this requires reverting https://reviews.llvm.org/D134604 plus all 
> of the "Instantiate" patches, which undoes basically all of your work.
>
> I'm starting it now, but its unfortunate that we are going to lose this much 
> of your work.

That is *really* unfortunate. @mizvekov (@erichkeane) is there any other way 
out here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131858

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D131858: [clang] Track the templated entity in type substitution.

2023-01-13 Thread Vassil Vassilev via Phabricator via lldb-commits
v.g.vassilev added a comment.

Thanks a lot @rsmith for providing a fix and thanks a lot @aaron.ballman and 
@erichkeane for the efforts saving @mizvekov work over the summer. I believe he 
has sporadic access to internet and soon he will be back to normal. Great 
example of team work here!!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131858

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D131858: [clang] Track the templated entity in type substitution.

2023-01-14 Thread Vassil Vassilev via Phabricator via lldb-commits
v.g.vassilev added a comment.

In D131858#4052031 , @erichkeane 
wrote:

> In D131858#4052026 , @v.g.vassilev 
> wrote:
>
>> Thanks a lot @rsmith for providing a fix and thanks a lot @aaron.ballman and 
>> @erichkeane for the efforts saving @mizvekov work over the summer. I believe 
>> he has sporadic access to internet and soon he will be back to normal. Great 
>> example of team work here!!
>
> Note we don't yet have the evidence that this is savable yet, we should know 
> in the next day or so.  At minimum, at least 1 of his patches needs to be 
> reverted due to the memory regression.

I see that https://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/6584/ 
picked up your revert and seems successful. Then the next build is green as 
well and then starts failing for a reason that’s unrelated to this patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131858

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D131858: [clang] Track the templated entity in type substitution.

2023-01-17 Thread Vassil Vassilev via Phabricator via lldb-commits
v.g.vassilev added a comment.

In D131858#4058807 , @erichkeane 
wrote:

> In D131858#4054348 , @v.g.vassilev 
> wrote:
>
>> In D131858#4052031 , @erichkeane 
>> wrote:
>>
>>> In D131858#4052026 , 
>>> @v.g.vassilev wrote:
>>>
 Thanks a lot @rsmith for providing a fix and thanks a lot @aaron.ballman 
 and @erichkeane for the efforts saving @mizvekov work over the summer. I 
 believe he has sporadic access to internet and soon he will be back to 
 normal. Great example of team work here!!
>>>
>>> Note we don't yet have the evidence that this is savable yet, we should 
>>> know in the next day or so.  At minimum, at least 1 of his patches needs to 
>>> be reverted due to the memory regression.
>>
>> I see that https://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/6584/ 
>> picked up your revert and seems successful. Then the next build is green as 
>> well and then starts failing for a reason that’s unrelated to this patch.
>
> Yep!  So only 1 of the patches (D136566  
> needs reverting/further attention).

Awesome!!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131858

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D91524: Make iteration over the DeclContext::lookup_result safe.

2021-03-17 Thread Vassil Vassilev via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0cb7e7ca0c86: Make iteration over the 
DeclContext::lookup_result safe. (authored by v.g.vassilev).
Herald added projects: clang, LLDB.
Herald added subscribers: lldb-commits, cfe-commits.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91524

Files:
  clang-tools-extra/clangd/unittests/TestTU.cpp
  clang/include/clang/AST/ASTContext.h
  clang/include/clang/AST/CXXInheritance.h
  clang/include/clang/AST/Decl.h
  clang/include/clang/AST/DeclBase.h
  clang/include/clang/AST/DeclContextInternals.h
  clang/include/clang/Serialization/ASTWriter.h
  clang/lib/ARCMigrate/ObjCMT.cpp
  clang/lib/AST/ASTContext.cpp
  clang/lib/AST/CXXInheritance.cpp
  clang/lib/AST/Decl.cpp
  clang/lib/AST/DeclBase.cpp
  clang/lib/AST/ExternalASTMerger.cpp
  clang/lib/AST/TypePrinter.cpp
  clang/lib/CodeGen/CodeGenFunction.h
  clang/lib/Sema/MultiplexExternalSemaSource.cpp
  clang/lib/Sema/SemaDeclCXX.cpp
  clang/lib/Sema/SemaLookup.cpp
  clang/lib/Sema/SemaObjCProperty.cpp
  clang/lib/Sema/SemaTemplateInstantiate.cpp
  clang/lib/Serialization/ASTReader.cpp
  clang/lib/Serialization/ASTWriterDecl.cpp
  clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
  clang/test/PCH/cxx-explicit-specifier.cpp
  clang/tools/libclang/CXType.cpp
  clang/unittests/AST/ASTImporterTest.cpp
  
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
  lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
  lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
  lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h

Index: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
===
--- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
+++ lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
@@ -265,7 +265,7 @@
   clang::DeclContext::lookup_result result = decl_context->lookup(myName);
 
   if (!result.empty()) {
-clang::NamedDecl *named_decl = result[0];
+clang::NamedDecl *named_decl = *result.begin();
 if (const RecordDeclType *record_decl =
 llvm::dyn_cast(named_decl))
   compiler_type.SetCompilerType(
Index: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
===
--- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -163,7 +163,6 @@
   if (name.getNameKind() == clang::DeclarationName::CXXDestructorName)
 if (auto *baseDtorDecl = base_record->getDestructor()) {
   if (baseDtorDecl->isVirtual()) {
-path.Decls = baseDtorDecl;
 decls.push_back(baseDtorDecl);
 return true;
   } else
@@ -171,12 +170,11 @@
 }
 
   // Otherwise, search for name in the base class.
-  for (path.Decls = base_record->lookup(name); !path.Decls.empty();
-   path.Decls = path.Decls.slice(1)) {
+  for (path.Decls = base_record->lookup(name).begin();
+   path.Decls != path.Decls.end(); ++path.Decls) {
 if (auto *method_decl =
-llvm::dyn_cast(path.Decls.front()))
+llvm::dyn_cast(*path.Decls))
   if (method_decl->isVirtual() && !isOverload(decl, method_decl)) {
-path.Decls = method_decl;
 decls.push_back(method_decl);
 return true;
   }
@@ -6605,10 +6603,11 @@
   if (cxx_record_decl->lookupInBases(
   [decl_name](const clang::CXXBaseSpecifier *specifier,
   clang::CXXBasePath &path) {
-path.Decls =
-specifier->getType()->getAsCXXRecordDecl()->lookup(
-decl_name);
-return !path.Decls.empty();
+CXXRecordDecl *record =
+  specifier->getType()->getAsCXXRecordDecl();
+auto r = record->lookup(decl_name);
+path.Decls = r.begin();
+return !r.empty();
   },
   paths)) {
 clang::CXXBasePaths::const_paths_iterator path,
@@ -6631,9 +6630,10 @@
   ->getDecl());
 }
   }
-  for (clang::NamedDecl *path_decl : path->Decls) {
+  for (clang::DeclContext::lookup_iterator I = path->Decls, E;
+   I != E; ++I) {
 child_idx = GetIndexForRecordChild(
-parent_record_decl, path_decl, omit_empty_base_classes);
+parent_record_decl, *I, omit_empty_base_classes);
 if (child

[Lldb-commits] [PATCH] D91524: Make iteration over the DeclContext::lookup_result safe.

2021-03-17 Thread Vassil Vassilev via Phabricator via lldb-commits
v.g.vassilev added a comment.
Herald added a subscriber: JDevlieghere.

argh... I only now see the pre-merge suggestions -- almost all of them seem not 
super essential -- let me know if I should address them in a subsequent 
commit...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91524

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D69309: Support template instantiation in the expression evaluator

2019-11-28 Thread Vassil Vassilev via Phabricator via lldb-commits
v.g.vassilev added a comment.

https://reviews.llvm.org/D41416 could be relevant. I am not an expert but I 
think when reading the DWARF you could only register 'lazy' specializations 
which will be imported only when really required.


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

https://reviews.llvm.org/D69309



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits