[Lldb-commits] [lldb] r247923 - Fix caching for clang::Decl in DWARFASTParserClang

2015-09-17 Thread Paul Herman via lldb-commits
Author: paulherman Date: Thu Sep 17 14:32:02 2015 New Revision: 247923 URL: http://llvm.org/viewvc/llvm-project?rev=247923&view=rev Log: Fix caching for clang::Decl in DWARFASTParserClang Reviewers: sivachandra, chaoren, clayborg, tberghammer Subscribers: lldb-commits Differential Revision: htt

Re: [Lldb-commits] [PATCH] D12942: Fix caching for clang::Decl in DWARFASTParserClang

2015-09-17 Thread Paul Herman via lldb-commits
paulherman updated this revision to Diff 35026. paulherman added a comment. Fix caching for clang::Decl in DWARFASTParserClang Changed from std::set to switch. Rebased the patch. http://reviews.llvm.org/D12942 Files: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Index: source/Plug

Re: [Lldb-commits] [PATCH] D12942: Fix caching for clang::Decl in DWARFASTParserClang

2015-09-17 Thread Paul Herman via lldb-commits
paulherman updated this revision to Diff 35019. paulherman added a comment. Fix caching for clang::Decl in DWARFASTParserClang Fixed small mistakes from previous commit. http://reviews.llvm.org/D12942 Files: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Index: source/Plugins/Symbo

Re: [Lldb-commits] [PATCH] D12942: Fix caching for clang::Decl in DWARFASTParserClang

2015-09-17 Thread Paul Herman via lldb-commits
paulherman updated this revision to Diff 35017. paulherman added a comment. Fix caching for clang::Decl in DWARFASTParserClang http://reviews.llvm.org/D12942 Files: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Index: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp

[Lldb-commits] [PATCH] D12942: Fix caching for clang::Decl in DWARFASTParserClang

2015-09-17 Thread Paul Herman via lldb-commits
paulherman created this revision. paulherman added reviewers: sivachandra, chaoren, tberghammer, clayborg. paulherman added a subscriber: lldb-commits. http://reviews.llvm.org/D12942 Files: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Index: source/Plugins/SymbolFile/DWARF/DWARFASTP

[Lldb-commits] [lldb] r247836 - Add using directives to the clang::DeclContext and fix decls for variables inside namespaces

2015-09-16 Thread Paul Herman via lldb-commits
Author: paulherman Date: Wed Sep 16 13:48:30 2015 New Revision: 247836 URL: http://llvm.org/viewvc/llvm-project?rev=247836&view=rev Log: Add using directives to the clang::DeclContext and fix decls for variables inside namespaces Summary: Supports the parsing of the "using namespace XXX" and "us

Re: [Lldb-commits] [PATCH] D12897: Add using directives to the clang::DeclContext and fix decls for variables inside namespaces

2015-09-16 Thread Paul Herman via lldb-commits
paulherman updated this revision to Diff 34911. paulherman added a comment. Add using directives to the clang::DeclContext and fix decls for variables inside namespaces Rebased the patch. http://reviews.llvm.org/D12897 Files: include/lldb/Symbol/SymbolFile.h source/Expression/ClangExpress

Re: [Lldb-commits] [PATCH] D12897: Add using directives to the clang::DeclContext and fix decls for variables inside namespaces

2015-09-16 Thread Paul Herman via lldb-commits
paulherman added a comment. The need for ParseDeclsInContext is to get a list of namespaces that are contained within a using-directive. This does not actually parse anything but DW_TAG_imported_namespace and DW_TAG_imported_decl. The actual contents of the namespace are parsed only when the se

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-15 Thread Paul Herman via lldb-commits
paulherman added a comment. Please also look at http://reviews.llvm.org/D12897 It fixes the imported decls and some bugs that I have missed (evaluating Fun::fun_var reports an error in TestCppNsImport). Unfortunately I don't think there is a way to report ambiguity without for "imported" withou

[Lldb-commits] [PATCH] D12897: Add using directives to the clang::DeclContext and fix decls for variables inside namespaces

2015-09-15 Thread Paul Herman via lldb-commits
paulherman created this revision. paulherman added reviewers: sivachandra, chaoren, clayborg. paulherman added a subscriber: lldb-commits. Supports the parsing of the "using namespace XXX" and "using XXX::XXX" directives. Added ambiguity errors when it two decls with the same name are encountere

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-15 Thread Paul Herman via lldb-commits
paulherman added a comment. The test was supposed to be marked as an XFAIL. I'm currently writing a fix for this that reports ambiguity in a context and deals with imported decls. http://reviews.llvm.org/D12658 ___ lldb-commits mailing list lldb-co

[Lldb-commits] [lldb] r247760 - Fix double include in CompilerDeclContext.h

2015-09-15 Thread Paul Herman via lldb-commits
Author: paulherman Date: Tue Sep 15 19:29:10 2015 New Revision: 247760 URL: http://llvm.org/viewvc/llvm-project?rev=247760&view=rev Log: Fix double include in CompilerDeclContext.h Modified: lldb/trunk/include/lldb/Symbol/CompilerDeclContext.h Modified: lldb/trunk/include/lldb/Symbol/Compile

[Lldb-commits] [lldb] r247759 - Fix missing include in CompilerDeclContext.h

2015-09-15 Thread Paul Herman via lldb-commits
Author: paulherman Date: Tue Sep 15 19:26:12 2015 New Revision: 247759 URL: http://llvm.org/viewvc/llvm-project?rev=247759&view=rev Log: Fix missing include in CompilerDeclContext.h Modified: lldb/trunk/include/lldb/Symbol/CompilerDeclContext.h Modified: lldb/trunk/include/lldb/Symbol/Compil

[Lldb-commits] [lldb] r247746 - Search variables based on clang::DeclContext and clang::Decl tree

2015-09-15 Thread Paul Herman via lldb-commits
Author: paulherman Date: Tue Sep 15 18:44:17 2015 New Revision: 247746 URL: http://llvm.org/viewvc/llvm-project?rev=247746&view=rev Log: Search variables based on clang::DeclContext and clang::Decl tree Summary: SymbolFileDWARF now creates VarDecl and BlockDecl and adds them to the Decl tree. Th

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-15 Thread Paul Herman via lldb-commits
paulherman updated this revision to Diff 34850. paulherman added a comment. Search variables based on clang::DeclContext and clang::Decl tree Rebased the patch. http://reviews.llvm.org/D12658 Files: include/lldb/Symbol/ClangASTContext.h include/lldb/Symbol/CompilerDecl.h include/lldb/Sym

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-15 Thread Paul Herman via lldb-commits
paulherman updated this revision to Diff 34823. paulherman added a comment. Search variables based on clang::DeclContext and clang::Decl tree This adds handling of imported declarations, but there is no call to actually process them as I am not sure where to do this. I believe that the right pla

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-15 Thread Paul Herman via lldb-commits
paulherman updated this revision to Diff 34808. paulherman added a comment. Search variables based on clang::DeclContext and clang::Decl tree http://reviews.llvm.org/D12658 Files: include/lldb/Symbol/ClangASTContext.h include/lldb/Symbol/CompilerDecl.h include/lldb/Symbol/CompilerDeclCont

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman updated this revision to Diff 34768. paulherman added a comment. Search variables based on clang::DeclContext and clang::Decl tree Moved the DeclLinkToObject inside Variable::GetDecl. http://reviews.llvm.org/D12658 Files: include/lldb/Symbol/ClangASTContext.h include/lldb/Symbol

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman added a comment. I just ran a grep through the source. It seems that everywhere it is created as a shared_ptr. In a previous attempt I tried storing it in the TypeSystem map from decl to object as Variable* instead of VariableSP and it seemed like at some point between launching a qu

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman added a comment. In http://reviews.llvm.org/D12658#245851, @clayborg wrote: > So I don't like it in ParseVariableDIE() because it means we must create the > decl right away for the variable when parsing it. ParseVariableDIE is used to > parse all variables everywhere and we don't nee

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman added a comment. I thought about the problem a bit more and I believe that having the call to DeclLinkDeclToObject inside ParseVariableDIE makes sense since this gets called only when the variable will actually be used in a search together with its context. Also, since ParseVariableD

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman added a comment. If I move the call to DeclLinkDeclToObject inside any of the GetDeclXXX methods, then there is no way to access the VariableSP needed for the call and it is probably harder to reconstruct the parameters needed for ParseVariableDIE starting from just the DIE itself.

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman added a comment. Are you suggesting that the DeclLinkToObject is moved inside the GetDecl call and I only remove that? This is the only place where GetDecl is called, so it would be equivalent from a computational point of view. http://reviews.llvm.org/D12658

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman added a comment. I think the only concern left might be the call to DeclLinkToObject in ParseVariableDIE. It doesn't have anything to do with clang but I feel like there should be a way to do this lazily. Otherwise, I believe that the comments have been addressed. Thank you! http:

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman added a comment. In http://reviews.llvm.org/D12658#245466, @clayborg wrote: > In http://reviews.llvm.org/D12658#244710, @paulherman wrote: > > > [WIP] Search variables based on clang::DeclContext and clang::Decl tree > > > > This revision fixes some of the comments. There are some thin

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman updated this revision to Diff 34711. paulherman added a comment. Search variables based on clang::DeclContext and clang::Decl tree I think this fixes the comments. It also adds a cache for clang::decl so that there is no memory wasted. http://reviews.llvm.org/D12658 Files: includ

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-11 Thread Paul Herman via lldb-commits
paulherman updated this revision to Diff 34616. paulherman added a comment. Search variables based on clang::DeclContext and clang::Decl tree I believe I fixed most of the comments. I removed the handling of using declarations for now and made the test an expected failure because of this. I thi

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-11 Thread Paul Herman via lldb-commits
paulherman updated this revision to Diff 34609. paulherman added a comment. [WIP] Search variables based on clang::DeclContext and clang::Decl tree This revision fixes some of the comments. There are some things I'm not sure about. The problem is that at some point there will be the need to link

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-10 Thread Paul Herman via lldb-commits
paulherman added a comment. I believe that the approach of CompilerDeclContext::FindDecls could be better. But then this kind of forces CompilerDeclContext to inherit CompilerDecl (a function is both a DeclContext and a Decl) and I believe that creating a class for each possible entity is an ov

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-10 Thread Paul Herman via lldb-commits
paulherman added a comment. I agree with most of your comments and will fix them. One thing I noticed is that Block::GetDeclContext() does not do the right thing (see inline comment). About creating a CompilerDecl class, I agree with you. I used CompilerDeclContext since it was just a void* an

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-10 Thread Paul Herman via lldb-commits
paulherman added a comment. Ping. http://reviews.llvm.org/D12658 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Re: [Lldb-commits] [PATCH] D12304: Add scope tree for variable searching

2015-08-27 Thread Paul Herman via lldb-commits
paulherman updated this revision to Diff 33345. paulherman added a comment. Add scope tree for variable searching http://reviews.llvm.org/D12304 Files: include/lldb/Symbol/Block.h include/lldb/Symbol/CompileUnit.h include/lldb/Symbol/Function.h include/lldb/Symbol/Symbol.h include/lld

[Lldb-commits] [lldb] r245515 - Fix tests to work on remote targets.

2015-08-19 Thread Paul Herman via lldb-commits
Author: paulherman Date: Wed Aug 19 17:44:48 2015 New Revision: 245515 URL: http://llvm.org/viewvc/llvm-project?rev=245515&view=rev Log: Fix tests to work on remote targets. Modified: lldb/trunk/test/lang/cpp/chained-calls/TestCppChainedCalls.py lldb/trunk/test/lang/cpp/global_operators/T

[Lldb-commits] [lldb] r245508 - Fix evaluation of global operators in C++

2015-08-19 Thread Paul Herman via lldb-commits
Author: paulherman Date: Wed Aug 19 16:44:56 2015 New Revision: 245508 URL: http://llvm.org/viewvc/llvm-project?rev=245508&view=rev Log: Fix evaluation of global operators in C++ Added: lldb/trunk/test/lang/cpp/global_operators/ lldb/trunk/test/lang/cpp/global_operators/Makefile lldb/

[Lldb-commits] [lldb] r245505 - Improve tests regarding imported namespaces and chained calls in C++

2015-08-19 Thread Paul Herman via lldb-commits
Author: paulherman Date: Wed Aug 19 16:23:01 2015 New Revision: 245505 URL: http://llvm.org/viewvc/llvm-project?rev=245505&view=rev Log: Improve tests regarding imported namespaces and chained calls in C++ Modified: lldb/trunk/test/lang/cpp/chained-calls/TestCppChainedCalls.py lldb/trunk/

Re: [Lldb-commits] [PATCH] D12165: Improve tests regarding imported namespaces and chained calls in C++

2015-08-19 Thread Paul Herman via lldb-commits
paulherman updated this revision to Diff 32593. paulherman added a comment. Improve tests regarding imported namespaces and chained calls in C++ http://reviews.llvm.org/D12165 Files: test/lang/cpp/chained-calls/TestCppChainedCalls.py test/lang/cpp/chained-calls/main.cpp test/lang/cpp/nsim

[Lldb-commits] [PATCH] D12165: Improve tests regarding imported namespaces and chained calls in C++

2015-08-19 Thread Paul Herman via lldb-commits
paulherman created this revision. paulherman added a reviewer: sivachandra. paulherman added a subscriber: lldb-commits. http://reviews.llvm.org/D12165 Files: test/lang/cpp/chained-calls/TestCppChainedCalls.py test/lang/cpp/chained-calls/main.cpp test/lang/cpp/nsimport/TestCppNsImport.py

Re: [Lldb-commits] [PATCH] D11543: Fix evaluation of global operators in C++

2015-08-18 Thread Paul Herman via lldb-commits
paulherman added a comment. Ping http://reviews.llvm.org/D11543 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] r245381 - Fix resolution conflict between global and class static variables in C++

2015-08-18 Thread Paul Herman via lldb-commits
Author: paulherman Date: Tue Aug 18 17:46:57 2015 New Revision: 245381 URL: http://llvm.org/viewvc/llvm-project?rev=245381&view=rev Log: Fix resolution conflict between global and class static variables in C++ Added: lldb/trunk/test/lang/cpp/scope/ lldb/trunk/test/lang/cpp/scope/Makefile

[Lldb-commits] [lldb] r245380 - Test chaned function calls and imported namespaces in C++

2015-08-18 Thread Paul Herman via lldb-commits
Author: paulherman Date: Tue Aug 18 17:43:37 2015 New Revision: 245380 URL: http://llvm.org/viewvc/llvm-project?rev=245380&view=rev Log: Test chaned function calls and imported namespaces in C++ Added: lldb/trunk/test/lang/cpp/chained-calls/ lldb/trunk/test/lang/cpp/chained-calls/Makefile

Re: [Lldb-commits] [PATCH] D12044: Fix resolution conflict between global and class static variables in C++.

2015-08-17 Thread Paul Herman via lldb-commits
paulherman updated this revision to Diff 32345. paulherman added a comment. Fix resolution conflict between global and class static variables in C++ http://reviews.llvm.org/D12044 Files: include/lldb/Symbol/Variable.h include/lldb/Symbol/VariableList.h source/Plugins/SymbolFile/DWARF/Symb

[Lldb-commits] [PATCH] D12044: Fix resolution conflict between global and class static variables in C/C++.

2015-08-14 Thread Paul Herman via lldb-commits
paulherman created this revision. paulherman added reviewers: clayborg, sivachandra, spyffe. paulherman added a subscriber: lldb-commits. Consider having a global variable 'a' and a static variable with the same name inside a class. This resolves the arbitrary choice when resolving the name 'a'.

Re: [Lldb-commits] [PATCH] D11790: Fix ObjC++ types Class and id being defined in C and C++ expressions.

2015-08-14 Thread Paul Herman via lldb-commits
paulherman added a comment. This patch does exactly that. It detects the language of the frame and upgrades it according to the rules you said (I think I might've missed ObjC -> ObjC++, but that can be added). Regarding the global setting of ObjC, I believe it is not helpful. What I mean is, w

Re: [Lldb-commits] [PATCH] D11790: Fix ObjC++ types Class and id being defined in C and C++ expressions.

2015-08-11 Thread Paul Herman via lldb-commits
paulherman added a comment. The idea is that, as I user, I do not expect the identifiers "Class" and "id" to not be available - I don't think I've seen a warning or notice about that when evaluating expressions. I believe that setting the language based on the current frame is a good guess. I