[Lldb-commits] [lldb] r244194 - Update lldb's ExternalASTSources to match Clang r244161.

2015-08-05 Thread Richard Smith
Author: rsmith
Date: Thu Aug  6 00:13:41 2015
New Revision: 244194

URL: http://llvm.org/viewvc/llvm-project?rev=244194&view=rev
Log:
Update lldb's ExternalASTSources to match Clang r244161.

Modified:
lldb/trunk/include/lldb/Expression/ClangASTSource.h
lldb/trunk/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
lldb/trunk/source/Expression/ClangASTSource.cpp

lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp

Modified: lldb/trunk/include/lldb/Expression/ClangASTSource.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangASTSource.h?rev=244194&r1=244193&r2=244194&view=diff
==
--- lldb/trunk/include/lldb/Expression/ClangASTSource.h (original)
+++ lldb/trunk/include/lldb/Expression/ClangASTSource.h Thu Aug  6 00:13:41 2015
@@ -111,15 +111,15 @@ public:
 /// The DeclContext being searched.
 ///
 /// @param[in] isKindWeWant
-/// If non-NULL, a callback function that returns true given the
+/// A callback function that returns true given the
 /// DeclKinds of desired Decls, and false otherwise.
 ///
 /// @param[in] Decls
 /// A vector that is filled in with matching Decls.
 //--
-clang::ExternalLoadResult FindExternalLexicalDecls(const 
clang::DeclContext *DC,
-   bool 
(*isKindWeWant)(clang::Decl::Kind),
-   
llvm::SmallVectorImpl &Decls) override;
+void FindExternalLexicalDecls(
+const clang::DeclContext *DC, 
llvm::function_ref IsKindWeWant,
+llvm::SmallVectorImpl &Decls) override;
 
 //--
 /// Specify the layout of the contents of a RecordDecl.
@@ -249,11 +249,12 @@ public:
 return m_original.FindExternalVisibleDeclsByName(DC, Name);
 }
 
-clang::ExternalLoadResult
-FindExternalLexicalDecls(const clang::DeclContext *DC, bool 
(*isKindWeWant)(clang::Decl::Kind),
+void
+FindExternalLexicalDecls(const clang::DeclContext *DC,
+ llvm::function_ref 
IsKindWeWant,
  llvm::SmallVectorImpl &Decls) 
override
 {
-return m_original.FindExternalLexicalDecls(DC, isKindWeWant, 
Decls);
+return m_original.FindExternalLexicalDecls(DC, IsKindWeWant, 
Decls);
 }
 
 void

Modified: lldb/trunk/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h?rev=244194&r1=244193&r2=244194&view=diff
==
--- lldb/trunk/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h Thu Aug  6 
00:13:41 2015
@@ -100,15 +100,6 @@ public:
 return;
 }
 
-clang::ExternalLoadResult
-FindExternalLexicalDecls(const clang::DeclContext *decl_ctx, bool 
(*isKindWeWant)(clang::Decl::Kind),
- llvm::SmallVectorImpl &decls) 
override
-{
-// This is used to support iterating through an entire lexical context,
-// which isn't something the debugger should ever need to do.
-return clang::ELR_Failure;
-}
-
 bool FindExternalVisibleDeclsByName(const clang::DeclContext *decl_ctx, 
clang::DeclarationName decl_name) override;
 
 void CompleteType(clang::TagDecl *tag_decl) override;

Modified: lldb/trunk/source/Expression/ClangASTSource.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangASTSource.cpp?rev=244194&r1=244193&r2=244194&view=diff
==
--- lldb/trunk/source/Expression/ClangASTSource.cpp (original)
+++ lldb/trunk/source/Expression/ClangASTSource.cpp Thu Aug  6 00:13:41 2015
@@ -419,9 +419,9 @@ ClangASTSource::GetCompleteObjCInterface
 return complete_iface_decl;
 }
 
-clang::ExternalLoadResult
+void
 ClangASTSource::FindExternalLexicalDecls (const DeclContext *decl_context,
-  bool (*predicate)(Decl::Kind),
+  llvm::function_ref 
predicate,
   llvm::SmallVectorImpl &decls)
 {
 ClangASTMetrics::RegisterLexicalQuery();
@@ -431,11 +431,11 @@ ClangASTSource::FindExternalLexicalDecls
 const Decl *context_decl = dyn_cast(decl_context);
 
 if (!context_decl)
-return ELR_Failure;
+return;
 
 auto iter = m_active_lexical_decls.find(context_decl);
 if (iter != m_active_lexical_decls.end())
-return ELR_Failure;
+return

[Lldb-commits] [lldb] r331323 - Update lldb to match clang r331244 (addition of char8_t).

2018-05-01 Thread Richard Smith via lldb-commits
Author: rsmith
Date: Tue May  1 19:43:22 2018
New Revision: 331323

URL: http://llvm.org/viewvc/llvm-project?rev=331323&view=rev
Log:
Update lldb to match clang r331244 (addition of char8_t).

Also fix misclassification of char16_t and char32_t: these are unsigned types,
not signed types.

Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=331323&r1=331322&r2=331323&view=diff
==
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Tue May  1 19:43:22 2018
@@ -4914,8 +4914,6 @@ lldb::Encoding ClangASTContext::GetEncod
 case clang::BuiltinType::Char_S:
 case clang::BuiltinType::SChar:
 case clang::BuiltinType::WChar_S:
-case clang::BuiltinType::Char16:
-case clang::BuiltinType::Char32:
 case clang::BuiltinType::Short:
 case clang::BuiltinType::Int:
 case clang::BuiltinType::Long:
@@ -4926,6 +4924,9 @@ lldb::Encoding ClangASTContext::GetEncod
 case clang::BuiltinType::Char_U:
 case clang::BuiltinType::UChar:
 case clang::BuiltinType::WChar_U:
+case clang::BuiltinType::Char8:
+case clang::BuiltinType::Char16:
+case clang::BuiltinType::Char32:
 case clang::BuiltinType::UShort:
 case clang::BuiltinType::UInt:
 case clang::BuiltinType::ULong:


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


[Lldb-commits] [lldb] r331406 - Use conventional spelling of always-failing assert.

2018-05-02 Thread Richard Smith via lldb-commits
Author: rsmith
Date: Wed May  2 15:21:11 2018
New Revision: 331406

URL: http://llvm.org/viewvc/llvm-project?rev=331406&view=rev
Log:
Use conventional spelling of always-failing assert.

Fixes -Wstring-conversion warning that was breaking -Werror builds.

Modified:
lldb/trunk/source/Core/Module.cpp

Modified: lldb/trunk/source/Core/Module.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=331406&r1=331405&r2=331406&view=diff
==
--- lldb/trunk/source/Core/Module.cpp (original)
+++ lldb/trunk/source/Core/Module.cpp Wed May  2 15:21:11 2018
@@ -342,7 +342,7 @@ void Module::SetUUID(const lldb_private:
 m_uuid = uuid;
 m_did_set_uuid = true;
   } else {
-lldbassert(!"Attempting to overwrite the existing module UUID");
+lldbassert(0 && "Attempting to overwrite the existing module UUID");
   }
 }
 


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


[Lldb-commits] [lldb] r301483 - Update lldb to match clang r301442.

2017-04-26 Thread Richard Smith via lldb-commits
Author: rsmith
Date: Wed Apr 26 17:10:53 2017
New Revision: 301483

URL: http://llvm.org/viewvc/llvm-project?rev=301483&view=rev
Log:
Update lldb to match clang r301442.

This code really doesn't make any sense: there is only ever one InputKind here.
Plus, this is an incomplete and out-of-date copy-paste of some Clang code. This
really ought to be revisited, but this change should get the bots green again.

Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=301483&r1=301482&r2=301483&view=diff
==
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Wed Apr 26 17:10:53 2017
@@ -378,10 +378,9 @@ static void ParseLangArgs(LangOptions &O
   // Set some properties which depend solely on the input kind; it would be 
nice
   // to move these to the language standard, and have the driver resolve the
   // input kind + language standard.
-  if (IK == IK_Asm) {
+  if (IK.getLanguage() == InputKind::Asm) {
 Opts.AsmPreprocessor = 1;
-  } else if (IK == IK_ObjC || IK == IK_ObjCXX || IK == IK_PreprocessedObjC ||
- IK == IK_PreprocessedObjCXX) {
+  } else if (IK.isObjectiveC()) {
 Opts.ObjC1 = Opts.ObjC2 = 1;
   }
 
@@ -389,30 +388,24 @@ static void ParseLangArgs(LangOptions &O
 
   if (LangStd == LangStandard::lang_unspecified) {
 // Based on the base language, pick one.
-switch (IK) {
-case IK_None:
-case IK_AST:
-case IK_LLVM_IR:
-case IK_RenderScript:
+switch (IK.getLanguage()) {
+case InputKind::Unknown:
+case InputKind::LLVM_IR:
+case InputKind::RenderScript:
   llvm_unreachable("Invalid input kind!");
-case IK_OpenCL:
+case InputKind::OpenCL:
   LangStd = LangStandard::lang_opencl;
   break;
-case IK_CUDA:
-case IK_PreprocessedCuda:
+case InputKind::CUDA:
   LangStd = LangStandard::lang_cuda;
   break;
-case IK_Asm:
-case IK_C:
-case IK_PreprocessedC:
-case IK_ObjC:
-case IK_PreprocessedObjC:
+case InputKind::Asm:
+case InputKind::C:
+case InputKind::ObjC:
   LangStd = LangStandard::lang_gnu99;
   break;
-case IK_CXX:
-case IK_PreprocessedCXX:
-case IK_ObjCXX:
-case IK_PreprocessedObjCXX:
+case InputKind::CXX:
+case InputKind::ObjCXX:
   LangStd = LangStandard::lang_gnucxx98;
   break;
 }
@@ -784,8 +777,8 @@ IdentifierTable *ClangASTContext::getIde
 LangOptions *ClangASTContext::getLanguageOptions() {
   if (m_language_options_ap.get() == nullptr) {
 m_language_options_ap.reset(new LangOptions());
-ParseLangArgs(*m_language_options_ap, IK_ObjCXX, GetTargetTriple());
-//InitializeLangOptions(*m_language_options_ap, IK_ObjCXX);
+ParseLangArgs(*m_language_options_ap, InputKind::ObjCXX, 
GetTargetTriple());
+//InitializeLangOptions(*m_language_options_ap, InputKind::ObjCXX);
   }
   return m_language_options_ap.get();
 }


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


[Lldb-commits] [lldb] r354173 - Fix AST generated for a class template to connect the class inside a

2019-02-15 Thread Richard Smith via lldb-commits
Author: rsmith
Date: Fri Feb 15 13:48:09 2019
New Revision: 354173

URL: http://llvm.org/viewvc/llvm-project?rev=354173&view=rev
Log:
Fix AST generated for a class template to connect the class inside a
class template back to the template.

Previously, when the ASTImporter imported the class, it didn't know that
it was the pattern of a class template, so made the class a name lookup
result for the name of the template, resulting in ambiguity errors when
naming the template.

Due to a clang bug (fixed in r354091, reverted and soon to be
re-committed), ambiguity errors between a template and a non-template
were previously not diagnosed. Once r354091 is re-committed, this will
be covered by existing lldb tests.

Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=354173&r1=354172&r2=354173&view=diff
==
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Feb 15 13:48:09 2019
@@ -1654,6 +1654,7 @@ ClassTemplateDecl *ClangASTContext::Crea
   decl_ctx, // What decl context do we use here? TU? The actual decl
 // context?
   SourceLocation(), decl_name, template_param_list, template_cxx_decl);
+  template_cxx_decl->setDescribedClassTemplate(class_template_decl);
 
   if (class_template_decl) {
 if (access_type != eAccessNone)


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


[Lldb-commits] [lldb] r354185 - Temporarily disable test:

2019-02-15 Thread Richard Smith via lldb-commits
Author: rsmith
Date: Fri Feb 15 16:13:26 2019
New Revision: 354185

URL: http://llvm.org/viewvc/llvm-project?rev=354185&view=rev
Log:
Temporarily disable test:

test/lang/cpp/class-template-parameter-pack/TestClassTemplateParameterPack.py

It fails on Mac OS; apparently a VarDecl 'void *&C' is implicitly
declared there, making the class template name C ambiguous.

Modified:

lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/TestClassTemplateParameterPack.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/TestClassTemplateParameterPack.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/TestClassTemplateParameterPack.py?rev=354185&r1=354184&r2=354185&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/TestClassTemplateParameterPack.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/TestClassTemplateParameterPack.py
 Fri Feb 15 16:13:26 2019
@@ -4,4 +4,7 @@ from lldbsuite.test import decorators
 lldbinline.MakeInlineTest(
 __file__, globals(), [
 decorators.expectedFailureAll(
-compiler="gcc")])
+compiler="gcc"),
+decorators.expectedFailureAll(
+oslist=['ios', 'watchos', 'tvos', 'bridgeos'],
+bugnumber="rdar://problem/48128064: class template declaration 
unexpectedly shadowed by VarDecl on MacOS")])


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


[Lldb-commits] [lldb] r291738 - Update to match clang r291737.

2017-01-11 Thread Richard Smith via lldb-commits
Author: rsmith
Date: Wed Jan 11 20:37:54 2017
New Revision: 291738

URL: http://llvm.org/viewvc/llvm-project?rev=291738&view=rev
Log:
Update to match clang r291737.

Modified:
lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp

Modified: 
lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp?rev=291738&r1=291737&r2=291738&view=diff
==
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp 
(original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp 
Wed Jan 11 20:37:54 2017
@@ -346,8 +346,7 @@ bool ASTResultSynthesizer::SynthesizeBod
 ExprResult address_of_expr =
 m_sema->CreateBuiltinUnaryOp(SourceLocation(), UO_AddrOf, last_expr);
 if (address_of_expr.get())
-  m_sema->AddInitializerToDecl(result_decl, address_of_expr.get(), true,
-   false);
+  m_sema->AddInitializerToDecl(result_decl, address_of_expr.get(), true);
 else
   return false;
   } else {
@@ -359,7 +358,7 @@ bool ASTResultSynthesizer::SynthesizeBod
 if (!result_decl)
   return false;
 
-m_sema->AddInitializerToDecl(result_decl, last_expr, true, false);
+m_sema->AddInitializerToDecl(result_decl, last_expr, true);
   }
 
   DC->addDecl(result_decl);


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


Re: [Lldb-commits] [PATCH] D18530: Move some functions from ClangASTContext to ClangUtil

2016-03-30 Thread Richard Smith via lldb-commits
rsmith added a comment.

In http://reviews.llvm.org/D18530#387230, @zturner wrote:

> I'm curious now what clang does in this regard, so +rsmith in case he has 
> some insight into what happens in clang when someone wants to re-organize 
> some code and how other downstream customers (for example, swift) deal with 
> this.


Clang has no API stability guarantees for its C++ interface. We reserve the 
right to reorganize at will, and to update, rename, and remove interfaces. This 
applies doubly to our internal code organization. Yes, this creates a burden on 
people maintaining out-of-tree patches, but in some ways that's a benefit, as 
it encourages patches to be contributed upstream when they make sense, or at 
least for patches to be proposed to refactor upstream so that the local changes 
are cleanly separable from the upstream code.

Organizational changes do have a cost to upstream development in many ways 
(people are no longer familiar with the code organization, merging fixes to 
point releases is harder, work-in-progress changes may need non-trivial work to 
rebase, ...), so we'd only make them when they make sense from a technical / 
organizational perspective, but in the long term, it's not possible to maintain 
a healthy codebase if cleanup changes are held back due to those short-term 
costs.


http://reviews.llvm.org/D18530



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


[Lldb-commits] [lldb] r245397 - Fix LLDB after Clang r245346.

2015-08-18 Thread Richard Smith via lldb-commits
Author: rsmith
Date: Tue Aug 18 20:05:34 2015
New Revision: 245397

URL: http://llvm.org/viewvc/llvm-project?rev=245397&view=rev
Log:
Fix LLDB after Clang r245346.

The right thing to do here would be to give the ASTConsumer to the
CompilerInstance so it can set things up for us, but we can't do that
because we don't own it. So instead just initialize it ourselves.

Modified:
lldb/trunk/source/Expression/ClangExpressionParser.cpp

Modified: lldb/trunk/source/Expression/ClangExpressionParser.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionParser.cpp?rev=245397&r1=245396&r2=245397&view=diff
==
--- lldb/trunk/source/Expression/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionParser.cpp Tue Aug 18 20:05:34 
2015
@@ -410,6 +410,7 @@ ClangExpressionParser::Parse (Stream &st
 diag_buf->BeginSourceFile(m_compiler->getLangOpts(), 
&m_compiler->getPreprocessor());
 
 ASTConsumer *ast_transformer = 
m_expr.ASTTransformer(m_code_generator.get());
+ast_transformer->Initialize(m_compiler->getASTContext());
 
 if (ClangExpressionDeclMap *decl_map = m_expr.DeclMap())
 decl_map->InstallCodeGenerator(m_code_generator.get());


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


Re: [Lldb-commits] [lldb] eee687a - [lldb] Add minidump save-core functionality to ELF object files

2021-09-01 Thread Richard Smith via lldb-commits
The new test fails under MSan:

Uninitialized bytes in __interceptor_write at offset 2 inside
[0x7fb1f42ed000, 18438530)
==3871==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x55f5706515d9 in RetryAfterSignal
llvm-project/llvm/include/llvm/Support/Errno.h:38:11
#1 0x55f5706515d9 in lldb_private::NativeFile::Write(void const*,
unsigned long&) llvm-project/lldb/source/Host/common/File.cpp:585:9
#2 0x55f570badbf5 in
MinidumpFileBuilder::Dump(std::__msan::unique_ptr >&) const
llvm-project/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp:739:22
#3 0x55f570bb075c in
ObjectFileMinidump::SaveCore(std::__msan::shared_ptr
const&, lldb_private::FileSpec const&, lldb::SaveCoreStyle&,
lldb_private::Status&)
llvm-project/lldb/source/Plugins/ObjectFile/Minidump/ObjectFileMinidump.cpp:114:19
#4 0x55f57048960b in
lldb_private::PluginManager::SaveCore(std::__msan::shared_ptr
const&, lldb_private::FileSpec const&, lldb::SaveCoreStyle&,
lldb_private::ConstString)
llvm-project/lldb/source/Core/PluginManager.cpp:696:9

Please can you take a look?

On Wed, 1 Sept 2021 at 06:19, Andy Yankovsky via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

>
> Author: Andrej Korman
> Date: 2021-09-01T15:14:29+02:00
> New Revision: eee687a66d76bf0b6e3746f7b8d09b0d871bff27
>
> URL:
> https://github.com/llvm/llvm-project/commit/eee687a66d76bf0b6e3746f7b8d09b0d871bff27
> DIFF:
> https://github.com/llvm/llvm-project/commit/eee687a66d76bf0b6e3746f7b8d09b0d871bff27.diff
>
> LOG: [lldb] Add minidump save-core functionality to ELF object files
>
> This change adds save-core functionality into the ObjectFileELF that
> enables
> saving minidump of a stopped process. This change is mainly targeting Linux
> running on x86_64 machines. Minidump should contain basic information
> needed
> to examine state of threads, local variables and stack traces. Full support
> for other platforms is not so far implemented. API tests are using LLDB's
> MinidumpParser.
>
> This relands commit aafa05e, reverted in 1f986f6.
> Failed tests were fixed.
>
> Reviewed By: clayborg
>
> Differential Revision: https://reviews.llvm.org/D108233
>
> Added:
> lldb/source/Plugins/ObjectFile/Minidump/CMakeLists.txt
> lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp
> lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.h
> lldb/source/Plugins/ObjectFile/Minidump/ObjectFileMinidump.cpp
> lldb/source/Plugins/ObjectFile/Minidump/ObjectFileMinidump.h
> lldb/test/API/functionalities/process_save_core_minidump/Makefile
>
> lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py
> lldb/test/API/functionalities/process_save_core_minidump/main.cpp
>
> Modified:
> lldb/include/lldb/Core/PluginManager.h
> lldb/source/API/SBProcess.cpp
> lldb/source/Commands/CommandObjectProcess.cpp
> lldb/source/Commands/Options.td
> lldb/source/Core/PluginManager.cpp
> lldb/source/Plugins/ObjectFile/CMakeLists.txt
>
> Removed:
>
>
>
>
> 
> diff  --git a/lldb/include/lldb/Core/PluginManager.h
> b/lldb/include/lldb/Core/PluginManager.h
> index be91929c62e13..2bee2edea6360 100644
> --- a/lldb/include/lldb/Core/PluginManager.h
> +++ b/lldb/include/lldb/Core/PluginManager.h
> @@ -192,7 +192,8 @@ class PluginManager {
>
>static Status SaveCore(const lldb::ProcessSP &process_sp,
>   const FileSpec &outfile,
> - lldb::SaveCoreStyle &core_style);
> + lldb::SaveCoreStyle &core_style,
> + const ConstString plugin_name);
>
>// ObjectContainer
>static bool
>
> diff  --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp
> index 47c35a23b0781..a965814be1b98 100644
> --- a/lldb/source/API/SBProcess.cpp
> +++ b/lldb/source/API/SBProcess.cpp
> @@ -1228,7 +1228,8 @@ lldb::SBError SBProcess::SaveCore(const char
> *file_name) {
>
>FileSpec core_file(file_name);
>SaveCoreStyle core_style = SaveCoreStyle::eSaveCoreFull;
> -  error.ref() = PluginManager::SaveCore(process_sp, core_file,
> core_style);
> +  error.ref() =
> +  PluginManager::SaveCore(process_sp, core_file, core_style,
> ConstString());
>return LLDB_RECORD_RESULT(error);
>  }
>
>
> diff  --git a/lldb/source/Commands/CommandObjectProcess.cpp
> b/lldb/source/Commands/CommandObjectProcess.cpp
> index bb6220a53d4e8..b3e2f6a1a02b7 100644
> --- a/lldb/source/Commands/CommandObjectProcess.cpp
> +++ b/lldb/source/Commands/CommandObjectProcess.cpp
> @@ -1180,12 +1180,13 @@ static constexpr OptionEnumValues SaveCoreStyles()
> {
>  class CommandObjectProcessSaveCore : public CommandObjectParsed {
>  public:
>CommandObjectProcessSaveCore(CommandInterpreter &interpreter)
> -  : CommandObjectParsed(interpreter, "process save-core",
> -"Save the current process as a core file
> using

[Lldb-commits] [lldb] 2f95c50 - Fix use of wrong printf format specifier for size_t argument.

2020-09-29 Thread Richard Smith via lldb-commits

Author: Richard Smith
Date: 2020-09-29T16:02:08-07:00
New Revision: 2f95c50a8b713970c5134dabc246270111a48c6d

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

LOG: Fix use of wrong printf format specifier for size_t argument.

This causes a build break under -Werror=format.

Added: 


Modified: 
lldb/bindings/python/python-wrapper.swig

Removed: 




diff  --git a/lldb/bindings/python/python-wrapper.swig 
b/lldb/bindings/python/python-wrapper.swig
index c00deba6073b..443ddfb8dd20 100644
--- a/lldb/bindings/python/python-wrapper.swig
+++ b/lldb/bindings/python/python-wrapper.swig
@@ -521,7 +521,7 @@ LLDBSwigPythonCreateScriptedStopHook
 size_t num_args = (*args_info).max_positional_args; 
 if (num_args != 2) {
   error.SetErrorStringWithFormat("Wrong number of args for "
-  "handle_stop callback, should be 2 (excluding self), got: %d", 
+  "handle_stop callback, should be 2 (excluding self), got: %zu",
   num_args);
   Py_RETURN_NONE;
 } else



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


[Lldb-commits] [lldb] r373685 - Properly handle instantiation-dependent array bounds.

2019-10-03 Thread Richard Smith via lldb-commits
Author: rsmith
Date: Thu Oct  3 18:25:59 2019
New Revision: 373685

URL: http://llvm.org/viewvc/llvm-project?rev=373685&view=rev
Log:
Properly handle instantiation-dependent array bounds.

We previously failed to treat an array with an instantiation-dependent
but not value-dependent bound as being an instantiation-dependent type.
We now track the array bound expression as part of a constant array type
if it's an instantiation-dependent expression.

Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=373685&r1=373684&r2=373685&view=diff
==
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Thu Oct  3 18:25:59 2019
@@ -2180,7 +2180,7 @@ CompilerType ClangASTContext::CreateArra
   } else {
 return CompilerType(this, ast->getConstantArrayType(
  ClangUtil::GetQualType(element_type),
- ap_element_count,
+ ap_element_count, nullptr,
  clang::ArrayType::Normal, 0)
   .getAsOpaquePtr());
   }
@@ -4469,7 +4469,7 @@ CompilerType ClangASTContext::GetArrayTy
 return CompilerType(
 this, ast_ctx
   ->getConstantArrayType(
-  qual_type, llvm::APInt(64, size),
+  qual_type, llvm::APInt(64, size), nullptr,
   clang::ArrayType::ArraySizeModifier::Normal, 0)
   .getAsOpaquePtr());
   else


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


[Lldb-commits] [lldb] r371817 - For PR17164: split -fno-lax-vector-conversion into three different

2019-09-12 Thread Richard Smith via lldb-commits
Author: rsmith
Date: Thu Sep 12 23:02:15 2019
New Revision: 371817

URL: http://llvm.org/viewvc/llvm-project?rev=371817&view=rev
Log:
For PR17164: split -fno-lax-vector-conversion into three different
levels:

 -- none: no lax vector conversions [new GCC default]
 -- integer: only conversions between integer vectors [old GCC default]
 -- all: all conversions between same-size vectors [Clang default]

For now, Clang still defaults to "all" mode, but per my proposal on
cfe-dev (2019-04-10) the default will be changed to "integer" as soon as
that doesn't break lots of testcases. (Eventually I'd like to change the
default to "none" to match GCC and general sanity.)

Following GCC's behavior, the driver flag -flax-vector-conversions is
translated to -flax-vector-conversions=integer.

This reinstates r371805, reverted in r371813, with an additional fix for
lldb.

Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=371817&r1=371816&r2=371817&view=diff
==
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Thu Sep 12 23:02:15 2019
@@ -494,7 +494,7 @@ static void ParseLangArgs(LangOptions &O
 Opts.OpenCL = 1;
 Opts.AltiVec = 1;
 Opts.CXXOperatorNames = 1;
-Opts.LaxVectorConversions = 1;
+Opts.setLaxVectorConversions(LangOptions::LaxVectorConversionKind::All);
   }
 
   // OpenCL and C++ both have bool, true, false keywords.


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


[Lldb-commits] [lldb] r360312 - Fix up lldb after clang r360311.

2019-05-08 Thread Richard Smith via lldb-commits
Author: rsmith
Date: Wed May  8 21:40:57 2019
New Revision: 360312

URL: http://llvm.org/viewvc/llvm-project?rev=360312&view=rev
Log:
Fix up lldb after clang r360311.

Patch by Tyker!

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

Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=360312&r1=360311&r2=360312&view=diff
==
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Wed May  8 21:40:57 2019
@@ -8173,6 +8173,10 @@ clang::CXXMethodDecl *ClangASTContext::A
   if (is_artificial)
 return nullptr; // skip everything artificial
 
+  const clang::ExplicitSpecifier explicit_spec(
+  nullptr /*expr*/, is_explicit
+? clang::ExplicitSpecKind::ResolvedTrue
+: clang::ExplicitSpecKind::ResolvedFalse);
   if (name[0] == '~') {
 cxx_dtor_decl = clang::CXXDestructorDecl::Create(
 *getASTContext(), cxx_record_decl, clang::SourceLocation(),
@@ -8191,7 +8195,7 @@ clang::CXXMethodDecl *ClangASTContext::A
 clang::SourceLocation()),
 method_qual_type,
 nullptr, // TypeSourceInfo *
-is_explicit, is_inline, is_artificial, false /*is_constexpr*/);
+explicit_spec, is_inline, is_artificial, false /*is_constexpr*/);
 cxx_method_decl = cxx_ctor_decl;
   } else {
 clang::StorageClass SC = is_static ? clang::SC_Static : clang::SC_None;
@@ -8226,7 +8230,7 @@ clang::CXXMethodDecl *ClangASTContext::A
 clang::SourceLocation()),
 method_qual_type,
 nullptr, // TypeSourceInfo *
-is_inline, is_explicit, false /*is_constexpr*/,
+is_inline, explicit_spec, false /*is_constexpr*/,
 clang::SourceLocation());
   }
 }


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


Re: [Lldb-commits] [lldb] r361565 - [lldb] followup fix for https://reviews.llvm.org/D62305

2019-05-23 Thread Richard Smith via lldb-commits
On Thu, 23 May 2019 at 15:39, Konrad Kleine via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: kwk
> Date: Thu May 23 15:39:13 2019
> New Revision: 361565
>
> URL: http://llvm.org/viewvc/llvm-project?rev=361565&view=rev
> Log:
> [lldb] followup fix for https://reviews.llvm.org/D62305
>
> Summary:
> Fixing this error on windows build bot:
>
> ```
> E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(21):
> error C2440: 'initializing': cannot convert from 'nullptr' to
> 'lldb::thread_result_t'
> E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(21):
> note: A native nullptr can only be converted to bool or, using
> reinterpret_cast, to an integral type
> E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(21):
> error C2439: 'lldb_private::HostNativeThreadBase::m_result': member could
> not be initialized
> E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\include\lldb/Host/HostNativeThreadBase.h(48):
> note: see declaration of 'lldb_private::HostNativeThreadBase::m_result'
> E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(24):
> error C2440: 'initializing': cannot convert from 'nullptr' to
> 'lldb::thread_result_t'
> E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(24):
> note: A native nullptr can only be converted to bool or, using
> reinterpret_cast, to an integral type
> E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(24):
> error C2439: 'lldb_private::HostNativeThreadBase::m_result': member could
> not be initialized
> E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\include\lldb/Host/HostNativeThreadBase.h(48):
> note: see declaration of 'lldb_private::HostNativeThreadBase::m_result'
> E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(40):
> error C2440: '=': cannot convert from 'nullptr' to 'lldb::thread_result_t'
> E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(40):
> note: A native nullptr can only be converted to bool or, using
> reinterpret_cast, to an integral type
> E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(50):
> error C2440: '=': cannot convert from 'nullptr' to 'lldb::thread_result_t'
> E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(50):
> note: A native nullptr can only be converted to bool or, using
> reinterpret_cast, to an integral type
> ```
>
> see
> http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/5050/steps/build/logs/stdio
>
> Reviewers: stella.stamenova, JDevlieghere
>
> Reviewed By: JDevlieghere
>
> Subscribers: lldb-commits
>
> Tags: #lldb
>
> Differential Revision: https://reviews.llvm.org/D62337
>
> Modified:
> lldb/trunk/source/Host/common/HostNativeThreadBase.cpp
>
> Modified: lldb/trunk/source/Host/common/HostNativeThreadBase.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/HostNativeThreadBase.cpp?rev=361565&r1=361564&r2=361565&view=diff
>
> ==
> --- lldb/trunk/source/Host/common/HostNativeThreadBase.cpp (original)
> +++ lldb/trunk/source/Host/common/HostNativeThreadBase.cpp Thu May 23
> 15:39:13 2019
> @@ -18,10 +18,10 @@ using namespace lldb;
>  using namespace lldb_private;
>
>  HostNativeThreadBase::HostNativeThreadBase()
> -: m_thread(LLDB_INVALID_HOST_THREAD), m_result(0) {}
> +: m_thread(LLDB_INVALID_HOST_THREAD), m_result({}) {}
>
>  HostNativeThreadBase::HostNativeThreadBase(thread_t thread)
> -: m_thread(thread), m_result(0) {}
> +: m_thread(thread), m_result({}) {}
>

This change breaks the build with Clang:

third_party/llvm/llvm/tools/lldb/source/Host/common/HostNativeThreadBase.cpp:21:43:
error: cannot initialize non-class type 'lldb::thread_result_t' (aka 'void
*') with a parenthesized initializer list
: m_thread(LLDB_INVALID_HOST_THREAD), m_result({}) {}
  ^~~


>  lldb::thread_t HostNativeThreadBase::GetSystemHandle() const {
>return m_thread;
> @@ -37,7 +37,7 @@ bool HostNativeThreadBase::IsJoinable()
>
>  void HostNativeThreadBase::Reset() {
>m_thread = LLDB_INVALID_HOST_THREAD;
> -  m_result = 0;
> +  m_result = {};
>  }
>
>  bool HostNativeThreadBase::EqualsThread(lldb::thread_t thread) const {
> @@ -47,7 +47,7 @@ bool HostNativeThreadBase::EqualsThread(
>  lldb::thread_t HostNativeThreadBase::Release() {
>lldb::thread_t result = m_thread;
>m_thread = LLDB_INVALID_HOST_THREAD;
> -  m_result = 0;
> +  m_result = {};
>
>return result;
>  }
>
>
> ___
> lldb-commits mailing list
> lldb-commits@li

[Lldb-commits] [lldb] 856fd98 - Generalize regex matching std::string variants to compensate for recent

2020-11-11 Thread Richard Smith via lldb-commits

Author: Richard Smith
Date: 2020-11-11T17:55:47-08:00
New Revision: 856fd98a176240470dcc2b8ad54b5c17ef6a75b3

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

LOG: Generalize regex matching std::string variants to compensate for recent
improvements to Clang's type printing.

Added: 


Modified: 
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp

Removed: 




diff  --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp 
b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
index 83a140ebd5e7..7bc5b194514a 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
@@ -461,52 +461,52 @@ static void LoadLibCxxFormatters(lldb::TypeCategoryImplSP 
cpp_category_sp) {
   AddCXXSummary(cpp_category_sp,
 lldb_private::formatters::LibcxxStringSummaryProviderASCII,
 "std::string summary provider",
-ConstString("^std::__[[:alnum:]]+::string$"), 
stl_summary_flags,
+ConstString("^std::(__[[:alnum:]]+::)?string$"), 
stl_summary_flags,
 true);
   AddCXXSummary(cpp_category_sp,
 lldb_private::formatters::LibcxxStringSummaryProviderASCII,
 "std::string summary provider",
-ConstString("^std::__[[:alnum:]]+::basic_string, "
-"std::__[[:alnum:]]+::allocator >$"),
+ConstString("^std::(__[[:alnum:]]+::)?basic_string, "
+"std::(__[[:alnum:]]+::)?allocator )?>$"),
 stl_summary_flags, true);
   AddCXXSummary(cpp_category_sp,
 lldb_private::formatters::LibcxxStringSummaryProviderASCII,
 "std::string summary provider",
-ConstString("^std::__[[:alnum:]]+::basic_string, "
-"std::__[[:alnum:]]+::allocator 
>$"),
+ConstString("^std::(__[[:alnum:]]+::)?basic_string, "
+"std::(__[[:alnum:]]+::)?allocator 
)?>$"),
 stl_summary_flags, true);
 
   AddCXXSummary(cpp_category_sp,
 lldb_private::formatters::LibcxxStringSummaryProviderUTF16,
 "std::u16string summary provider",
 ConstString(
-"^std::__[[:alnum:]]+::basic_string, "
-"std::__[[:alnum:]]+::allocator >$"),
+"^std::(__[[:alnum:]]+::)?basic_string, "
+"std::(__[[:alnum:]]+::)?allocator )?>$"),
 stl_summary_flags, true);
 
   AddCXXSummary(cpp_category_sp,
 lldb_private::formatters::LibcxxStringSummaryProviderUTF32,
 "std::u32string summary provider",
 ConstString(
-"^std::__[[:alnum:]]+::basic_string, "
-"std::__[[:alnum:]]+::allocator >$"),
+"^std::(__[[:alnum:]]+::)?basic_string, "
+"std::(__[[:alnum:]]+::)?allocator )?>$"),
 stl_summary_flags, true);
 
   AddCXXSummary(cpp_category_sp,
 lldb_private::formatters::LibcxxWStringSummaryProvider,
 "std::wstring summary provider",
-ConstString("^std::__[[:alnum:]]+::wstring$"),
+ConstString("^std::(__[[:alnum:]]+::)?wstring$"),
 stl_summary_flags, true);
   AddCXXSummary(cpp_category_sp,
 lldb_private::formatters::LibcxxWStringSummaryProvider,
 "std::wstring summary provider",
-ConstString("^std::__[[:alnum:]]+::basic_string, "
-"std::__[[:alnum:]]+::allocator >$"),
+ConstString("^std::(__[[:alnum:]]+::)?basic_string, "
+"std::(__[[:alnum:]]+::)?allocator )?>$"),
 stl_summary_flags, true);
 
   SyntheticChildren::Flags stl_synth_flags;
@@ -787,6 +787,10 @@ static void 
LoadLibStdcppFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {
   ConstString("std::__cxx11::basic_string, "
   "std::allocator >"),
   cxx11_string_summary_sp);
+  cpp_category_sp->GetTypeSummariesContainer()->Add(
+  ConstString("std::basic_string, "
+  "std::allocator >"),
+  cxx11_string_summary_sp);
   cpp_category_sp->GetTypeSummariesContainer()->Add(
   ConstString("std::__cxx11::basic_string, "
   "std::allocator >"),



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


[Lldb-commits] [lldb] 4b57400 - [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2021-01-18 Thread Richard Smith via lldb-commits

Author: Richard Smith
Date: 2021-01-18T21:05:01-08:00
New Revision: 4b574008aef5a7235c1f894ab065fe300d26e786

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

LOG: [c++20] P1907R1: Support for generalized non-type template arguments of 
scalar type.

Previously committed as 9e08e51a20d0d2b1c5724bb17e969d036fced4cd, and
reverted because a dependency commit was reverted. This incorporates the
following follow-on commits that were also reverted:

7e84aa1b81e72d44bcc58ffe1731bfc7abb73ce0 by Simon Pilgrim
ed13d8c66781b50ff007cb089c5905f9bb9e8af2 by me
95c7b6cadbc9a3d4376ef44edbeb3c8bb5b8d7fc by Sam McCall
430d5d8429473c2b10b109991d7577a3cea41140 by Dave Zarzycki

Added: 
clang/test/CodeGenCXX/template-arguments.cpp

Modified: 
clang-tools-extra/clangd/DumpAST.cpp
clang-tools-extra/clangd/FindTarget.cpp
clang-tools-extra/clangd/index/remote/Client.cpp
clang/include/clang/AST/ASTContext.h
clang/include/clang/AST/PropertiesBase.td
clang/include/clang/AST/RecursiveASTVisitor.h
clang/include/clang/AST/TemplateArgumentVisitor.h
clang/include/clang/AST/TemplateBase.h
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/lib/AST/ASTContext.cpp
clang/lib/AST/ASTImporter.cpp
clang/lib/AST/ASTStructuralEquivalence.cpp
clang/lib/AST/Decl.cpp
clang/lib/AST/ItaniumMangle.cpp
clang/lib/AST/MicrosoftMangle.cpp
clang/lib/AST/ODRHash.cpp
clang/lib/AST/StmtProfile.cpp
clang/lib/AST/TemplateBase.cpp
clang/lib/AST/TypeLoc.cpp
clang/lib/CodeGen/CGDebugInfo.cpp
clang/lib/CodeGen/CGExprConstant.cpp
clang/lib/Index/USRGeneration.cpp
clang/lib/Sema/SemaLookup.cpp
clang/lib/Sema/SemaOverload.cpp
clang/lib/Sema/SemaTemplate.cpp
clang/lib/Sema/SemaTemplateDeduction.cpp
clang/lib/Sema/SemaTemplateInstantiate.cpp
clang/lib/Sema/SemaTemplateVariadic.cpp
clang/lib/Sema/TreeTransform.h
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/test/CodeGenCXX/mangle-ms-templates.cpp
clang/test/CodeGenCXX/mangle-template.cpp
clang/test/SemaTemplate/temp_arg_nontype_cxx17.cpp
clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp
clang/tools/libclang/CIndex.cpp
clang/tools/libclang/CXCursor.cpp
lldb/include/lldb/lldb-enumerations.h
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Removed: 




diff  --git a/clang-tools-extra/clangd/DumpAST.cpp 
b/clang-tools-extra/clangd/DumpAST.cpp
index 588bcfcf2424..bf7675e7d949 100644
--- a/clang-tools-extra/clangd/DumpAST.cpp
+++ b/clang-tools-extra/clangd/DumpAST.cpp
@@ -143,6 +143,7 @@ class DumpVisitor : public RecursiveASTVisitor 
{
   TEMPLATE_ARGUMENT_KIND(Declaration);
   TEMPLATE_ARGUMENT_KIND(Template);
   TEMPLATE_ARGUMENT_KIND(TemplateExpansion);
+  TEMPLATE_ARGUMENT_KIND(UncommonValue);
 #undef TEMPLATE_ARGUMENT_KIND
 }
 llvm_unreachable("Unhandled ArgKind enum");

diff  --git a/clang-tools-extra/clangd/FindTarget.cpp 
b/clang-tools-extra/clangd/FindTarget.cpp
index 84316659daad..98ef8b3b6d76 100644
--- a/clang-tools-extra/clangd/FindTarget.cpp
+++ b/clang-tools-extra/clangd/FindTarget.cpp
@@ -1079,6 +1079,7 @@ class ExplicitReferenceCollector
 case TemplateArgument::Pack:
 case TemplateArgument::Type:
 case TemplateArgument::Expression:
+case TemplateArgument::UncommonValue:
   break; // Handled by VisitType and VisitExpression.
 };
 return RecursiveASTVisitor::TraverseTemplateArgumentLoc(A);

diff  --git a/clang-tools-extra/clangd/index/remote/Client.cpp 
b/clang-tools-extra/clangd/index/remote/Client.cpp
index b09dbf915e46..a153a8812baf 100644
--- a/clang-tools-extra/clangd/index/remote/Client.cpp
+++ b/clang-tools-extra/clangd/index/remote/Client.cpp
@@ -152,7 +152,8 @@ class IndexClient : public clangd::SymbolIndex {
   });
   }
 
-  llvm::unique_function indexedFiles() const {
+  llvm::unique_function
+  indexedFiles() const override {
 // FIXME: For now we always return "false" regardless of whether the file
 //was indexed or not. A possible implementation could be based on
 //the idea that we do not want to send a request at every

diff  --git a/clang/include/clang/AST/ASTContext.h 
b/clang/include/clang/AST/ASTContext.h
index 0c5d82b3e9aa..a9bfdb4d5fa5 100644
--- a/clang/include/clang/AST/ASTContext.h
+++ b/clang/include/clang/AST/ASTContext.h
@@ -2818,8 +2818,8 @@ class ASTContext : public RefCountedBase {
   /// for destruction.
   template  void addDestruction(T *Ptr) const {
 if (!std::is_trivially_destructible::value) {
-  auto DestroyPtr = [](void *V) { static_cast(V)->~T(); };
-  AddDeallocation(DestroyPtr, Ptr);

Re: [Lldb-commits] [clang] c13dd74 - Set the captures on a CXXRecordDecl representing a lambda closure type

2020-06-05 Thread Richard Smith via lldb-commits
On Thu, 4 Jun 2020 at 23:45, Jonas Devlieghere via cfe-commits <
cfe-comm...@lists.llvm.org> wrote:

> Hey Richard,
>
> It appears this broke the lldb bots:
>
> http://lab.llvm.org:8011/builders/lldb-x86_64-debian
> http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/20549/
>

That's not caused by this NFC commit, it's the one after it. Thanks for the
revert.


> It's hitting an assertion in
> llvm-project/clang/include/clang/AST/DeclCXX.h:887:
>
> Assertion `(data().DefaultedCopyAssignmentIsDeleted ||
> needsOverloadResolutionForCopyAssignment()) && "copy assignment should not
> be deleted"' failed.
>
> I've reverted this commit and the subsequent one
> (c57f8a3a20540fcf9fbf98c0a73f381ec32fce2a) to turn the bots green again
> overnight. Could you please take a look tomorrow?
>

Looks like lldb is doing unusual things with special members when
generating classes directly from debug info. It can't use Sema, so it's
faking up some of what Sema would do, and needed to be extended to also
fake up the new stuff for copy assignments in this patch.

Re-landed with fix in 825e3bb58082eafa8db87a9034379b88f892ce9d.


> Thanks,
> Jonas
>
>
>
> On Thu, Jun 4, 2020 at 7:25 PM Richard Smith via cfe-commits <
> cfe-comm...@lists.llvm.org> wrote:
>
>>
>> Author: Richard Smith
>> Date: 2020-06-04T19:19:01-07:00
>> New Revision: c13dd74e311d2ac70dd3ea663d800307d1aa5b6b
>>
>> URL:
>> https://github.com/llvm/llvm-project/commit/c13dd74e311d2ac70dd3ea663d800307d1aa5b6b
>> DIFF:
>> https://github.com/llvm/llvm-project/commit/c13dd74e311d2ac70dd3ea663d800307d1aa5b6b.diff
>>
>> LOG: Set the captures on a CXXRecordDecl representing a lambda closure
>> type
>> before marking it complete.
>>
>> No functionality change intended.
>>
>> Added:
>>
>>
>> Modified:
>> clang/include/clang/AST/DeclCXX.h
>> clang/include/clang/AST/ExprCXX.h
>> clang/lib/AST/ASTImporter.cpp
>> clang/lib/AST/DeclCXX.cpp
>> clang/lib/AST/ExprCXX.cpp
>> clang/lib/Sema/SemaLambda.cpp
>>
>> Removed:
>>
>>
>>
>>
>> 
>> diff  --git a/clang/include/clang/AST/DeclCXX.h
>> b/clang/include/clang/AST/DeclCXX.h
>> index 3a400a778e53..856717fa0abb 100644
>> --- a/clang/include/clang/AST/DeclCXX.h
>> +++ b/clang/include/clang/AST/DeclCXX.h
>> @@ -999,6 +999,9 @@ class CXXRecordDecl : public RecordDecl {
>>  return
>> static_cast(getLambdaData().CaptureDefault);
>>}
>>
>> +  /// Set the captures for this lambda closure type.
>> +  void setCaptures(ArrayRef Captures);
>> +
>>/// For a closure type, retrieve the mapping from captured
>>/// variables and \c this to the non-static data members that store the
>>/// values or references of the captures.
>> @@ -1030,6 +1033,8 @@ class CXXRecordDecl : public RecordDecl {
>>: nullptr;
>>}
>>
>> +  unsigned capture_size() const { return getLambdaData().NumCaptures; }
>> +
>>using conversion_iterator = UnresolvedSetIterator;
>>
>>conversion_iterator conversion_begin() const {
>>
>> diff  --git a/clang/include/clang/AST/ExprCXX.h
>> b/clang/include/clang/AST/ExprCXX.h
>> index 272ad138d14a..56b27d57bd5c 100644
>> --- a/clang/include/clang/AST/ExprCXX.h
>> +++ b/clang/include/clang/AST/ExprCXX.h
>> @@ -1862,10 +1862,9 @@ class LambdaExpr final : public Expr,
>>/// Construct a lambda expression.
>>LambdaExpr(QualType T, SourceRange IntroducerRange,
>>   LambdaCaptureDefault CaptureDefault,
>> - SourceLocation CaptureDefaultLoc, ArrayRef
>> Captures,
>> - bool ExplicitParams, bool ExplicitResultType,
>> - ArrayRef CaptureInits, SourceLocation ClosingBrace,
>> - bool ContainsUnexpandedParameterPack);
>> + SourceLocation CaptureDefaultLoc, bool ExplicitParams,
>> + bool ExplicitResultType, ArrayRef CaptureInits,
>> + SourceLocation ClosingBrace, bool
>> ContainsUnexpandedParameterPack);
>>
>>/// Construct an empty lambda expression.
>>LambdaExpr(EmptyShell Empty, unsigned NumCaptures)
>> @@ -1888,9 +1887,9 @@ class LambdaExpr final : public Expr,
>>static LambdaExpr *
>>Create(const ASTContext &C, CXXRecordDecl *Class, SourceRange
>> IntroducerRange,
>>   LambdaCaptureDefault CaptureDefault, SourceLocati

[Lldb-commits] [lldb] 825e3bb - PR46209: properly determine whether a copy assignment operator is

2020-06-05 Thread Richard Smith via lldb-commits

Author: Richard Smith
Date: 2020-06-05T16:05:32-07:00
New Revision: 825e3bb58082eafa8db87a9034379b88f892ce9d

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

LOG: PR46209: properly determine whether a copy assignment operator is
trivial.

We previously took a shortcut by assuming that if a subobject had a
trivial copy assignment operator (with a few side-conditions), we would
always invoke it, and could avoid going through overload resolution.
That turns out to not be correct in the presenve of ref-qualifiers (and
also won't be the case for copy-assignments with requires-clauses
either). Use the same logic for lazy declaration of copy-assignments
that we use for all other special member functions.

Previously committed as c57f8a3a20540fcf9fbf98c0a73f381ec32fce2a. This
now also includes an extension of LLDB's workaround for handling special
members without the help of Sema to cover copy assignments.

Added: 


Modified: 
clang/include/clang/AST/CXXRecordDeclDefinitionBits.def
clang/include/clang/AST/DeclCXX.h
clang/lib/AST/ASTImporter.cpp
clang/lib/AST/DeclCXX.cpp
clang/lib/AST/JSONNodeDumper.cpp
clang/lib/AST/TextNodeDumper.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/test/AST/ast-dump-decl-context-json.cpp
clang/test/AST/ast-dump-decl.cpp
clang/test/AST/ast-dump-expr-json.cpp
clang/test/AST/ast-dump-record-definition-data-json.cpp
clang/test/AST/ast-dump-records-json.cpp
clang/test/AST/ast-dump-records.cpp
clang/test/AST/ast-dump-special-member-functions.cpp
clang/test/AST/ast-dump-template-decls-json.cpp
clang/test/SemaCXX/type-traits.cpp
clang/test/SemaObjCXX/arc-0x.mm
clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Removed: 




diff  --git a/clang/include/clang/AST/CXXRecordDeclDefinitionBits.def 
b/clang/include/clang/AST/CXXRecordDeclDefinitionBits.def
index bd4d8247aeca..33e65f8ebf44 100644
--- a/clang/include/clang/AST/CXXRecordDeclDefinitionBits.def
+++ b/clang/include/clang/AST/CXXRecordDeclDefinitionBits.def
@@ -140,6 +140,7 @@ FIELD(HasInheritedAssignment, 1, NO_MERGE)
 /// @{
 FIELD(NeedOverloadResolutionForCopyConstructor, 1, NO_MERGE)
 FIELD(NeedOverloadResolutionForMoveConstructor, 1, NO_MERGE)
+FIELD(NeedOverloadResolutionForCopyAssignment, 1, NO_MERGE)
 FIELD(NeedOverloadResolutionForMoveAssignment, 1, NO_MERGE)
 FIELD(NeedOverloadResolutionForDestructor, 1, NO_MERGE)
 /// @}
@@ -149,6 +150,7 @@ FIELD(NeedOverloadResolutionForDestructor, 1, NO_MERGE)
 /// @{
 FIELD(DefaultedCopyConstructorIsDeleted, 1, NO_MERGE)
 FIELD(DefaultedMoveConstructorIsDeleted, 1, NO_MERGE)
+FIELD(DefaultedCopyAssignmentIsDeleted, 1, NO_MERGE)
 FIELD(DefaultedMoveAssignmentIsDeleted, 1, NO_MERGE)
 FIELD(DefaultedDestructorIsDeleted, 1, NO_MERGE)
 /// @}

diff  --git a/clang/include/clang/AST/DeclCXX.h 
b/clang/include/clang/AST/DeclCXX.h
index 856717fa0abb..2b8d7e879a0a 100644
--- a/clang/include/clang/AST/DeclCXX.h
+++ b/clang/include/clang/AST/DeclCXX.h
@@ -712,6 +712,13 @@ class CXXRecordDecl : public RecordDecl {
!data().DefaultedMoveConstructorIsDeleted;
   }
 
+  /// \c true if we know for sure that this class has a single,
+  /// accessible, unambiguous copy assignment operator that is not deleted.
+  bool hasSimpleCopyAssignment() const {
+return !hasUserDeclaredCopyAssignment() &&
+   !data().DefaultedCopyAssignmentIsDeleted;
+  }
+
   /// \c true if we know for sure that this class has a single,
   /// accessible, unambiguous move assignment operator that is not deleted.
   bool hasSimpleMoveAssignment() const {
@@ -872,6 +879,15 @@ class CXXRecordDecl : public RecordDecl {
 return data().UserDeclaredSpecialMembers & SMF_CopyAssignment;
   }
 
+  /// Set that we attempted to declare an implicit copy assignment
+  /// operator, but overload resolution failed so we deleted it.
+  void setImplicitCopyAssignmentIsDeleted() {
+assert((data().DefaultedCopyAssignmentIsDeleted ||
+needsOverloadResolutionForCopyAssignment()) &&
+   "copy assignment should not be deleted");
+data().DefaultedCopyAssignmentIsDeleted = true;
+  }
+
   /// Determine whether this class needs an implicit copy
   /// assignment operator to be lazily declared.
   bool needsImplicitCopyAssignment() const {
@@ -881,7 +897,16 @@ class CXXRecordDecl : public RecordDecl {
   /// Determine whether we need to eagerly declare a defaulted copy
   /// assignment operator for this class.
   bool needsOverloadResolutionForCopyAssignment() const {
-return data().HasMutableFields;
+// C++20 [class.copy.assign]p2:
+//   If the class definition declares a move constructor or

[Lldb-commits] [libcxxabi] [lldb] [llvm] [WIP] [ItaniumDemangle] Add infrastructure to track location information of parts of a demangled function name (PR #133249)

2025-04-03 Thread Richard Smith via lldb-commits


@@ -6176,6 +6180,10 @@ struct ManglingParser : 
AbstractManglingParser, Alloc> {
Alloc>::AbstractManglingParser;
 };
 
+inline void OutputBuffer::printLeft(const Node &N) { N.printLeft(*this); }

zygoloid wrote:

Thanks, yes. I agree that the duplication is not ideal, and I think it'd be 
fine to add a few more virtual function calls if it reduces the duplication, 
but this extension to the demangler looks nice and clean now.

https://github.com/llvm/llvm-project/pull/133249
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D39307: Fix global data symbol resolution

2017-10-27 Thread Richard Smith - zygoloid via Phabricator via lldb-commits
rsmith added a comment.

In https://reviews.llvm.org/D39307#907358, @xiaobai wrote:

> It seems like clang shouldn't even be asking us about this in the first 
> place, but I don't fully understand why it's trying to do what it's trying to 
> do.


It looks like there are two issues here: clang is doing seemingly-unnecessary 
work as part of a redeclaration lookup, and lldb is reacting badly to clang 
performing those lookups. The former part is possibly a bug, but we sometimes 
really do want to do a full lookup for redeclaration checking, particularly for 
`-Wshadow`. In general we reserve the right to look up names even when it might 
not be obvious why, so a clang API consumer shouldn't be assuming otherwise.

It would seem reasonable to me for lldb to pick the symbol from the current 
module in the case of an ambiguity, and to otherwise make all symbols visible. 
I think that's generally what gdb does. That said... dynamically changing how a 
name resolves might cause some problems, particularly in C++, since Clang 
caches lookup results from `ExternalASTSource`s in the `DeclContext` lookup 
tables. If that turns out to be a problem, I think we'll either need to push 
some part of this disambiguation down into Clang itself or make LLDB invalidate 
those caches when the current module is switched.


https://reviews.llvm.org/D39307



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


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

2022-07-12 Thread Richard Smith - zygoloid via Phabricator via lldb-commits
rsmith accepted this revision.
rsmith added a comment.

LGTM


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112374

___
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-12 Thread Richard Smith - zygoloid via Phabricator via lldb-commits
rsmith accepted this revision.
rsmith added a comment.

Looks good to me.




Comment at: clang/lib/Sema/SemaExprCXX.cpp:6504-6516
 // If we have function pointer types, unify them anyway to unify their
 // exception specifications, if any.
 if (LTy->isFunctionPointerType() || LTy->isMemberFunctionPointerType()) {
   Qualifiers Qs = LTy.getQualifiers();
   LTy = FindCompositePointerType(QuestionLoc, LHS, RHS,
  /*ConvertArgs*/false);
   LTy = Context.getQualifiedType(LTy, Qs);

Can we remove this `if` now? `getCommonSugaredType` should unify the exception 
specifications so I think this stops being a special case.



Comment at: clang/lib/Sema/SemaExprCXX.cpp:6565-6572
 // If we have function pointer types, unify them anyway to unify their
 // exception specifications, if any.
 if (LTy->isFunctionPointerType() || LTy->isMemberFunctionPointerType()) {
   LTy = FindCompositePointerType(QuestionLoc, LHS, RHS);
   assert(!LTy.isNull() && "failed to find composite pointer type for "
   "canonically equivalent function ptr types");
+  return LTy;

Likewise here, can we remove this `if`?



Comment at: clang/test/SemaObjC/format-strings-objc.m:271
 void testTypeOf(NSInteger dW, NSInteger dH) {
-  NSLog(@"dW %d  dH %d",({ __typeof__(dW) __a = (dW); __a < 0 ? -__a : __a; 
}),({ __typeof__(dH) __a = (dH); __a < 0 ? -__a : __a; })); // expected-warning 
2 {{format specifies type 'int' but the argument has type 'long'}}
+  NSLog(@"dW %d  dH %d",({ __typeof__(dW) __a = (dW); __a < 0 ? -__a : __a; 
}),({ __typeof__(dH) __a = (dH); __a < 0 ? -__a : __a; })); // expected-warning 
2 {{values of type 'NSInteger' should not be used as format arguments; add an 
explicit cast to 'long' instead}}
 }

Not related to this patch, but this new diagnostic is in some ways worse than 
the old one: casting to `long` doesn't fix the problem, given that the format 
specifier here `%d` expects an `int`.


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] D131858: [clang] Track the templated entity in type substitution.

2023-01-12 Thread Richard Smith - zygoloid via Phabricator via lldb-commits
rsmith added a comment.

In D131858#3957630 , @arphaman wrote:

> This change has caused a failure in Clang's stage 2 CI on the green dragon 
> Darwin CI: 
> https://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/6390/console.
>
>   Assertion failed: (lvaluePath->getType() == elemTy && "Unexpected type 
> reference!"), function readAPValue, file 
> /Users/buildslave/jenkins/workspace/clang-stage1-RA/clang-build/tools/clang/include/clang/AST/AbstractBasicReader.inc,
>  line 736.

This assert is simply wrong, and I've removed it in 
rG2009f2450532450a99c1a03d5e2c30f478121839 
 -- that 
change should be safe to cherry-pick into the release branch. It's possible for 
the recomputation of the type after deserialization to result in a different 
type than what we saw when serializing, because redeclarations of the same 
entity can use the same type with different sugar -- or even slightly different 
types in some cases, such as when an array bound is added in a redeclaration. 
The dumps of the types provided by @steven_wu confirms that we were just seeing 
a difference in type sugar in this case.

>   Assertion failed: (BlockScope.empty() && CurAbbrevs.empty() && "Block 
> imbalance"), function ~BitstreamWriter, file 
> /Users/buildslave/jenkins/workspace/clang-stage1-RA/llvm-project/llvm/include/llvm/Bitstream/BitstreamWriter.h,
>  line 119.

Is this still happening? If so, this looks more serious, and will need further 
investigation.

Can we undo the workaround in https://reviews.llvm.org/D139956 and see if the 
bot is now happy? Or can someone who was seeing problems before (@steven_wu?) 
run a test?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131858

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


[Lldb-commits] [PATCH] D142733: Add _Optional as fast qualifier

2023-01-27 Thread Richard Smith - zygoloid via Phabricator via lldb-commits
rsmith added a comment.

Including a link to the RFC 
(https://discourse.llvm.org/t/rfc-optional-a-type-qualifier-to-indicate-pointer-nullability/68004/2)
 in each of the patches in this series would be helpful.

Assuming that we want to go in this direction, it seems quite expensive to 
model this as a fast qualifier rather than an extended qualifier. Are these 
annotations expected to be so common that it's better to increase the alignment 
of all types than perform extra allocations and indirections for `_Optional` 
qualifiers? Have you measured the memory impact of increasing the alignment of 
`Type`? I think that should be a prerequisite to adding any new kind of fast 
qualifier, and if we do add such a qualifier, we should select carefully which 
qualifier gets this precious bit in `QualType`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142733

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


[Lldb-commits] [PATCH] D146041: Fix weirdly apologetic diagnostic messages

2023-03-17 Thread Richard Smith - zygoloid via Phabricator via lldb-commits
rsmith added a comment.

I have no strong opinions on the merits of this patch in either direction; I 
think the "sorry"s in the Sema diagnostics for regrettable non-conformance make 
Clang marginally friendlier, but they do nothing to actually help people who 
encounter the diagnostic.

FWIW, the relevant guidance on Clang diagnostics is 
https://clang.llvm.org/docs/InternalsManual.html#the-format-string, and that 
would override the LLVM coding guidelines' rules in places where they conflict 
(though in this case there's no conflict).




Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:338
 def err_file_too_large : Error<
-  "sorry, unsupported: file '%0' is too large for Clang to process">;
+  "unsupported: file '%0' is too large for Clang to process">;
 def err_include_too_large : Error<

I think we could drop the "unsupported: " here too. (We're allowed to have 
implementation limits; this isn't a conformance issue.)



Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:341
+  "this include generates a translation unit too large for"
   " Clang to process.">, DefaultFatal;
 def err_unsupported_bom : Error<"%0 byte order mark detected in '%1', but "

Please remove the trailing period while you're fixing the style of this 
diagnostic.



Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9669
   "by aggregate initialization using default member initializer "
   "is not supported; lifetime of %select{temporary|backing array}0 "
   "will end at the end of the full-expression">, InGroup;

While we're fixing style: in this file we have "is not yet supported", "is not 
supported yet", and "is not supported". We should pick one and use it 
consistently; "is not supported yet" would be my preference.



Comment at: clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp:11-12
 template struct Float {};
-using F1 = Float<1.0f>; // FIXME expected-error {{sorry}}
-using F1 = Float<2.0f / 2>; // FIXME expected-error {{sorry}}
+using F1 = Float<1.0f>; // FIXME expected-error
+using F1 = Float<2.0f / 2>; // FIXME expected-error
 

You should retain a `{{...}}` here with some text from the diagnostic for 
`-verify` to match against. Likewise below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146041

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


[Lldb-commits] [PATCH] D117383: [lldb] Expose std::pair children for unordered_map

2022-09-02 Thread Richard Smith - zygoloid via Phabricator via lldb-commits
rsmith added inline comments.



Comment at: lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp:74
+  if (name.consume_front("std::"))
+name.consume_front("__1::");
+  return name.consume_front(type) && name.startswith("<");

This is not right -- libc++ allows customizing its inline namespace name for 
versioning purpose; it's not `__1` across all deployments. For example, with 
the libc++ unstable ABI, it will likely be something else. To handle this 
properly I think you'll need to look for either `std::name<` or something like 
`std::[a-zA-Z0-9_]*::name<`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117383

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


[Lldb-commits] [PATCH] D133069: Fix inconsistent target arch when attaching to arm64 binaries on arm64e platforms.

2022-09-02 Thread Richard Smith - zygoloid via Phabricator via lldb-commits
rsmith added a comment.

Hi, the newly-added test, `TestDynamicLoaderDarwin.py`, fails under asan: 
https://gist.github.com/zygoloid/bf7b21f03d7db966e456b6c365c4635d

Please can you take a look?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133069

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


[Lldb-commits] [PATCH] D95164: Make SBDebugger::CreateTargetWithFileAndArch accept lldb.LLDB_DEFAULT_ARCH

2021-01-25 Thread Richard Smith - zygoloid via Phabricator via lldb-commits
rsmith added a comment.

I reverted this and the follow-up fix in 
rG8b1171488575bd0b5ccb23bc1a3d22e2aaccb244 
, because 
it's introduced several test failures. Example: 
http://lab.llvm.org:8011/#/builders/96/builds/3777

It appears that these tests use `CreateTargetWithFileAndArch(None, None)`, 
which worked before these changes and not afterwards.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95164

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