[Lldb-commits] [lldb] r358696 - [CodeComplete] Remove obsolete isOutputBinary().
Author: sammccall Date: Thu Apr 18 10:35:55 2019 New Revision: 358696 URL: http://llvm.org/viewvc/llvm-project?rev=358696&view=rev Log: [CodeComplete] Remove obsolete isOutputBinary(). Summary: It's never set to true. Its only effect would be to set stdout to binary mode. Hopefully we have better ways of doing this by now :-) Reviewers: hokein Subscribers: jkorous, arphaman, kadircet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60871 Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp?rev=358696&r1=358695&r2=358696&view=diff == --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp Thu Apr 18 10:35:55 2019 @@ -703,7 +703,7 @@ public: /// CodeComplete(CompletionRequest &request, clang::LangOptions ops, std::string expr, unsigned position) - : CodeCompleteConsumer(CodeCompleteOptions(), false), + : CodeCompleteConsumer(CodeCompleteOptions()), m_info(std::make_shared()), m_expr(expr), m_position(position), m_request(request), m_desc_policy(ops) { ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D26528: Fix uninitialized members.
sammccall created this revision. sammccall added a subscriber: lldb-commits. Fix uninitialized members. https://reviews.llvm.org/D26528 Files: source/Host/common/FileSpec.cpp source/Target/Process.cpp Index: source/Target/Process.cpp === --- source/Target/Process.cpp +++ source/Target/Process.cpp @@ -4581,7 +4581,7 @@ : IOHandler(process->GetTarget().GetDebugger(), IOHandler::Type::ProcessIO), m_process(process), m_read_file(), m_write_file(write_fd, false), -m_pipe() { +m_pipe(), m_is_running(false) { m_pipe.CreateNew(false); m_read_file.SetDescriptor(GetInputFD(), false); } Index: source/Host/common/FileSpec.cpp === --- source/Host/common/FileSpec.cpp +++ source/Host/common/FileSpec.cpp @@ -278,8 +278,8 @@ } FileSpec::FileSpec() -: m_directory(), m_filename(), m_syntax(FileSystem::GetNativePathSyntax()) { -} +: m_directory(), m_filename(), m_is_resolved(false), + m_syntax(FileSystem::GetNativePathSyntax()) {} //-- // Default constructor that can take an optional full path to a Index: source/Target/Process.cpp === --- source/Target/Process.cpp +++ source/Target/Process.cpp @@ -4581,7 +4581,7 @@ : IOHandler(process->GetTarget().GetDebugger(), IOHandler::Type::ProcessIO), m_process(process), m_read_file(), m_write_file(write_fd, false), -m_pipe() { +m_pipe(), m_is_running(false) { m_pipe.CreateNew(false); m_read_file.SetDescriptor(GetInputFD(), false); } Index: source/Host/common/FileSpec.cpp === --- source/Host/common/FileSpec.cpp +++ source/Host/common/FileSpec.cpp @@ -278,8 +278,8 @@ } FileSpec::FileSpec() -: m_directory(), m_filename(), m_syntax(FileSystem::GetNativePathSyntax()) { -} +: m_directory(), m_filename(), m_is_resolved(false), + m_syntax(FileSystem::GetNativePathSyntax()) {} //-- // Default constructor that can take an optional full path to a ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r286947 - Fix uninitialized members.
Author: sammccall Date: Tue Nov 15 04:58:16 2016 New Revision: 286947 URL: http://llvm.org/viewvc/llvm-project?rev=286947&view=rev Log: Fix uninitialized members. Summary: Fix uninitialized members. Reviewers: jingham Subscribers: jingham, lldb-commits Differential Revision: https://reviews.llvm.org/D26528 Modified: lldb/trunk/include/lldb/Host/FileSpec.h lldb/trunk/source/Host/common/FileSpec.cpp lldb/trunk/source/Target/Process.cpp Modified: lldb/trunk/include/lldb/Host/FileSpec.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/FileSpec.h?rev=286947&r1=286946&r2=286947&view=diff == --- lldb/trunk/include/lldb/Host/FileSpec.h (original) +++ lldb/trunk/include/lldb/Host/FileSpec.h Tue Nov 15 04:58:16 2016 @@ -745,9 +745,9 @@ protected: //-- // Member variables //-- - ConstString m_directory;///< The uniqued directory path - ConstString m_filename; ///< The uniqued filename path - mutable bool m_is_resolved; ///< True if this path has been resolved. + ConstString m_directory;///< The uniqued directory path + ConstString m_filename; ///< The uniqued filename path + mutable bool m_is_resolved = false; ///< True if this path has been resolved. PathSyntax m_syntax; ///< The syntax that this path uses (e.g. Windows / Posix) }; Modified: lldb/trunk/source/Host/common/FileSpec.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/FileSpec.cpp?rev=286947&r1=286946&r2=286947&view=diff == --- lldb/trunk/source/Host/common/FileSpec.cpp (original) +++ lldb/trunk/source/Host/common/FileSpec.cpp Tue Nov 15 04:58:16 2016 @@ -277,16 +277,14 @@ void FileSpec::Resolve(llvm::SmallVector } } -FileSpec::FileSpec() -: m_directory(), m_filename(), m_syntax(FileSystem::GetNativePathSyntax()) { -} +FileSpec::FileSpec() : m_syntax(FileSystem::GetNativePathSyntax()) {} //-- // Default constructor that can take an optional full path to a // file on disk. //-- FileSpec::FileSpec(llvm::StringRef path, bool resolve_path, PathSyntax syntax) -: m_directory(), m_filename(), m_is_resolved(false), m_syntax(syntax) { +: m_syntax(syntax) { SetFile(path, resolve_path, syntax); } Modified: lldb/trunk/source/Target/Process.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=286947&r1=286946&r2=286947&view=diff == --- lldb/trunk/source/Target/Process.cpp (original) +++ lldb/trunk/source/Target/Process.cpp Tue Nov 15 04:58:16 2016 @@ -4577,8 +4577,7 @@ public: IOHandlerProcessSTDIO(Process *process, int write_fd) : IOHandler(process->GetTarget().GetDebugger(), IOHandler::Type::ProcessIO), -m_process(process), m_read_file(), m_write_file(write_fd, false), -m_pipe() { +m_process(process), m_write_file(write_fd, false) { m_pipe.CreateNew(false); m_read_file.SetDescriptor(GetInputFD(), false); } @@ -4710,7 +4709,7 @@ protected: File m_write_file; // Write to this file (usually the master pty for getting // io to debuggee) Pipe m_pipe; - std::atomic m_is_running; + std::atomic m_is_running{false}; }; void Process::SetSTDIOFileDescriptor(int fd) { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r287274 - Fix step-over when SymbolContext.function is missing and symbol is present.
Author: sammccall Date: Thu Nov 17 16:29:31 2016 New Revision: 287274 URL: http://llvm.org/viewvc/llvm-project?rev=287274&view=rev Log: Fix step-over when SymbolContext.function is missing and symbol is present. Summary: Fix step-over when SymbolContext.function is missing and symbol is present. With targets from our build configuration, ThreadPlanStepOverRange::IsEquivalentContext fails to fire for relevant frames, leading to ShouldStop() returning true prematurely. The frame's SymbolContext, and m_addr_context have: - comp_unit set and matching - function = nullptr - symbol set and matching (but this is never checked) My naive guess is that the context should be equivalent in this case :-) Reviewers: jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D26804 Modified: lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp Modified: lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp?rev=287274&r1=287273&r2=287274&view=diff == --- lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp (original) +++ lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp Thu Nov 17 16:29:31 2016 @@ -107,21 +107,22 @@ bool ThreadPlanStepOverRange::IsEquivale // the .o file from the // inlined range, so I left that out too... if (m_addr_context.comp_unit) { -if (m_addr_context.comp_unit == context.comp_unit) { - if (m_addr_context.function && - m_addr_context.function == context.function) { -// It is okay to return to a different block of a straight function, we -// only have to -// be more careful if returning from one inlined block to another. -if (m_addr_context.block->GetInlinedFunctionInfo() == nullptr && -context.block->GetInlinedFunctionInfo() == nullptr) - return true; - -if (m_addr_context.block && m_addr_context.block == context.block) - return true; - } +if (m_addr_context.comp_unit != context.comp_unit) + return false; +if (m_addr_context.function) { + if (m_addr_context.function != context.function) +return false; + // It is okay to return to a different block of a straight function, we + // only have to + // be more careful if returning from one inlined block to another. + if (m_addr_context.block->GetInlinedFunctionInfo() == nullptr && + context.block->GetInlinedFunctionInfo() == nullptr) +return true; + return m_addr_context.block == context.block; } - } else if (m_addr_context.symbol && m_addr_context.symbol == context.symbol) { + } + // Fall back to symbol if we have no decision from comp_unit/function/block. + if (m_addr_context.symbol && m_addr_context.symbol == context.symbol) { return true; } return false; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r287636 - Improve detection of global vs local variables
Author: sammccall Date: Tue Nov 22 05:40:25 2016 New Revision: 287636 URL: http://llvm.org/viewvc/llvm-project?rev=287636&view=rev Log: Improve detection of global vs local variables Summary: Improve detection of global vs local variables. Currently when a global variable is optimized out or otherwise has an unknown location (DW_AT_location is empty) it gets reported as local. I added two new heuristics: - if a mangled name is present, the variable is global (or static) - if DW_AT_location is present but invalid, the variable is global (or static) Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D26908 Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=287636&r1=287635&r2=287636&view=diff == --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Tue Nov 22 05:40:25 2016 @@ -3873,6 +3873,7 @@ VariableSP SymbolFileDWARF::ParseVariabl const DWARFDIE sc_parent_die = GetParentSymbolContextDIE(die); SymbolContextScope *symbol_context_scope = NULL; + bool has_explicit_mangled = mangled != nullptr; if (!mangled) { // LLDB relies on the mangled name (DW_TAG_linkage_name or // DW_AT_MIPS_linkage_name) to @@ -3894,23 +3895,24 @@ VariableSP SymbolFileDWARF::ParseVariabl } } - // DWARF doesn't specify if a DW_TAG_variable is a local, global - // or static variable, so we have to do a little digging by - // looking at the location of a variable to see if it contains - // a DW_OP_addr opcode _somewhere_ in the definition. I say - // somewhere because clang likes to combine small global variables - // into the same symbol and have locations like: - // DW_OP_addr(0x1000), DW_OP_constu(2), DW_OP_plus - // So if we don't have a DW_TAG_formal_parameter, we can look at - // the location to see if it contains a DW_OP_addr opcode, and - // then we can correctly classify our variables. if (tag == DW_TAG_formal_parameter) scope = eValueTypeVariableArgument; else { -bool op_error = false; +// DWARF doesn't specify if a DW_TAG_variable is a local, global +// or static variable, so we have to do a little digging: +// 1) DW_AT_linkage_name implies static lifetime (but may be missing) +// 2) An empty DW_AT_location is an (optimized-out) static lifetime var. +// 3) DW_AT_location containing a DW_OP_addr implies static lifetime. +// Clang likes to combine small global variables into the same symbol +// with locations like: DW_OP_addr(0x1000), DW_OP_constu(2), DW_OP_plus +// so we need to look through the whole expression. +bool is_static_lifetime = +has_explicit_mangled || +(has_explicit_location && !location.IsValid()); // Check if the location has a DW_OP_addr with any address value... lldb::addr_t location_DW_OP_addr = LLDB_INVALID_ADDRESS; if (!location_is_const_value_data) { + bool op_error = false; location_DW_OP_addr = location.GetLocation_DW_OP_addr(0, op_error); if (op_error) { StreamString strm; @@ -3920,10 +3922,12 @@ VariableSP SymbolFileDWARF::ParseVariabl "0x%8.8x: %s has an invalid location: %s", die.GetOffset(), die.GetTagAsCString(), strm.GetData()); } + if (location_DW_OP_addr != LLDB_INVALID_ADDRESS) +is_static_lifetime = true; } SymbolFileDWARFDebugMap *debug_map_symfile = GetDebugMapSymfile(); -if (location_DW_OP_addr != LLDB_INVALID_ADDRESS) { +if (is_static_lifetime) { if (is_external) scope = eValueTypeVariableGlobal; else ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] cc56c66 - Revert "[AST] Add UsingType: a sugar type for types found via UsingDecl"
Author: Sam McCall Date: 2021-12-20T17:53:56+01:00 New Revision: cc56c66f27e131b914082d3bd21180646e842e9a URL: https://github.com/llvm/llvm-project/commit/cc56c66f27e131b914082d3bd21180646e842e9a DIFF: https://github.com/llvm/llvm-project/commit/cc56c66f27e131b914082d3bd21180646e842e9a.diff LOG: Revert "[AST] Add UsingType: a sugar type for types found via UsingDecl" This reverts commit e1600db19d6303f84b995acb9340459694e06ea9. Breaks sanitizer tests, at least on windows: https://lab.llvm.org/buildbot/#/builders/127/builds/21592/steps/4/logs/stdio Added: Modified: clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp clang-tools-extra/clangd/FindTarget.cpp clang-tools-extra/clangd/IncludeCleaner.cpp clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp clang-tools-extra/clangd/unittests/XRefsTests.cpp clang/docs/ReleaseNotes.rst clang/include/clang/AST/ASTContext.h clang/include/clang/AST/PropertiesBase.td clang/include/clang/AST/RecursiveASTVisitor.h clang/include/clang/AST/TextNodeDumper.h clang/include/clang/AST/Type.h clang/include/clang/AST/TypeLoc.h clang/include/clang/AST/TypeProperties.td clang/include/clang/ASTMatchers/ASTMatchers.h clang/include/clang/ASTMatchers/ASTMatchersInternal.h clang/include/clang/Basic/TypeNodes.td clang/include/clang/Serialization/TypeBitCodes.def clang/lib/AST/ASTContext.cpp clang/lib/AST/ASTDiagnostic.cpp clang/lib/AST/ASTImporter.cpp clang/lib/AST/ASTStructuralEquivalence.cpp clang/lib/AST/ItaniumMangle.cpp clang/lib/AST/QualTypeNames.cpp clang/lib/AST/TextNodeDumper.cpp clang/lib/AST/Type.cpp clang/lib/AST/TypePrinter.cpp clang/lib/ASTMatchers/ASTMatchersInternal.cpp clang/lib/ASTMatchers/Dynamic/Registry.cpp clang/lib/CodeGen/CGDebugInfo.cpp clang/lib/CodeGen/CodeGenFunction.cpp clang/lib/Sema/SemaCXXScopeSpec.cpp clang/lib/Sema/SemaDecl.cpp clang/lib/Sema/SemaExpr.cpp clang/lib/Sema/TreeTransform.h clang/lib/Serialization/ASTReader.cpp clang/lib/Serialization/ASTWriter.cpp clang/tools/libclang/CIndex.cpp clang/unittests/AST/ASTImporterTest.cpp lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp Removed: clang/test/AST/ast-dump-using.cpp diff --git a/clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp b/clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp index 4c6d898d4cf7..d943b7a1a270 100644 --- a/clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp +++ b/clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp @@ -196,12 +196,6 @@ void UpgradeGoogletestCaseCheck::registerMatchers(MatchFinder *Finder) { usingDecl(hasAnyUsingShadowDecl(hasTargetDecl(TestCaseTypeAlias))) .bind("using"), this); - Finder->addMatcher( - typeLoc(loc(usingType(hasUnderlyingType( - typedefType(hasDeclaration(TestCaseTypeAlias), - unless(hasAncestor(decl(isImplicit(, LocationFilter) - .bind("typeloc"), - this); } static llvm::StringRef getNewMethodName(llvm::StringRef CurrentName) { diff --git a/clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp b/clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp index 9265504a7651..04dff8dfefe0 100644 --- a/clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp +++ b/clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp @@ -45,7 +45,6 @@ AST_MATCHER_P(DeducedTemplateSpecializationType, refsToTemplatedDecl, return DeclMatcher.matches(*TD, Finder, Builder); return false; } - } // namespace // A function that helps to tell whether a TargetDecl in a UsingDecl will be @@ -61,10 +60,13 @@ static bool shouldCheckDecl(const Decl *TargetDecl) { void UnusedUsingDeclsCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher(usingDecl(isExpansionInMainFile()).bind("using"), this); auto DeclMatcher = hasDeclaration(namedDecl().bind("used")); + Finder->addMatcher(loc(enumType(DeclMatcher)), this); + Finder->addMatcher(loc(recordType(DeclMatcher)), this); Finder->addMatcher(loc(templateSpecializationType(DeclMatcher)), this); Finder->addMatcher(loc(deducedTemplateSpecializationType( refsToTemplatedDecl(namedDecl().bind("used", this); + Finder->addMatcher(declRefExpr().bind("used"), this); Finder->addMatcher(callExpr(callee(unresolvedLookupExpr().bind("used"))), this); Finder->addMatcher( @@ -74,12 +76,6 @@ void UnusedUsingDeclsCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher(loc(templateSpecializationType(forEachTemplateArgument(
[Lldb-commits] [lldb] af27466 - Reland "[AST] Add UsingType: a sugar type for types found via UsingDecl"
Author: Sam McCall Date: 2021-12-20T18:03:15+01:00 New Revision: af27466c50398e3f04372850370eab8dc8abbb92 URL: https://github.com/llvm/llvm-project/commit/af27466c50398e3f04372850370eab8dc8abbb92 DIFF: https://github.com/llvm/llvm-project/commit/af27466c50398e3f04372850370eab8dc8abbb92.diff LOG: Reland "[AST] Add UsingType: a sugar type for types found via UsingDecl" This reverts commit cc56c66f27e131b914082d3bd21180646e842e9a. Fixed a bad assertion, the target of a UsingShadowDecl must not have *local* qualifiers, but it can be a typedef whose underlying type is qualified. Added: clang/test/AST/ast-dump-using.cpp Modified: clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp clang-tools-extra/clangd/FindTarget.cpp clang-tools-extra/clangd/IncludeCleaner.cpp clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp clang-tools-extra/clangd/unittests/XRefsTests.cpp clang/docs/ReleaseNotes.rst clang/include/clang/AST/ASTContext.h clang/include/clang/AST/PropertiesBase.td clang/include/clang/AST/RecursiveASTVisitor.h clang/include/clang/AST/TextNodeDumper.h clang/include/clang/AST/Type.h clang/include/clang/AST/TypeLoc.h clang/include/clang/AST/TypeProperties.td clang/include/clang/ASTMatchers/ASTMatchers.h clang/include/clang/ASTMatchers/ASTMatchersInternal.h clang/include/clang/Basic/TypeNodes.td clang/include/clang/Serialization/TypeBitCodes.def clang/lib/AST/ASTContext.cpp clang/lib/AST/ASTDiagnostic.cpp clang/lib/AST/ASTImporter.cpp clang/lib/AST/ASTStructuralEquivalence.cpp clang/lib/AST/ItaniumMangle.cpp clang/lib/AST/QualTypeNames.cpp clang/lib/AST/TextNodeDumper.cpp clang/lib/AST/Type.cpp clang/lib/AST/TypePrinter.cpp clang/lib/ASTMatchers/ASTMatchersInternal.cpp clang/lib/ASTMatchers/Dynamic/Registry.cpp clang/lib/CodeGen/CGDebugInfo.cpp clang/lib/CodeGen/CodeGenFunction.cpp clang/lib/Sema/SemaCXXScopeSpec.cpp clang/lib/Sema/SemaDecl.cpp clang/lib/Sema/SemaExpr.cpp clang/lib/Sema/TreeTransform.h clang/lib/Serialization/ASTReader.cpp clang/lib/Serialization/ASTWriter.cpp clang/tools/libclang/CIndex.cpp clang/unittests/AST/ASTImporterTest.cpp lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp Removed: diff --git a/clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp b/clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp index d943b7a1a270..4c6d898d4cf7 100644 --- a/clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp +++ b/clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp @@ -196,6 +196,12 @@ void UpgradeGoogletestCaseCheck::registerMatchers(MatchFinder *Finder) { usingDecl(hasAnyUsingShadowDecl(hasTargetDecl(TestCaseTypeAlias))) .bind("using"), this); + Finder->addMatcher( + typeLoc(loc(usingType(hasUnderlyingType( + typedefType(hasDeclaration(TestCaseTypeAlias), + unless(hasAncestor(decl(isImplicit(, LocationFilter) + .bind("typeloc"), + this); } static llvm::StringRef getNewMethodName(llvm::StringRef CurrentName) { diff --git a/clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp b/clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp index 04dff8dfefe0..9265504a7651 100644 --- a/clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp +++ b/clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp @@ -45,6 +45,7 @@ AST_MATCHER_P(DeducedTemplateSpecializationType, refsToTemplatedDecl, return DeclMatcher.matches(*TD, Finder, Builder); return false; } + } // namespace // A function that helps to tell whether a TargetDecl in a UsingDecl will be @@ -60,13 +61,10 @@ static bool shouldCheckDecl(const Decl *TargetDecl) { void UnusedUsingDeclsCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher(usingDecl(isExpansionInMainFile()).bind("using"), this); auto DeclMatcher = hasDeclaration(namedDecl().bind("used")); - Finder->addMatcher(loc(enumType(DeclMatcher)), this); - Finder->addMatcher(loc(recordType(DeclMatcher)), this); Finder->addMatcher(loc(templateSpecializationType(DeclMatcher)), this); Finder->addMatcher(loc(deducedTemplateSpecializationType( refsToTemplatedDecl(namedDecl().bind("used", this); - Finder->addMatcher(declRefExpr().bind("used"), this); Finder->addMatcher(callExpr(callee(unresolvedLookupExpr().bind("used"))), this); Finder->addMatcher( @@ -76,6 +74,12 @@ void UnusedUsingDeclsCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher(loc(templateSpecializationType(forEachTemplat
[Lldb-commits] [lldb] 92417ea - [CodeCompletion] Signature help for braced constructor calls
Author: Sam McCall Date: 2022-01-03T20:14:59+01:00 New Revision: 92417eaf3329dc823c905ec6a608b83ac62b4f7c URL: https://github.com/llvm/llvm-project/commit/92417eaf3329dc823c905ec6a608b83ac62b4f7c DIFF: https://github.com/llvm/llvm-project/commit/92417eaf3329dc823c905ec6a608b83ac62b4f7c.diff LOG: [CodeCompletion] Signature help for braced constructor calls Implementation is based on the "expected type" as used for designated-initializers in braced init lists. This means it can deduce the type in some cases where it's not written: void foo(Widget); foo({ /*help here*/ }); Only basic constructor calls are in scope of this patch, excluded are: - aggregate initialization (no help is offered for aggregates) - initializer_list initialization (no help is offered for these constructors) Fixes https://github.com/clangd/clangd/issues/306 Differential Revision: https://reviews.llvm.org/D116317 Added: Modified: clang-tools-extra/clangd/ClangdLSPServer.cpp clang-tools-extra/clangd/CodeComplete.cpp clang-tools-extra/clangd/test/initialize-params.test clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp clang/include/clang/Sema/CodeCompleteConsumer.h clang/include/clang/Sema/Sema.h clang/lib/Frontend/ASTUnit.cpp clang/lib/Parse/ParseDecl.cpp clang/lib/Parse/ParseDeclCXX.cpp clang/lib/Parse/ParseExprCXX.cpp clang/lib/Parse/ParseInit.cpp clang/lib/Parse/ParseOpenMP.cpp clang/lib/Sema/CodeCompleteConsumer.cpp clang/lib/Sema/SemaCodeComplete.cpp clang/test/CodeCompletion/ctor-signature.cpp clang/tools/libclang/CIndexCodeCompletion.cpp lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp Removed: diff --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp index 774cdea218d00..edde19f96202f 100644 --- a/clang-tools-extra/clangd/ClangdLSPServer.cpp +++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp @@ -555,7 +555,7 @@ void ClangdLSPServer::onInitialize(const InitializeParams &Params, }}, {"signatureHelpProvider", llvm::json::Object{ - {"triggerCharacters", {"(", ",", ")", "<", ">"}}, + {"triggerCharacters", {"(", ")", "{", "}", "<", ">", ","}}, }}, {"declarationProvider", true}, {"definitionProvider", true}, diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp index bdfa1df194537..53d8f0d6cdeb7 100644 --- a/clang-tools-extra/clangd/CodeComplete.cpp +++ b/clang-tools-extra/clangd/CodeComplete.cpp @@ -921,7 +921,8 @@ class SignatureHelpCollector final : public CodeCompleteConsumer { void ProcessOverloadCandidates(Sema &S, unsigned CurrentArg, OverloadCandidate *Candidates, unsigned NumCandidates, - SourceLocation OpenParLoc) override { + SourceLocation OpenParLoc, + bool Braced) override { assert(!OpenParLoc.isInvalid()); SourceManager &SrcMgr = S.getSourceManager(); OpenParLoc = SrcMgr.getFileLoc(OpenParLoc); @@ -961,8 +962,9 @@ class SignatureHelpCollector final : public CodeCompleteConsumer { paramIndexForArg(Candidate, SigHelp.activeParameter); } - const auto *CCS = Candidate.CreateSignatureString( - CurrentArg, S, *Allocator, CCTUInfo, true); + const auto *CCS = + Candidate.CreateSignatureString(CurrentArg, S, *Allocator, CCTUInfo, + /*IncludeBriefComment=*/true, Braced); assert(CCS && "Expected the CodeCompletionString to be non-null"); ScoredSignatures.push_back(processOverloadCandidate( Candidate, *CCS, @@ -1163,7 +1165,8 @@ class ParamNameCollector final : public CodeCompleteConsumer { void ProcessOverloadCandidates(Sema &S, unsigned CurrentArg, OverloadCandidate *Candidates, unsigned NumCandidates, - SourceLocation OpenParLoc) override { + SourceLocation OpenParLoc, + bool Braced) override { assert(CurrentArg <= (unsigned)std::numeric_limits::max() && "too many arguments"); diff --git a/clang-tools-extra/clangd/test/initialize-params.test b/clang-tools-extra/clangd/test/initialize-params.test index 72823f3a0683d..2affc8b2466dd 100644 --- a/clang-tools-extra/clangd/test/initialize-params.test +++ b/clang-tools-extra/clangd/test/initialize-params.test @@ -107,10 +107,12 @@ # CHECK-NEXT: "signatureHelpProvider": { # CHECK-NEXT:"triggerCharacters": [ # CHECK-NEXT: "(", -# CHECK-NEXT: ",", # CHECK-NEXT: ")", +# CHECK-NEXT: "{", +# CHE
[Lldb-commits] [lldb] 499d0b9 - [clang] createInvocationFromCommandLine -> createInvocation, delete former. NFC
Author: Sam McCall Date: 2022-05-06T16:21:48+02:00 New Revision: 499d0b96cb52c828e7fc4d58825b5e8b3f9931c5 URL: https://github.com/llvm/llvm-project/commit/499d0b96cb52c828e7fc4d58825b5e8b3f9931c5 DIFF: https://github.com/llvm/llvm-project/commit/499d0b96cb52c828e7fc4d58825b5e8b3f9931c5.diff LOG: [clang] createInvocationFromCommandLine -> createInvocation, delete former. NFC (Followup from 40c13720a4b977d4347bbde53c52a4d0703823c2) Differential Revision: https://reviews.llvm.org/D125012 Added: Modified: clang/include/clang/Frontend/Utils.h clang/lib/Frontend/ASTUnit.cpp clang/lib/Frontend/CreateInvocationFromCommandLine.cpp clang/tools/c-index-test/core_main.cpp clang/tools/diagtool/ShowEnabledWarnings.cpp clang/tools/libclang/Indexing.cpp clang/unittests/Frontend/ASTUnitTest.cpp clang/unittests/Frontend/CompilerInstanceTest.cpp clang/unittests/Serialization/ModuleCacheTest.cpp clang/unittests/Tooling/Syntax/TokensTest.cpp clang/unittests/Tooling/Syntax/TreeTestBase.cpp lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp Removed: diff --git a/clang/include/clang/Frontend/Utils.h b/clang/include/clang/Frontend/Utils.h index 47f795b388f7..1e8841429ffa 100644 --- a/clang/include/clang/Frontend/Utils.h +++ b/clang/include/clang/Frontend/Utils.h @@ -234,15 +234,6 @@ std::unique_ptr createInvocation(ArrayRef Args, CreateInvocationOptions Opts = {}); -/// Deprecated version of createInvocation with individual optional args. -std::unique_ptr createInvocationFromCommandLine( -ArrayRef Args, -IntrusiveRefCntPtr Diags = -IntrusiveRefCntPtr(), -IntrusiveRefCntPtr VFS = nullptr, -bool ShouldRecoverOnErrors = false, -std::vector *CC1Args = nullptr, bool ProbePrecompiled = true); - } // namespace clang #endif // LLVM_CLANG_FRONTEND_UTILS_H diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index 5f587cc1c023..1d0f472e9c6e 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -1729,8 +1729,11 @@ ASTUnit *ASTUnit::LoadFromCommandLine( CaptureDroppedDiagnostics Capture(CaptureDiagnostics, *Diags, &StoredDiagnostics, nullptr); -CI = createInvocationFromCommandLine( -llvm::makeArrayRef(ArgBegin, ArgEnd), Diags, VFS); +CreateInvocationOptions CIOpts; +CIOpts.VFS = VFS; +CIOpts.Diags = Diags; +CI = createInvocation(llvm::makeArrayRef(ArgBegin, ArgEnd), + std::move(CIOpts)); if (!CI) return nullptr; } diff --git a/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp b/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp index 2a98aab44ccb..49e814b31b43 100644 --- a/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp +++ b/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp @@ -104,12 +104,3 @@ clang::createInvocation(ArrayRef ArgList, return nullptr; return CI; } - -std::unique_ptr clang::createInvocationFromCommandLine( -ArrayRef Args, IntrusiveRefCntPtr Diags, -IntrusiveRefCntPtr VFS, bool ShouldRecoverOnErrors, -std::vector *CC1Args, bool ProbePrecompiled) { - return createInvocation( - Args, CreateInvocationOptions{Diags, VFS, ShouldRecoverOnErrors, -ProbePrecompiled, CC1Args}); -} diff --git a/clang/tools/c-index-test/core_main.cpp b/clang/tools/c-index-test/core_main.cpp index 7037252ffa0e..c5f47baa8458 100644 --- a/clang/tools/c-index-test/core_main.cpp +++ b/clang/tools/c-index-test/core_main.cpp @@ -13,6 +13,7 @@ #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/CompilerInvocation.h" #include "clang/Frontend/FrontendAction.h" +#include "clang/Frontend/Utils.h" #include "clang/Index/IndexDataConsumer.h" #include "clang/Index/IndexingAction.h" #include "clang/Index/USRGeneration.h" @@ -220,7 +221,9 @@ static bool printSourceSymbols(const char *Executable, ArgsWithProgName.append(Args.begin(), Args.end()); IntrusiveRefCntPtr Diags(CompilerInstance::createDiagnostics(new DiagnosticOptions)); - auto CInvok = createInvocationFromCommandLine(ArgsWithProgName, Diags); + CreateInvocationOptions CIOpts; + CIOpts.Diags = Diags; + auto CInvok = createInvocation(ArgsWithProgName, std::move(CIOpts)); if (!CInvok) return true; diff --git a/clang/tools/diagtool/ShowEnabledWarnings.cpp b/clang/tools/diagtool/ShowEnabledWarnings.cpp index ae2d3e37e845..e5a7b2532824 100644 --- a/clang/tools/diagtool/ShowEnabledWarnings.cpp +++ b/clang/tools/diagtool/ShowEnabledWarnings.cpp @@ -59,15 +59,16 @@ createDiagnostics(unsigned int argc, char **argv) { // Buffer diagnostics from argument parsing so that we can output them using a // well formed diagnostic object. TextDiagnosticBuffer *DiagsBuffer = new TextDiagnostic
[Lldb-commits] [lldb] 6ed81ab - Fix LLDB test broken by 499d0b96cb52c828e7fc4d58825b5e8b3f9931c5
Author: Sam McCall Date: 2022-05-06T17:09:02+02:00 New Revision: 6ed81abec2531984e8068de80637bc9f5a041655 URL: https://github.com/llvm/llvm-project/commit/6ed81abec2531984e8068de80637bc9f5a041655 DIFF: https://github.com/llvm/llvm-project/commit/6ed81abec2531984e8068de80637bc9f5a041655.diff LOG: Fix LLDB test broken by 499d0b96cb52c828e7fc4d58825b5e8b3f9931c5 Added: Modified: lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp Removed: diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp index 385bb51eca5b0..38dd55bc76d36 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp @@ -663,7 +663,7 @@ ClangModulesDeclVendor::Create(Target &target) { llvm::make_range(compiler_invocation_arguments.begin(), compiler_invocation_arguments.end())); - CreateInvocationOptions CIOpts; + clang::CreateInvocationOptions CIOpts; CIOpts.Diags = diagnostics_engine; std::shared_ptr invocation = clang::createInvocation(compiler_invocation_argument_cstrs, ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] fa69b60 - [JSON] Add error reporting to fromJSON and ObjectMapper
Author: Sam McCall Date: 2020-09-24T01:20:09+02:00 New Revision: fa69b608063eecba76fb35d167b063cbfe532c28 URL: https://github.com/llvm/llvm-project/commit/fa69b608063eecba76fb35d167b063cbfe532c28 DIFF: https://github.com/llvm/llvm-project/commit/fa69b608063eecba76fb35d167b063cbfe532c28.diff LOG: [JSON] Add error reporting to fromJSON and ObjectMapper Translating between JSON objects and C++ strutctures is common. >From experience in clangd, fromJSON/ObjectMapper work well and save a lot of code, but aren't adopted elsewhere at least partly due to total lack of error reporting beyond "ok"/"bad". The recently-added error model should be rich enough for most applications. It requires tracking the path within the root object and reporting local errors at appropriate places. To do this, we exploit the fact that the call graph of recursive parse functions mirror the structure of the JSON itself. The current path is represented as a linked list of segments, each of which is on the stack as a parameter. Concretely, fromJSON now looks like: bool fromJSON(const Value&, T&, Path); Beyond the signature change, this is reasonably unobtrusive: building the path segments is mostly handled by ObjectMapper and the vector fromJSON. However the root caller of fromJSON must now create a Root object to store the errors, which is a little clunky. I've added high-level parse(StringRef) -> Expected, but it's not general enough to be the primary interface I think (at least, not usable in clangd). All existing users (mostly just clangd) are updated in this patch, making this change backwards-compatible is a bit hairy. Differential Revision: https://reviews.llvm.org/D88103 Added: Modified: clang-tools-extra/clangd/ClangdLSPServer.cpp clang-tools-extra/clangd/ClangdLSPServer.h clang-tools-extra/clangd/Protocol.cpp clang-tools-extra/clangd/Protocol.h clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp clang-tools-extra/clangd/index/Index.cpp clang-tools-extra/clangd/index/Index.h lldb/source/Utility/StructuredData.cpp llvm/include/llvm/Support/JSON.h llvm/lib/Analysis/TFUtils.cpp llvm/unittests/Support/JSONTest.cpp Removed: diff --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp index 4cc1feabb15f..fa4a4ab86a8c 100644 --- a/clang-tools-extra/clangd/ClangdLSPServer.cpp +++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp @@ -247,14 +247,10 @@ class ClangdLSPServer::MessageHandler : public Transport::MessageHandler { void (ClangdLSPServer::*Handler)(const Param &, Callback)) { Calls[Method] = [Method, Handler, this](llvm::json::Value RawParams, ReplyOnce Reply) { - Param P; - if (fromJSON(RawParams, P)) { -(Server.*Handler)(P, std::move(Reply)); - } else { -elog("Failed to decode {0} request.", Method); -Reply(llvm::make_error("failed to decode request", - ErrorCode::InvalidRequest)); - } + auto P = parse(RawParams, Method, "request"); + if (!P) +return Reply(P.takeError()); + (Server.*Handler)(*P, std::move(Reply)); }; } @@ -292,14 +288,12 @@ class ClangdLSPServer::MessageHandler : public Transport::MessageHandler { void (ClangdLSPServer::*Handler)(const Param &)) { Notifications[Method] = [Method, Handler, this](llvm::json::Value RawParams) { - Param P; - if (!fromJSON(RawParams, P)) { -elog("Failed to decode {0} request.", Method); -return; - } + llvm::Expected P = parse(RawParams, Method, "request"); + if (!P) +return llvm::consumeError(P.takeError()); trace::Span Tracer(Method, LSPLatency); SPAN_ATTACH(Tracer, "Params", RawParams); - (Server.*Handler)(P); + (Server.*Handler)(*P); }; } diff --git a/clang-tools-extra/clangd/ClangdLSPServer.h b/clang-tools-extra/clangd/ClangdLSPServer.h index d0c0e814c641..7815d4e46795 100644 --- a/clang-tools-extra/clangd/ClangdLSPServer.h +++ b/clang-tools-extra/clangd/ClangdLSPServer.h @@ -180,22 +180,37 @@ class ClangdLSPServer : private ClangdServer::Callbacks { std::unique_ptr MsgHandler; std::mutex TranspWriter; + template + static Expected parse(const llvm::json::Value &Raw, + llvm::StringRef PayloadName, + llvm::StringRef PayloadKind) { +T Result; +llvm::json::Path::Root Root; +if (!fromJSON(Raw, Result, Root)) { + elog("Failed to decode {0} {1}", PayloadName, PayloadKind); + // Dump the relevant parts of the broken message. + std::string Context; + llvm::raw_string_ostream OS(Context); + Root.printErrorContext(Raw, OS); + vlog("{0}", OS.str()); + // Report the error (e
[Lldb-commits] [lldb] 751f5c8 - Fix LLDB tweak in 62a47e994fcf5b73e29547d26cd9676b30cb69a3
Author: Sam McCall Date: 2020-09-24T01:30:42+02:00 New Revision: 751f5c81468966d921ad54827d27ff19aa43af8e URL: https://github.com/llvm/llvm-project/commit/751f5c81468966d921ad54827d27ff19aa43af8e DIFF: https://github.com/llvm/llvm-project/commit/751f5c81468966d921ad54827d27ff19aa43af8e.diff LOG: Fix LLDB tweak in 62a47e994fcf5b73e29547d26cd9676b30cb69a3 Added: Modified: lldb/source/Utility/StructuredData.cpp Removed: diff --git a/lldb/source/Utility/StructuredData.cpp b/lldb/source/Utility/StructuredData.cpp index 4e79f6e9a7d7..b349de7b0b78 100644 --- a/lldb/source/Utility/StructuredData.cpp +++ b/lldb/source/Utility/StructuredData.cpp @@ -63,7 +63,7 @@ static StructuredData::ObjectSP ParseJSONValue(json::Value &value) { if (auto b = value.getAsBoolean()) return std::make_shared(*b); - if (auto i = value.getAsInteger(i)) + if (auto i = value.getAsInteger()) return std::make_shared(*i); if (auto d = value.getAsNumber()) ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r373719 - [lldb] Fix typo in r373675
Author: sammccall Date: Fri Oct 4 02:33:04 2019 New Revision: 373719 URL: http://llvm.org/viewvc/llvm-project?rev=373719&view=rev Log: [lldb] Fix typo in r373675 Modified: lldb/trunk/scripts/Python/python-wrapper.swig Modified: lldb/trunk/scripts/Python/python-wrapper.swig URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/python-wrapper.swig?rev=373719&r1=373718&r2=373719&view=diff == --- lldb/trunk/scripts/Python/python-wrapper.swig (original) +++ lldb/trunk/scripts/Python/python-wrapper.swig Fri Oct 4 02:33:04 2019 @@ -288,7 +288,7 @@ LLDBSwigPythonCreateScriptedThreadPlan Py_RETURN_NONE; } result = pfunc(tp_arg, dict); -} else if (init_num_args = 4) { +} else if (init_num_args == 4) { lldb::SBStructuredData *args_value = new lldb::SBStructuredData(args_impl); PythonObject args_arg(PyRefType::Owned, SBTypeToSWIGWrapper(args_value)); result = pfunc(tp_arg, args_arg, dict); ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r373721 - [lldb] Fix -Wreorder-ctor in r373673
Author: sammccall Date: Fri Oct 4 02:41:43 2019 New Revision: 373721 URL: http://llvm.org/viewvc/llvm-project?rev=373721&view=rev Log: [lldb] Fix -Wreorder-ctor in r373673 Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=373721&r1=373720&r2=373721&view=diff == --- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Fri Oct 4 02:41:43 2019 @@ -242,19 +242,18 @@ public: interpreter, "breakpoint set", "Sets a breakpoint or set of breakpoints in the executable.", "breakpoint set "), -m_python_class_options("scripted breakpoint", 'P'), -m_bp_opts(), m_options() { - // We're picking up all the normal options, commands and disable. - m_all_options.Append(&m_python_class_options, LLDB_OPT_SET_1, - LLDB_OPT_SET_11); - m_all_options.Append(&m_bp_opts, - LLDB_OPT_SET_1 | LLDB_OPT_SET_3 | LLDB_OPT_SET_4, - LLDB_OPT_SET_ALL); - m_all_options.Append(&m_dummy_options, LLDB_OPT_SET_1, - LLDB_OPT_SET_ALL); - m_all_options.Append(&m_options); - m_all_options.Finalize(); -} +m_bp_opts(), m_python_class_options("scripted breakpoint", 'P'), +m_options() { +// We're picking up all the normal options, commands and disable. +m_all_options.Append(&m_python_class_options, LLDB_OPT_SET_1, + LLDB_OPT_SET_11); +m_all_options.Append(&m_bp_opts, + LLDB_OPT_SET_1 | LLDB_OPT_SET_3 | LLDB_OPT_SET_4, + LLDB_OPT_SET_ALL); +m_all_options.Append(&m_dummy_options, LLDB_OPT_SET_1, LLDB_OPT_SET_ALL); +m_all_options.Append(&m_options); +m_all_options.Finalize(); + } ~CommandObjectBreakpointSet() override = default; ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] d035c83 - [lldb] Try to fix writing outside temp dir from 4bafceced6a7641be7b090229c6ccef22cf55bff
Author: Sam McCall Date: 2020-01-17T17:30:12+01:00 New Revision: d035c832c3f9d29eb1d29b6d22cd8d018a6462c6 URL: https://github.com/llvm/llvm-project/commit/d035c832c3f9d29eb1d29b6d22cd8d018a6462c6 DIFF: https://github.com/llvm/llvm-project/commit/d035c832c3f9d29eb1d29b6d22cd8d018a6462c6.diff LOG: [lldb] Try to fix writing outside temp dir from 4bafceced6a7641be7b090229c6ccef22cf55bff Added: Modified: lldb/test/Shell/ObjectFile/wasm/unified-debug-sections.yaml Removed: diff --git a/lldb/test/Shell/ObjectFile/wasm/unified-debug-sections.yaml b/lldb/test/Shell/ObjectFile/wasm/unified-debug-sections.yaml index d72080f40224..852fbb64cc78 100644 --- a/lldb/test/Shell/ObjectFile/wasm/unified-debug-sections.yaml +++ b/lldb/test/Shell/ObjectFile/wasm/unified-debug-sections.yaml @@ -1,3 +1,6 @@ +# RUN: rm -rf %t +# RUN: mkdir %t +# RUN: cd %t # RUN: yaml2obj -docnum=1 %s > test.wasm # RUN: yaml2obj -docnum=2 %s > test_sym.wasm # RUN: lldb-test object-file test.wasm | FileCheck %s ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits