[Lldb-commits] [PATCH] D140332: [ADT] Alias llvm::Optional to std::optional

2022-12-19 Thread Benjamin Kramer via Phabricator via lldb-commits
bkramer marked an inline comment as done.
bkramer added inline comments.



Comment at: clang/lib/Basic/TargetInfo.cpp:513
   if (Opts.MaxBitIntWidth)
-MaxBitIntWidth = Opts.MaxBitIntWidth;
+MaxBitIntWidth = (unsigned)Opts.MaxBitIntWidth;
 

barannikov88 wrote:
> Nit: C-style casts are generally discouraged (there are several occurrences 
> in this patch).
-> static_cast



Comment at: llvm/lib/CodeGen/RegAllocGreedy.h:83
   public:
-ExtraRegInfo() = default;
+ExtraRegInfo() {}
 ExtraRegInfo(const ExtraRegInfo &) = delete;

barannikov88 wrote:
> Is it somehow different than ' = default'?
It makes the class non-trivial, std::optional::emplace has issues with trivial 
default constructors :(



Comment at: mlir/lib/Dialect/GPU/Transforms/SerializeToHsaco.cpp:182
 
-  return ret;
+  return std::move(ret);
 }

barannikov88 wrote:
> clang-tidy would usually complain on this. Does it solve some gcc issue?
It does, this is a bug in GCC 7.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140332

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


[Lldb-commits] [PATCH] D140332: [ADT] Alias llvm::Optional to std::optional

2022-12-19 Thread Benjamin Kramer via Phabricator via lldb-commits
bkramer marked an inline comment as done.
bkramer added a comment.

In D140332#4005988 , @MaskRay wrote:

> Can you push `using OptionalFileEntryRef = 
> CustomizableOptional;` and the renaming as a separate commit to 
> make this patch smaller?
> There is a smaller that this rename may be reverted.
> 205c0589f918f95d2f2c586a01bea2716d73d603 
>  
> reverted a change related to `OptionalFileEntryRef`. I assume that your 
> change is fine.

Yeah, I'll split this into smaller pieces once we agree on the direction and 
just submit the alias. I expect a revert or two.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140332

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


[Lldb-commits] [PATCH] D131437: Don't index the skeleton CU when we have a fission compile unit.

2022-08-26 Thread Benjamin Kramer via Phabricator via lldb-commits
bkramer added a comment.

This seems to trigger a use after free in `lldb-api :: 
functionalities/thread/create_after_attach/TestCreateAfterAttach.py`

asan log:

  ==4741==ERROR: AddressSanitizer: heap-use-after-free on address 
0x62f00023bf58 at pc 0x563639db88f1 bp 0x7ffd942412f0 sp 0x7ffd942412e8
  READ of size 4 at 0x62f00023bf58 thread T0
  #0 0x563639db88f0 in HasChildren 
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h:124:37
  #1 0x563639db88f0 in GetFirstChild 
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h:148:12
  #2 0x563639db88f0 in GetFirstChild 
lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp:101:34
  #3 0x563639db88f0 in child_iterator 
lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h:107:57
  #4 0x563639db88f0 in DWARFDIE::children() const 
lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp:466:27
  #5 0x563639d9f4e1 in 
DWARFASTParserClang::EnsureAllDIEsInDeclContextHaveBeenParsed(lldb_private::CompilerDeclContext)
 lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2203:37
  #6 0x563639f1ab62 in 
lldb_private::TypeSystemClang::DeclContextFindDeclByName(void*, 
lldb_private::ConstString, bool) 
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:9494:22
  #7 0x563639f489fd in 
lldb_private::CompilerDeclContext::FindDeclByName(lldb_private::ConstString, 
bool) lldb/source/Symbol/CompilerDeclContext.cpp:20:27
  #8 0x563639b6113c in 
lldb_private::ClangExpressionDeclMap::LookupLocalVariable(lldb_private::NameSearchContext&,
 lldb_private::ConstString, lldb_private::SymbolContext&, 
lldb_private::CompilerDeclContext const&) 
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp:1084:20
  #9 0x563639b5d7cf in 
lldb_private::ClangExpressionDeclMap::FindExternalVisibleDecls(lldb_private::NameSearchContext&,
 std::__u::shared_ptr, lldb_private::CompilerDeclContext 
const&) 
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp:1434:9
  #10 0x563639b5c9df in 
lldb_private::ClangExpressionDeclMap::FindExternalVisibleDecls(lldb_private::NameSearchContext&)
 lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp:728:5
  #11 0x563639b3df83 in 
lldb_private::ClangASTSource::FindExternalVisibleDeclsByName(clang::DeclContext 
const*, clang::DeclarationName) 
lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp:180:3
  #12 0x56363d02aa30 in clang::DeclContext::lookup(clang::DeclarationName) 
const clang/lib/AST/DeclBase.cpp:1706:17
  #13 0x56363c2bca5b in LookupDirect(clang::Sema&, clang::LookupResult&, 
clang::DeclContext const*) clang/lib/Sema/SemaLookup.cpp:1108:39
  #14 0x56363c2b67f5 in CppNamespaceLookup(clang::Sema&, 
clang::LookupResult&, clang::ASTContext&, clang::DeclContext*, (anonymous 
namespace)::UnqualUsingDirectiveSet&) clang/lib/Sema/SemaLookup.cpp:1207:16
  #15 0x56363c2b5a1e in clang::Sema::CppLookupName(clang::LookupResult&, 
clang::Scope*) clang/lib/Sema/SemaLookup.cpp:1495:15
  #16 0x56363c2bc0f2 in clang::Sema::LookupName(clang::LookupResult&, 
clang::Scope*, bool, bool) clang/lib/Sema/SemaLookup.cpp:2259:9
  #17 0x56363bdb50b8 in clang::Sema::BuildUsingDeclaration(clang::Scope*, 
clang::AccessSpecifier, clang::SourceLocation, bool, clang::SourceLocation, 
clang::CXXScopeSpec&, clang::DeclarationNameInfo, clang::SourceLocation, 
clang::ParsedAttributesView const&, bool, bool) 
clang/lib/Sema/SemaDeclCXX.cpp:12329:5
  #18 0x56363bdb49f3 in clang::Sema::ActOnUsingDeclaration(clang::Scope*, 
clang::AccessSpecifier, clang::SourceLocation, clang::SourceLocation, 
clang::CXXScopeSpec&, clang::UnqualifiedId&, clang::SourceLocation, 
clang::ParsedAttributesView const&) clang/lib/Sema/SemaDeclCXX.cpp:11833:7
  #19 0x56363b49df12 in 
clang::Parser::ParseUsingDeclaration(clang::DeclaratorContext, 
clang::Parser::ParsedTemplateInfo const&, clang::SourceLocation, 
clang::SourceLocation&, clang::ParsedAttributes&, clang::AccessSpecifier) 
clang/lib/Parse/ParseDeclCXX.cpp:803:26
  #20 0x56363b49c27d in 
clang::Parser::ParseUsingDirectiveOrDeclaration(clang::DeclaratorContext, 
clang::Parser::ParsedTemplateInfo const&, clang::SourceLocation&, 
clang::ParsedAttributes&) clang/lib/Parse/ParseDeclCXX.cpp:512:10
  #21 0x56363b46c161 in 
clang::Parser::ParseDeclaration(clang::DeclaratorContext, 
clang::SourceLocation&, clang::ParsedAttributes&, clang::ParsedAttributes&, 
clang::SourceLocation*) clang/lib/Parse/ParseDecl.cpp:1797:12
  #22 0x56363b55fb99 in 
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, 
clang::ParsedAttributes&, clang::ParsedAttributes&) 
clang/lib/Parse/ParseStmt.cpp:247:16
  #23 0x56363b55cfb6 in 
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) 
clang/lib/Parse/ParseStmt.cpp:115:20
  #24 0x56363b56c048 in clang::Parser::ParseCompoundS

[Lldb-commits] [PATCH] D74954: Add a basic tiling pass for parallel loops

2020-02-24 Thread Benjamin Kramer via Phabricator via lldb-commits
bkramer updated this revision to Diff 246166.
bkramer marked 4 inline comments as done.
bkramer added a comment.
Herald added subscribers: libc-commits, libcxx-commits, lldb-commits, 
Sanitizers, cfe-commits, bader, kerbowa, csigg, usaxena95, jdoerfert, ormris, 
jsji, kadircet, rupprecht, jfb, arphaman, dexonsmith, mgrang, jkorous, MaskRay, 
kbarton, aheejin, hiraditya, jgravelle-google, krytarowski, arichardson, 
sbc100, nhaehnle, jvesely, nemanjai, emaste, dschuff, arsenm.
Herald added a reviewer: espindola.
Herald added a reviewer: alexshap.
Herald added a reviewer: rupprecht.
Herald added a reviewer: jhenderson.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: sstefan1.
Herald added a reviewer: mravishankar.
Herald added a reviewer: antiagainst.
Herald added a reviewer: rriddle.
Herald added a reviewer: antiagainst.
Herald added a reviewer: uenoku.
Herald added projects: clang, Sanitizers, LLDB, libc++, libc-project.

- Address moar comments


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74954

Files:
  clang-tools-extra/clangd/ClangdServer.cpp
  clang-tools-extra/clangd/ClangdServer.h
  clang-tools-extra/clangd/Hover.cpp
  clang-tools-extra/clangd/Selection.cpp
  clang-tools-extra/clangd/Selection.h
  clang-tools-extra/clangd/SemanticSelection.cpp
  clang-tools-extra/clangd/XRefs.cpp
  clang-tools-extra/clangd/refactor/Rename.cpp
  clang-tools-extra/clangd/refactor/Tweak.cpp
  clang-tools-extra/clangd/refactor/Tweak.h
  clang-tools-extra/clangd/unittests/FindTargetTests.cpp
  clang-tools-extra/clangd/unittests/HoverTests.cpp
  clang-tools-extra/clangd/unittests/SelectionTests.cpp
  clang-tools-extra/clangd/unittests/TweakTesting.cpp
  clang-tools-extra/clangd/unittests/TweakTests.cpp
  clang/include/clang/Driver/CC1Options.td
  clang/include/clang/Driver/Options.td
  clang/include/clang/Parse/Parser.h
  clang/lib/Basic/Targets/AArch64.cpp
  clang/lib/Basic/Targets/X86.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Driver/ToolChains/Darwin.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/lib/Sema/SemaCast.cpp
  clang/test/CodeGen/codemodels.c
  clang/test/Driver/clang_f_opts.c
  clang/test/Driver/code-model.c
  clang/test/Driver/mbackchain.c
  clang/test/Driver/mcmodel.c
  clang/test/Preprocessor/aarch64-target-features.c
  clang/test/Preprocessor/init-aarch64.c
  clang/test/Preprocessor/init.c
  clang/test/Sema/MicrosoftExtensions.c
  clang/test/Sema/cast.c
  clang/test/SemaCXX/cstyle-cast.cpp
  compiler-rt/lib/profile/GCDAProfiling.c
  libc/CMakeLists.txt
  libc/cmake/modules/LLVMLibCRules.cmake
  libc/docs/fuzzing.rst
  libc/docs/source_layout.rst
  libc/fuzzing/CMakeLists.txt
  libc/fuzzing/string/CMakeLists.txt
  libc/fuzzing/string/strcpy_fuzz.cpp
  libc/src/signal/linux/raise.cpp
  libc/utils/CPP/README.md
  libc/utils/HdrGen/README.md
  libc/utils/UnitTest/README.md
  libcxx/test/support/count_new.h
  libcxx/test/support/type_id.h
  lld/ELF/Writer.cpp
  lld/test/ELF/shuffle-sections-init-fini.s
  lld/test/ELF/shuffle-sections.s
  lldb/packages/Python/lldbsuite/test/lldbtest.py
  lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h
  lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
  
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
  lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h
  lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
  lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
  lldb/test/API/lang/cpp/operators/main.cpp
  lldb/test/Shell/SymbolFile/Breakpad/Inputs/basic-elf.yaml
  lldb/test/Shell/SymbolFile/DWARF/dwp-debug-types.s
  lldb/test/Shell/SymbolFile/DWARF/dwp.s
  lldb/test/Shell/lit-lldb-init.in
  llvm/docs/Extensions.rst
  llvm/docs/LangRef.rst
  llvm/docs/LoopTerminology.rst
  llvm/include/llvm/ADT/STLExtras.h
  llvm/include/llvm/Analysis/CFGPrinter.h
  llvm/include/llvm/Analysis/LoopInfo.h
  llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h
  llvm/include/llvm/CodeGen/ISDOpcodes.h
  llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h
  llvm/include/llvm/CodeGen/SelectionDAG.h
  llvm/include/llvm/CodeGen/TargetLowering.h
  llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
  llvm/include/llvm/ExecutionEngine/JITLink/MachO_x86_64.h
  llvm/include/llvm/ExecutionEngine/Orc/Core.h
  llvm/include/llvm/ExecutionEngine/Orc/OrcError.h
  llvm/include/llvm/IR/Intrinsics.td
  llvm/include/

[Lldb-commits] [PATCH] D69455: Correct size_t format specifier

2019-10-26 Thread Benjamin Kramer via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5e307808557f: Correct size_t format specifier (authored by 
scw, committed by bkramer).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69455

Files:
  lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp


Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
===
--- lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -1257,7 +1257,7 @@
 oneliner += "(frame, bp_loc, internal_dict)";
   } else {
 error.SetErrorStringWithFormat("expected 3 or 4 argument "
-   "function, %s has %d",
+   "function, %s has %zu",
function_name, num_args);
 return error;
   }


Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
===
--- lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -1257,7 +1257,7 @@
 oneliner += "(frame, bp_loc, internal_dict)";
   } else {
 error.SetErrorStringWithFormat("expected 3 or 4 argument "
-   "function, %s has %d",
+   "function, %s has %zu",
function_name, num_args);
 return error;
   }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits