[Lldb-commits] [lldb] 2622c5e - [lldb] Adapt lldb tests to changes in 71cdb8c6f144

2022-07-23 Thread Augusto Noronha via lldb-commits

Author: Augusto Noronha
Date: 2022-07-23T15:37:26-07:00
New Revision: 2622c5e212646d1c8d6a43444d7c5b551f0221ad

URL: 
https://github.com/llvm/llvm-project/commit/2622c5e212646d1c8d6a43444d7c5b551f0221ad
DIFF: 
https://github.com/llvm/llvm-project/commit/2622c5e212646d1c8d6a43444d7c5b551f0221ad.diff

LOG: [lldb] Adapt lldb tests to changes in 71cdb8c6f144

Added: 


Modified: 
lldb/test/API/functionalities/dlopen_other_executable/main.c
lldb/test/API/macosx/ignore_exceptions/main.c

Removed: 




diff  --git a/lldb/test/API/functionalities/dlopen_other_executable/main.c 
b/lldb/test/API/functionalities/dlopen_other_executable/main.c
index 8f21e862a2b58..f48f6177e7db0 100644
--- a/lldb/test/API/functionalities/dlopen_other_executable/main.c
+++ b/lldb/test/API/functionalities/dlopen_other_executable/main.c
@@ -4,7 +4,7 @@
 int main() {
   int i = 0; // break here
   // dlopen the 'other' test executable.
-  int h = dlopen("other", RTLD_LAZY);
+  int h = (int) dlopen("other", RTLD_LAZY);
   assert(h && "dlopen failed?");
   return i; // break after dlopen
 }

diff  --git a/lldb/test/API/macosx/ignore_exceptions/main.c 
b/lldb/test/API/macosx/ignore_exceptions/main.c
index 682c5f23627e0..b9513aa35b3ed 100644
--- a/lldb/test/API/macosx/ignore_exceptions/main.c
+++ b/lldb/test/API/macosx/ignore_exceptions/main.c
@@ -13,7 +13,7 @@ void
 saction_handler(int signo, siginfo_t info, void *baton) {
   printf("Got into handler.\n");   // stop here in the signal handler
   kern_return_t success
-  = mach_vm_protect(mach_task_self(), g_int_ptr,
+  = mach_vm_protect(mach_task_self(), (mach_vm_address_t) g_int_ptr,
 g_size, 0, VM_PROT_READ|VM_PROT_WRITE);
   g_int_ptr[1] = 20;
 }
@@ -24,7 +24,7 @@ main()
   for (int i = 0; i < 10; i++)
 g_int_ptr[i] = i * 10;
   
-  vm_result = mach_vm_protect(mach_task_self(), g_int_ptr, g_size, 0, 
VM_PROT_NONE);
+  vm_result = mach_vm_protect(mach_task_self(), (mach_vm_address_t) g_int_ptr, 
g_size, 0, VM_PROT_NONE);
   struct sigaction my_action;
   sigemptyset(_action.sa_mask);
   my_action.sa_handler = (void (*)(int)) saction_handler;



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


[Lldb-commits] [PATCH] D129377: [lldb/Fuzzer] Add fuzzer for expression evaluator

2022-07-23 Thread Martin Storsjö via Phabricator via lldb-commits
mstorsjo added a comment.

In D129377#3673237 , @mib wrote:

> In D129377#3673204 , @mstorsjo 
> wrote:
>
>> This broke building of Clang, when it's set up by symlinking 
>> `llvm-project/clang` into `llvm-project/llvm/tools`. In that case, cmake 
>> configure errors out like this:
>>
>>   -- Configuring done 
>>   CMake Error in tools/clang/tools/clang-fuzzer/handle-cxx/CMakeLists.txt:
>> Target "clangHandleCXX" INTERFACE_INCLUDE_DIRECTORIES property contains
>> path:
>>
>>   
>> "/home/martin/code/llvm-project/llvm/tools/clang/tools/clang-fuzzer/handle-cxx/."
>>  
>>   
>> which is prefixed in the source directory.
>>
>> See e.g. 
>> https://stackoverflow.com/questions/25676277/cmake-target-include-directories-prints-an-error-when-i-try-to-add-the-source
>>  for some discussion on the issue.
>>
>> Can we revert this commit until this has been sorted out?
>
> @mstorsjo I reverted Chelsea's patch in b797834748f1 
> , since 
> she's offline now. Do you have a link to a bot failure that would help us 
> investigate the issue ?

So in short, I think this would work if you'd simply remove the newly added 
`target_include_directories(clangHandleCXX PUBLIC .)` in 
`clang/tools/clang-fuzzer/handle-cxx/CMakeLists.txt` and 
`target_include_directories(clangProtoToCXX PUBLIC .)` and 
`target_include_directories(clangLoopProtoToCXX PUBLIC .)` in 
`clang/tools/clang-fuzzer/proto-to-cxx/CMakeLists.txt`.

To reproduce the issue - instead of configuring llvm+clang+lldb by passing 
`-DLLVM_ENABLE_PROJECTS="clang;lldb"` make symlinks in 
`llvm-project/llvm/tools` pointing to `llvm-project/clang` and 
`llvm-project/lldb`. (I.e., `cd llvm-project/llvm/tools; ln -s ../../clang .; 
ln -s ../../lldb .`) This slightly affects the effective path at where CMake 
sees the clang files, which causes CMake to report the unexpected path overlap 
issue here.

I've tried to build all these fuzzers - I haven't really managed to build it 
all, but I think I'm fairly close. Anyway, I tried removing those 
`target_include_directories()` in that setup, and it didn't change anything, 
but maybe it only makes a difference if one gets further than what I got. 
(Changing `PUBLIC` into `PRIVATE` in those lines avoided the issue too.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129377

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


[Lldb-commits] [PATCH] D111509: [clang] use getCommonSugar in an assortment of places

2022-07-23 Thread Matheus Izvekov via Phabricator via lldb-commits
mizvekov added a comment.

In D111509#3168178 , @shafik wrote:

> Changing how types are printed can effect LLDB expression parsing tests. I 
> ran the LLDB test suite with this change:
>
>   ninja check-lldb
>
> and it changes to the results for `TestScalarURem.py` which can be run using:
>
>   llvm-lit -sv lldb/test --filter TestScalarURem.py
>
> The change looks expected.

Fixed now, thanks. (And also 
API/commands/expression/rdar44436068/Test128BitsInteger.py).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111509

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


[Lldb-commits] [PATCH] D111509: [clang] use getCommonSugar in an assortment of places

2022-07-23 Thread Matheus Izvekov via Phabricator via lldb-commits
mizvekov updated this revision to Diff 447087.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111509

Files:
  clang-tools-extra/clangd/unittests/tweaks/ExtractVariableTests.cpp
  
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/narrowing-conversions-ignoreconversionfromtypes-option.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/lib/Sema/SemaExprCXX.cpp
  clang/test/AST/ast-dump-fpfeatures.cpp
  clang/test/CodeGen/compound-assign-overflow.c
  clang/test/Sema/matrix-type-operators.c
  clang/test/Sema/nullability.c
  clang/test/Sema/sugar-common-types.c
  clang/test/SemaCXX/matrix-type-operators.cpp
  clang/test/SemaCXX/sugar-common-types.cpp
  clang/test/SemaCXX/sugared-auto.cpp
  clang/test/SemaObjC/format-strings-objc.m
  compiler-rt/test/ubsan/TestCases/Integer/add-overflow.cpp
  compiler-rt/test/ubsan/TestCases/Integer/no-recover.cpp
  compiler-rt/test/ubsan/TestCases/Integer/sub-overflow.cpp
  compiler-rt/test/ubsan/TestCases/Integer/uadd-overflow.cpp
  compiler-rt/test/ubsan/TestCases/Integer/umul-overflow.cpp
  compiler-rt/test/ubsan/TestCases/Integer/usub-overflow.cpp
  libcxx/DELETE.ME
  lldb/test/API/commands/expression/rdar42038760/main.c
  lldb/test/API/commands/expression/rdar44436068/main.c

Index: lldb/test/API/commands/expression/rdar44436068/main.c
===
--- lldb/test/API/commands/expression/rdar44436068/main.c
+++ lldb/test/API/commands/expression/rdar44436068/main.c
@@ -3,6 +3,6 @@
 __int128_t n = 1;
 n = n + n;
 return n; //%self.expect("p n", substrs=['(__int128_t) $0 = 2'])
-  //%self.expect("p n + 6", substrs=['(__int128) $1 = 8'])
-  //%self.expect("p n + n", substrs=['(__int128) $2 = 4'])
+  //%self.expect("p n + 6", substrs=['(__int128_t) $1 = 8'])
+  //%self.expect("p n + n", substrs=['(__int128_t) $2 = 4'])
 }
Index: lldb/test/API/commands/expression/rdar42038760/main.c
===
--- lldb/test/API/commands/expression/rdar42038760/main.c
+++ lldb/test/API/commands/expression/rdar42038760/main.c
@@ -10,7 +10,7 @@
   struct S0 l_19;
   l_19.f2 = 419;
   uint32_t l_4037 = 4294967295UL;
-  l_19.f2 = g_463; //%self.expect("expr ((l_4037 % (-(g_463))) | l_19.f2)", substrs=['(unsigned int) $0 = 358717883'])
+  l_19.f2 = g_463; //%self.expect("expr ((l_4037 % (-(g_463))) | l_19.f2)", substrs=['(uint32_t) $0 = 358717883'])
 }
 int main()
 {
Index: libcxx/DELETE.ME
===
--- libcxx/DELETE.ME
+++ libcxx/DELETE.ME
@@ -1 +1,2 @@
 D111283
+D111509
Index: compiler-rt/test/ubsan/TestCases/Integer/usub-overflow.cpp
===
--- compiler-rt/test/ubsan/TestCases/Integer/usub-overflow.cpp
+++ compiler-rt/test/ubsan/TestCases/Integer/usub-overflow.cpp
@@ -12,12 +12,12 @@
 
 #ifdef SUB_I32
   (void)(uint32_t(1) - uint32_t(2));
-  // CHECK-SUB_I32: usub-overflow.cpp:[[@LINE-1]]:22: runtime error: unsigned integer overflow: 1 - 2 cannot be represented in type 'unsigned int'
+  // CHECK-SUB_I32: usub-overflow.cpp:[[@LINE-1]]:22: runtime error: unsigned integer overflow: 1 - 2 cannot be represented in type '{{uint32_t|unsigned int}}'
 #endif
 
 #ifdef SUB_I64
   (void)(uint64_t(800ll) - uint64_t(900ll));
-  // CHECK-SUB_I64: 800 - 900 cannot be represented in type 'unsigned {{long( long)?}}'
+  // CHECK-SUB_I64: 800 - 900 cannot be represented in type '{{uint64_t|unsigned long( long)?}}'
 #endif
 
 #ifdef SUB_I128
@@ -26,6 +26,6 @@
 # else
   puts("__int128 not supported\n");
 # endif
-  // CHECK-SUB_I128: {{0x4000 - 0x8000 cannot be represented in type 'unsigned __int128'|__int128 not supported}}
+  // CHECK-SUB_I128: {{0x4000 - 0x8000 cannot be represented in type '__uint128_t'|__int128 not supported}}
 #endif
 }
Index: compiler-rt/test/ubsan/TestCases/Integer/umul-overflow.cpp
===
--- compiler-rt/test/ubsan/TestCases/Integer/umul-overflow.cpp
+++ compiler-rt/test/ubsan/TestCases/Integer/umul-overflow.cpp
@@ -13,7 +13,7 @@
   (void)(uint16_t(0x) * uint16_t(0x8001));
 
   (void)(uint32_t(0x) * uint32_t(0x2));
-  // CHECK: umul-overflow.cpp:15:31: runtime error: unsigned integer overflow: 4294967295 * 2 cannot be represented in type 'unsigned int'
+  // CHECK: umul-overflow.cpp:15:31: runtime error: unsigned integer overflow: 4294967295 * 2 cannot be represented in type '{{uint32_t|unsigned int}}'
 
   return 0;
 }
Index: compiler-rt/test/ubsan/TestCases/Integer/uadd-overflow.cpp

[Lldb-commits] [PATCH] D112374: [clang] Implement ElaboratedType sugaring for types written bare

2022-07-23 Thread Matheus Izvekov via Phabricator via lldb-commits
mizvekov edited the summary of this revision.
mizvekov updated this revision to Diff 447085.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112374

Files:
  clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp
  clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp
  clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp
  clang-tools-extra/clang-tidy/bugprone/SmartPtrArrayMismatchCheck.cpp
  clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp
  clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp
  clang-tools-extra/clang-tidy/misc/MisplacedConstCheck.cpp
  clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
  clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp
  clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp
  clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
  clang-tools-extra/clangd/FindTarget.cpp
  clang-tools-extra/clangd/unittests/ASTTests.cpp
  clang-tools-extra/clangd/unittests/DumpASTTests.cpp
  clang-tools-extra/clangd/unittests/FindTargetTests.cpp
  clang-tools-extra/clangd/unittests/HoverTests.cpp
  clang-tools-extra/test/clang-tidy/checkers/bugprone/copy-constructor-init.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone/shared-ptr-array-mismatch.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-memory-comparison-32bits.cpp
  
clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-memory-comparison.cpp
  clang-tools-extra/test/clang-tidy/checkers/readability/const-return-type.cpp
  clang-tools-extra/unittests/clang-change-namespace/ChangeNamespaceTests.cpp
  clang/bindings/python/tests/cindex/test_type.py
  clang/include/clang/AST/ASTContext.h
  clang/include/clang/AST/Type.h
  clang/include/clang/AST/TypeLoc.h
  clang/lib/ARCMigrate/ObjCMT.cpp
  clang/lib/AST/ASTContext.cpp
  clang/lib/AST/ASTDiagnostic.cpp
  clang/lib/AST/DeclCXX.cpp
  clang/lib/AST/ExprCXX.cpp
  clang/lib/AST/FormatString.cpp
  clang/lib/AST/PrintfFormatString.cpp
  clang/lib/AST/QualTypeNames.cpp
  clang/lib/AST/ScanfFormatString.cpp
  clang/lib/AST/Type.cpp
  clang/lib/AST/TypeLoc.cpp
  clang/lib/Analysis/RetainSummaryManager.cpp
  clang/lib/CodeGen/CGCall.cpp
  clang/lib/CodeGen/CGExprScalar.cpp
  clang/lib/CodeGen/CodeGenFunction.cpp
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
  clang/lib/Sema/SemaChecking.cpp
  clang/lib/Sema/SemaCodeComplete.cpp
  clang/lib/Sema/SemaDecl.cpp
  clang/lib/Sema/SemaDeclCXX.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/lib/Sema/SemaExprCXX.cpp
  clang/lib/Sema/SemaExprObjC.cpp
  clang/lib/Sema/SemaTemplate.cpp
  clang/lib/Sema/SemaType.cpp
  clang/lib/Sema/TreeTransform.h
  clang/lib/Sema/TypeLocBuilder.cpp
  clang/lib/Sema/TypeLocBuilder.h
  clang/lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp
  clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp
  clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp
  clang/test/AST/ast-dump-APValue-anon-union.cpp
  clang/test/AST/ast-dump-APValue-struct.cpp
  clang/test/AST/ast-dump-APValue-union.cpp
  clang/test/AST/ast-dump-decl.cpp
  clang/test/AST/ast-dump-expr-json.cpp
  clang/test/AST/ast-dump-expr.cpp
  clang/test/AST/ast-dump-funcs.cpp
  clang/test/AST/ast-dump-openmp-begin-declare-variant_template_3.cpp
  clang/test/AST/ast-dump-overloaded-operators.cpp
  clang/test/AST/ast-dump-records-json.cpp
  clang/test/AST/ast-dump-recovery.cpp
  clang/test/AST/ast-dump-stmt-json.cpp
  clang/test/AST/ast-dump-stmt.cpp
  clang/test/AST/ast-dump-template-decls-json.cpp
  clang/test/AST/ast-dump-temporaries-json.cpp
  clang/test/AST/ast-dump-using-template.cpp
  clang/test/AST/ast-dump-using.cpp
  clang/test/AST/coroutine-locals-cleanup-exp-namespace.cpp
  clang/test/AST/coroutine-locals-cleanup.cpp
  clang/test/AST/float16.cpp
  clang/test/AST/sourceranges.cpp
  clang/test/Analysis/Inputs/expected-plists/NewDelete-path-notes.cpp.plist
  clang/test/Analysis/Inputs/expected-plists/cxx-for-range.cpp.plist
  clang/test/Analysis/Inputs/expected-plists/method-call-path-notes.cpp.plist
  clang/test/Analysis/analyzer-display-progress.cpp
  clang/test/Analysis/auto-obj-dtors-cfg-output.cpp
  clang/test/Analysis/blocks.mm
  clang/test/Analysis/bug_hash_test.cpp
  clang/test/Analysis/cast-value-notes.cpp
  clang/test/Analysis/cast-value-state-dump.cpp
  clang/test/Analysis/cfg-rich-constructors.cpp
  clang/test/Analysis/cfg-rich-constructors.mm
  clang/test/Analysis/cfg.cpp
  clang/test/Analysis/copy-elision.cpp
  clang/test/Analysis/cxx-uninitialized-object-inheritance.cpp
  clang/test/Analysis/dump_egraph.cpp
  clang/test/Analysis/exploded-graph-rewriter/dynamic_types.cpp
  clang/test/Analysis/initializers-cfg-output.cpp
  clang/test/Analysis/inlining/Inputs/expected-plists/path-notes.cpp.plist
  clang/test/Analysis/lambdas.cpp
  

[Lldb-commits] [PATCH] D130309: [NFC] Improve FileSpec internal APIs and usage in preparation for adding caching of resolved/absolute.

2022-07-23 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Reverted in 1b4b12a34022b13b35755d9c941f7f13753e5e96 
 for now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130309

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


[Lldb-commits] [lldb] 1b4b12a - Revert "[NFC] Improve FileSpec internal APIs and usage in preparation for adding caching of resolved/absolute." and follow-ups

2022-07-23 Thread Nico Weber via lldb-commits

Author: Nico Weber
Date: 2022-07-23T12:35:48-04:00
New Revision: 1b4b12a34022b13b35755d9c941f7f13753e5e96

URL: 
https://github.com/llvm/llvm-project/commit/1b4b12a34022b13b35755d9c941f7f13753e5e96
DIFF: 
https://github.com/llvm/llvm-project/commit/1b4b12a34022b13b35755d9c941f7f13753e5e96.diff

LOG: Revert "[NFC] Improve FileSpec internal APIs and usage in preparation for 
adding caching of resolved/absolute." and follow-ups

This reverts commit 9429b67b8e300e638d7828bbcb95585f85c4df4d.

It broke the build on Windows, see comments on https://reviews.llvm.org/D130309

It also reverts these follow-ups:

Revert "Fix buildbot breakage after https://reviews.llvm.org/D130309.;
This reverts commit f959d815f4637890ebbacca379f1c38ab47e4e14.

Revert "Fix buildbot breakage after https://reviews.llvm.org/D130309.;
This reverts commit 0bbce7a4c2d2bff622bdadd4323f93f5d90e6d24.

Revert "Cache the value for absolute path in FileSpec."
This reverts commit dabe877248b85b34878e75d5510339325ee087d0.

Added: 


Modified: 
lldb/include/lldb/Utility/FileSpec.h
lldb/source/API/SBFileSpec.cpp
lldb/source/API/SBLaunchInfo.cpp
lldb/source/API/SBPlatform.cpp
lldb/source/API/SBReproducer.cpp
lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
lldb/source/Commands/CommandObjectLog.cpp
lldb/source/Commands/CommandObjectTarget.cpp
lldb/source/Core/Debugger.cpp
lldb/source/Core/IOHandlerCursesGUI.cpp
lldb/source/Expression/FunctionCaller.cpp
lldb/source/Expression/REPL.cpp
lldb/source/Host/common/FileAction.cpp
lldb/source/Host/common/FileSystem.cpp
lldb/source/Host/common/HostInfoBase.cpp
lldb/source/Host/linux/HostInfoLinux.cpp
lldb/source/Host/macosx/objcxx/Host.mm
lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
lldb/source/Host/posix/FileSystemPosix.cpp
lldb/source/Host/posix/HostInfoPosix.cpp
lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp

lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp

lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp

lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
lldb/source/Symbol/Symbol.cpp
lldb/source/Symbol/SymbolContext.cpp
lldb/source/Target/Platform.cpp
lldb/source/Target/Target.cpp
lldb/source/Target/TargetList.cpp
lldb/source/Target/Trace.cpp
lldb/source/Utility/FileSpec.cpp
lldb/tools/lldb-server/lldb-platform.cpp
lldb/tools/lldb-test/lldb-test.cpp
lldb/unittests/Target/FindFileTest.cpp
lldb/unittests/Target/ModuleCacheTest.cpp
lldb/unittests/Utility/FileSpecTest.cpp

Removed: 




diff  --git a/lldb/include/lldb/Utility/FileSpec.h 
b/lldb/include/lldb/Utility/FileSpec.h
index 8492c93fd58a1..ec473a2afeec7 100644
--- a/lldb/include/lldb/Utility/FileSpec.h
+++ b/lldb/include/lldb/Utility/FileSpec.h
@@ -216,38 +216,29 @@ class FileSpec {
 
   Style GetPathStyle() const;
 
+  /// Directory string get accessor.
+  ///
+  /// \return
+  /// A reference to the directory string object.
+  ConstString ();
+
   /// Directory string const get accessor.
   ///
   /// \return
   /// A const reference to the directory string object.
-  const ConstString () const { return m_directory; }
+  ConstString GetDirectory() const;
 
-  /// Directory string set accessor.
+  /// Filename string get accessor.
   ///
-  /// \param[in] directory
-  /// The value to replace the directory with.
-  void SetDirectory(ConstString directory);
-  void SetDirectory(llvm::StringRef directory);
-
-  /// Clear the directory in this object.
-  void ClearDirectory();
-
+  /// 

[Lldb-commits] [PATCH] D130403: Use the range-based overload of llvm::sort where possible

2022-07-23 Thread Dmitri Gribenko 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 rGcd9a5cfd2e4e: Use the range-based overload of llvm::sort 
where possible (authored by gribozavr).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130403

Files:
  clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
  clang-tools-extra/clang-include-fixer/SymbolIndexManager.cpp
  clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp
  clang-tools-extra/clangd/index/StdLib.cpp
  clang/include/clang/Basic/Attr.td
  clang/lib/Driver/Multilib.cpp
  clang/lib/Frontend/FrontendAction.cpp
  clang/lib/Sema/AnalysisBasedWarnings.cpp
  lldb/source/Interpreter/OptionValueArray.cpp
  lldb/source/Interpreter/OptionValueFileSpecList.cpp
  lldb/source/Interpreter/OptionValuePathMappings.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
  lldb/source/Symbol/ArmUnwindInfo.cpp
  lldb/source/Symbol/CompileUnit.cpp
  lldb/source/Symbol/Symtab.cpp
  lldb/source/Target/DynamicRegisterInfo.cpp
  lldb/source/Target/Target.cpp
  lldb/source/Utility/ReproducerProvider.cpp
  lldb/source/Utility/Timer.cpp
  llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
  llvm/unittests/ADT/SmallPtrSetTest.cpp
  llvm/unittests/TextAPI/TextStubV1Tests.cpp
  llvm/unittests/TextAPI/TextStubV2Tests.cpp
  llvm/unittests/TextAPI/TextStubV3Tests.cpp
  llvm/unittests/TextAPI/TextStubV4Tests.cpp

Index: llvm/unittests/TextAPI/TextStubV4Tests.cpp
===
--- llvm/unittests/TextAPI/TextStubV4Tests.cpp
+++ llvm/unittests/TextAPI/TextStubV4Tests.cpp
@@ -125,9 +125,9 @@
   Sym->isReexported() ? Reexports.emplace_back(std::move(temp))
   : Exports.emplace_back(std::move(temp));
   }
-  llvm::sort(Exports.begin(), Exports.end());
-  llvm::sort(Reexports.begin(), Reexports.end());
-  llvm::sort(Undefineds.begin(), Undefineds.end());
+  llvm::sort(Exports);
+  llvm::sort(Reexports);
+  llvm::sort(Undefineds);
 
   static ExportedSymbol ExpectedExportedSymbols[] = {
   {SymbolKind::GlobalSymbol, "_symA", false, false},
@@ -296,9 +296,9 @@
   Sym->isReexported() ? Reexports.emplace_back(std::move(Temp))
   : Exports.emplace_back(std::move(Temp));
   }
-  llvm::sort(Exports.begin(), Exports.end());
-  llvm::sort(Reexports.begin(), Reexports.end());
-  llvm::sort(Undefineds.begin(), Undefineds.end());
+  llvm::sort(Exports);
+  llvm::sort(Reexports);
+  llvm::sort(Undefineds);
 
   static ExportedSymbol ExpectedExportedSymbols[] = {
   {SymbolKind::GlobalSymbol, "_symA", false, false},
Index: llvm/unittests/TextAPI/TextStubV3Tests.cpp
===
--- llvm/unittests/TextAPI/TextStubV3Tests.cpp
+++ llvm/unittests/TextAPI/TextStubV3Tests.cpp
@@ -111,7 +111,7 @@
 ExportedSymbol{Sym->getKind(), std::string(Sym->getName()),
Sym->isWeakDefined(), Sym->isThreadLocalValue()});
   }
-  llvm::sort(Exports.begin(), Exports.end());
+  llvm::sort(Exports);
 
   EXPECT_EQ(sizeof(TBDv3Symbols) / sizeof(ExportedSymbol), Exports.size());
   EXPECT_TRUE(
@@ -203,7 +203,7 @@
 Sym->isWeakDefined(),
 Sym->isThreadLocalValue()});
   }
-  llvm::sort(Exports.begin(), Exports.end());
+  llvm::sort(Exports);
 
   EXPECT_EQ(sizeof(TBDv3Symbols) / sizeof(ExportedSymbol), Exports.size());
   EXPECT_TRUE(
@@ -228,7 +228,7 @@
 Sym->isWeakDefined(),
 Sym->isThreadLocalValue()});
   }
-  llvm::sort(Exports.begin(), Exports.end());
+  llvm::sort(Exports);
 
   ExportedSymbolSeq DocumentSymbols{
   {SymbolKind::GlobalSymbol, "_sym5", false, false},
Index: llvm/unittests/TextAPI/TextStubV2Tests.cpp
===
--- llvm/unittests/TextAPI/TextStubV2Tests.cpp
+++ llvm/unittests/TextAPI/TextStubV2Tests.cpp
@@ -103,7 +103,7 @@
 ExportedSymbol{Sym->getKind(), std::string(Sym->getName()),
Sym->isWeakDefined(), Sym->isThreadLocalValue()});
   }
-  llvm::sort(Exports.begin(), Exports.end());
+  llvm::sort(Exports);
 
   EXPECT_EQ(sizeof(TBDv2Symbols) / sizeof(ExportedSymbol), Exports.size());
   EXPECT_TRUE(
Index: llvm/unittests/TextAPI/TextStubV1Tests.cpp
===
--- llvm/unittests/TextAPI/TextStubV1Tests.cpp
+++ llvm/unittests/TextAPI/TextStubV1Tests.cpp
@@ -102,7 +102,7 @@
 ExportedSymbol{Sym->getKind(), std::string(Sym->getName()),
Sym->isWeakDefined(), Sym->isThreadLocalValue()});
   }
-  llvm::sort(Exports.begin(), Exports.end());
+  llvm::sort(Exports);
 
   

[Lldb-commits] [lldb] cd9a5cf - Use the range-based overload of llvm::sort where possible

2022-07-23 Thread Dmitri Gribenko via lldb-commits

Author: Dmitri Gribenko
Date: 2022-07-23T15:13:25+02:00
New Revision: cd9a5cfd2e4e4d583c9bf5ef1100acaf5e96f29e

URL: 
https://github.com/llvm/llvm-project/commit/cd9a5cfd2e4e4d583c9bf5ef1100acaf5e96f29e
DIFF: 
https://github.com/llvm/llvm-project/commit/cd9a5cfd2e4e4d583c9bf5ef1100acaf5e96f29e.diff

LOG: Use the range-based overload of llvm::sort where possible

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D130403

Added: 


Modified: 
clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
clang-tools-extra/clang-include-fixer/SymbolIndexManager.cpp
clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp
clang-tools-extra/clangd/index/StdLib.cpp
clang/include/clang/Basic/Attr.td
clang/lib/Driver/Multilib.cpp
clang/lib/Frontend/FrontendAction.cpp
clang/lib/Sema/AnalysisBasedWarnings.cpp
lldb/source/Interpreter/OptionValueArray.cpp
lldb/source/Interpreter/OptionValueFileSpecList.cpp
lldb/source/Interpreter/OptionValuePathMappings.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
lldb/source/Symbol/ArmUnwindInfo.cpp
lldb/source/Symbol/CompileUnit.cpp
lldb/source/Symbol/Symtab.cpp
lldb/source/Target/DynamicRegisterInfo.cpp
lldb/source/Target/Target.cpp
lldb/source/Utility/ReproducerProvider.cpp
lldb/source/Utility/Timer.cpp
llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
llvm/unittests/ADT/SmallPtrSetTest.cpp
llvm/unittests/TextAPI/TextStubV1Tests.cpp
llvm/unittests/TextAPI/TextStubV2Tests.cpp
llvm/unittests/TextAPI/TextStubV3Tests.cpp
llvm/unittests/TextAPI/TextStubV4Tests.cpp

Removed: 




diff  --git 
a/clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp 
b/clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
index e25c8e2449dc8..cb5caf1ca92a1 100644
--- 
a/clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
+++ 
b/clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
@@ -193,8 +193,7 @@ groupReplacements(const TUReplacements , const 
TUDiagnostics ,
   // Sort replacements per file to keep consistent behavior when
   // clang-apply-replacements run on 
diff erents machine.
   for (auto  : GroupedReplacements) {
-llvm::sort(FileAndReplacements.second.begin(),
-   FileAndReplacements.second.end());
+llvm::sort(FileAndReplacements.second);
   }
 
   return GroupedReplacements;

diff  --git a/clang-tools-extra/clang-include-fixer/SymbolIndexManager.cpp 
b/clang-tools-extra/clang-include-fixer/SymbolIndexManager.cpp
index ebb4a70c1f8db..95b5ed0a8b1aa 100644
--- a/clang-tools-extra/clang-include-fixer/SymbolIndexManager.cpp
+++ b/clang-tools-extra/clang-include-fixer/SymbolIndexManager.cpp
@@ -59,7 +59,7 @@ static void rank(std::vector ,
   }
   // Sort by the gathered scores. Use file name as a tie breaker so we can
   // deduplicate.
-  llvm::sort(Symbols.begin(), Symbols.end(),
+  llvm::sort(Symbols,
  [&](const SymbolAndSignals , const SymbolAndSignals ) {
auto AS = Score[A.Symbol.getFilePath()];
auto BS = Score[B.Symbol.getFilePath()];

diff  --git a/clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp 
b/clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp
index 0209071af87f4..1d15ae19ead4d 100644
--- a/clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp
@@ -104,10 +104,8 @@ MagicNumbersCheck::MagicNumbersCheck(StringRef Name, 
ClangTidyContext *Context)
   consumeError(StatusOrErr.takeError());
   IgnoredDoublePointValues.push_back(DoubleValue.convertToDouble());
 }
-llvm::sort(IgnoredFloatingPointValues.begin(),
-   IgnoredFloatingPointValues.end());
-llvm::sort(IgnoredDoublePointValues.begin(),
-   IgnoredDoublePointValues.end());
+llvm::sort(IgnoredFloatingPointValues);
+llvm::sort(IgnoredDoublePointValues);
   }
 }
 

diff  --git a/clang-tools-extra/clangd/index/StdLib.cpp 
b/clang-tools-extra/clangd/index/StdLib.cpp
index f00067229a860..f2edc514bae30 100644
--- a/clang-tools-extra/clangd/index/StdLib.cpp
+++ b/clang-tools-extra/clangd/index/StdLib.cpp
@@ -80,7 +80,7 @@ std::string buildUmbrella(llvm::StringLiteral Mandatory,
   "#endif\n",
   Mandatory);
 
-  llvm::sort(Headers.begin(), Headers.end());
+  llvm::sort(Headers);
   auto Last = std::unique(Headers.begin(), Headers.end());
   for (auto Header = Headers.begin(); Header != Last; ++Header) {
 OS << llvm::formatv("#if __has_include({0})\n"

diff  --git a/clang/include/clang/Basic/Attr.td 
b/clang/include/clang/Basic/Attr.td
index 78e0fce917a0f..d61f3583281d1 100644
--- a/clang/include/clang/Basic/Attr.td
+++ b/clang/include/clang/Basic/Attr.td
@@ -2703,7 +2703,7 @@ def 

[Lldb-commits] [PATCH] D129377: [lldb/Fuzzer] Add fuzzer for expression evaluator

2022-07-23 Thread Martin Storsjö via Phabricator via lldb-commits
mstorsjo added a comment.

In D129377#3673237 , @mib wrote:

> In D129377#3673204 , @mstorsjo 
> wrote:
>
>> This broke building of Clang, when it's set up by symlinking 
>> `llvm-project/clang` into `llvm-project/llvm/tools`. In that case, cmake 
>> configure errors out like this:
>>
>>   -- Configuring done 
>>   CMake Error in tools/clang/tools/clang-fuzzer/handle-cxx/CMakeLists.txt:
>> Target "clangHandleCXX" INTERFACE_INCLUDE_DIRECTORIES property contains
>> path:
>>
>>   
>> "/home/martin/code/llvm-project/llvm/tools/clang/tools/clang-fuzzer/handle-cxx/."
>>  
>>   
>> which is prefixed in the source directory.
>>
>> See e.g. 
>> https://stackoverflow.com/questions/25676277/cmake-target-include-directories-prints-an-error-when-i-try-to-add-the-source
>>  for some discussion on the issue.
>>
>> Can we revert this commit until this has been sorted out?
>
> @mstorsjo I reverted Chelsea's patch in b797834748f1 
> , since 
> she's offline now. Do you have a link to a bot failure that would help us 
> investigate the issue ?
>
> Thanks!

Thanks!

It’s not on a public buildbot but only in my local continuous builds 
unfortunately - but I’ll have look at the issue myself today - I was running 
out of time yesterday.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129377

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