[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-07-01 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: Chrome's Windows debug builds also saw crashes due to this commit: https://crbug.com/350541784 https://github.com/llvm/llvm-project/pull/93913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-07-01 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I reverted these changes in 71ff749d6b9aee70c6d26d9781b9f70bf6a8c445 so @temyurchenko can investigate the issues. https://github.com/llvm/llvm-project/pull/93913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-07-01 Thread via cfe-commits
Prabhuk wrote: I am part of the Fuchsia toolchain team. Our Clang toolchain CI builders crash and I suspect this change is the reason. I am verifying that. But here's the log: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8743609724828014497/+/u/clang/build/stdout and the

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-07-01 Thread Chelsea Cassanova via cfe-commits
chelcassanova wrote: Hey! Looks like this commit broke some tests on the LLDB macOS buildbots: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/6805/console ``` Assertion failed: (!isUnbracedLanguageLinkage(DC) || SC == SC_None), function VarDecl, file Decl.cpp, line 2128. P

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-07-01 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/93913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-29 Thread via cfe-commits
temyurchenko wrote: > Do you need someone to land these changes on your behalf? Given that the PR is approved, perhaps, yo > Do you need someone to land these changes on your behalf? @erichkeane, perhaps you can land these, given that the PR is approved? https://github.com/llvm/llvm-project/p

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-20 Thread Artem Yurchenko via cfe-commits
temyurchenko wrote: > Do you need someone to land these changes on your behalf? Yeah, I don't have the rights :( https://github.com/llvm/llvm-project/pull/93913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-20 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Do you need someone to land these changes on your behalf? https://github.com/llvm/llvm-project/pull/93913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-18 Thread Artem Yurchenko via cfe-commits
@@ -576,13 +576,18 @@ template static bool isFirstInExternCContext(T *D) { return First->isInExternCContext(); } -static bool isSingleLineLanguageLinkage(const Decl &D) { - if (const auto *SD = dyn_cast(D.getDeclContext())) -if (!SD->hasBraces()) - return true; +

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-18 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From 410c7ba9fb7667dabdfbc48fdbda427401ca8df0 Mon Sep 17 00:00:00 2001 From: Artem Yurchenko <44875844+temyurche...@users.noreply.github.com> Date: Thu, 30 May 2024 16:18:47 -0400 Subject: [PATCH 1/2] [clang

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-18 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From 410c7ba9fb7667dabdfbc48fdbda427401ca8df0 Mon Sep 17 00:00:00 2001 From: Artem Yurchenko <44875844+temyurche...@users.noreply.github.com> Date: Thu, 30 May 2024 16:18:47 -0400 Subject: [PATCH 1/3] [clang

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-18 Thread Aaron Ballman via cfe-commits
@@ -2380,7 +2380,7 @@ FunctionDecl *Sema::CreateBuiltin(IdentifierInfo *II, QualType Type, } FunctionDecl *New = FunctionDecl::Create(Context, Parent, Loc, Loc, II, Type, - /*TInfo=*/nullptr, SC_Extern, +

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/93913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-18 Thread Aaron Ballman via cfe-commits
@@ -576,13 +576,18 @@ template static bool isFirstInExternCContext(T *D) { return First->isInExternCContext(); } -static bool isSingleLineLanguageLinkage(const Decl &D) { - if (const auto *SD = dyn_cast(D.getDeclContext())) -if (!SD->hasBraces()) - return true; +

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM with another small improvement that could be made. https://github.com/llvm/llvm-project/pull/93913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-18 Thread Aaron Ballman via cfe-commits
@@ -2380,7 +2380,7 @@ FunctionDecl *Sema::CreateBuiltin(IdentifierInfo *II, QualType Type, } FunctionDecl *New = FunctionDecl::Create(Context, Parent, Loc, Loc, II, Type, - /*TInfo=*/nullptr, SC_Extern, +

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-17 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko edited https://github.com/llvm/llvm-project/pull/93913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-17 Thread Artem Yurchenko via cfe-commits
@@ -2380,7 +2380,7 @@ FunctionDecl *Sema::CreateBuiltin(IdentifierInfo *II, QualType Type, } FunctionDecl *New = FunctionDecl::Create(Context, Parent, Loc, Loc, II, Type, - /*TInfo=*/nullptr, SC_Extern, +

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-17 Thread Artem Yurchenko via cfe-commits
@@ -2380,7 +2380,7 @@ FunctionDecl *Sema::CreateBuiltin(IdentifierInfo *II, QualType Type, } FunctionDecl *New = FunctionDecl::Create(Context, Parent, Loc, Loc, II, Type, - /*TInfo=*/nullptr, SC_Extern, +

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-17 Thread Aaron Ballman via cfe-commits
@@ -2380,7 +2380,7 @@ FunctionDecl *Sema::CreateBuiltin(IdentifierInfo *II, QualType Type, } FunctionDecl *New = FunctionDecl::Create(Context, Parent, Loc, Loc, II, Type, - /*TInfo=*/nullptr, SC_Extern, +

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-17 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From 410c7ba9fb7667dabdfbc48fdbda427401ca8df0 Mon Sep 17 00:00:00 2001 From: Artem Yurchenko <44875844+temyurche...@users.noreply.github.com> Date: Thu, 30 May 2024 16:18:47 -0400 Subject: [PATCH 1/3] [clang

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-17 Thread Artem Yurchenko via cfe-commits
@@ -576,13 +576,19 @@ template static bool isFirstInExternCContext(T *D) { return First->isInExternCContext(); } -static bool isSingleLineLanguageLinkage(const Decl &D) { - if (const auto *SD = dyn_cast(D.getDeclContext())) +static bool isUnbracedLanguageLinkage(const Dec

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-17 Thread Artem Yurchenko via cfe-commits
@@ -2380,7 +2380,7 @@ FunctionDecl *Sema::CreateBuiltin(IdentifierInfo *II, QualType Type, } FunctionDecl *New = FunctionDecl::Create(Context, Parent, Loc, Loc, II, Type, - /*TInfo=*/nullptr, SC_Extern, +

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-17 Thread Aaron Ballman via cfe-commits
@@ -2380,7 +2380,7 @@ FunctionDecl *Sema::CreateBuiltin(IdentifierInfo *II, QualType Type, } FunctionDecl *New = FunctionDecl::Create(Context, Parent, Loc, Loc, II, Type, - /*TInfo=*/nullptr, SC_Extern, +

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-17 Thread Aaron Ballman via cfe-commits
@@ -6286,7 +6286,7 @@ static FunctionDecl *rewriteBuiltinFunctionDecl(Sema *Sema, ASTContext &Context, FunctionDecl *OverloadDecl = FunctionDecl::Create( Context, Parent, FDecl->getLocation(), FDecl->getLocation(), FDecl->getIdentifier(), OverloadTy, - /*TIn

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-17 Thread Aaron Ballman via cfe-commits
@@ -576,13 +576,19 @@ template static bool isFirstInExternCContext(T *D) { return First->isInExternCContext(); } -static bool isSingleLineLanguageLinkage(const Decl &D) { - if (const auto *SD = dyn_cast(D.getDeclContext())) +static bool isUnbracedLanguageLinkage(const Dec

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From 410c7ba9fb7667dabdfbc48fdbda427401ca8df0 Mon Sep 17 00:00:00 2001 From: Artem Yurchenko <44875844+temyurche...@users.noreply.github.com> Date: Thu, 30 May 2024 16:18:47 -0400 Subject: [PATCH 1/2] [clang

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From f1951f3f2dd322123a1c49221c4252f4ea932242 Mon Sep 17 00:00:00 2001 From: Artem Yurchenko <44875844+temyurche...@users.noreply.github.com> Date: Thu, 30 May 2024 16:18:47 -0400 Subject: [PATCH 1/2] [clang

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From 9b18a5c4132cf093fc9b32f6b4dcfe406d485e3d Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Thu, 6 Jun 2024 20:20:19 -0400 Subject: [PATCH] enforce the unbraced `extern ` invariant Quoting 9.11.8: >

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via cfe-commits
temyurchenko wrote: > Hmm... I don't have a great idea. Is using it not enough to get it to be > emitted? I see here we don't seem to cause them to be emitted: > https://godbolt.org/z/nYzMca7Te Yes, I get the same result. I also tried adding a test in `DeclPrinterTest`, but it doesn't lookup

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Erich Keane via cfe-commits
erichkeane wrote: > > I see the 2nds commit doesn't add any tests! Please make it do so > > I've tried and I'm not quite sure how to do it. The issue is we need to test > AST printing of «implicitly declared» functions, such as builtins and > functions instrumented by lldb, such as `log` for l

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From a54036c0fdc1a875f40a274d502dd96651a35ae3 Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Thu, 6 Jun 2024 20:20:19 -0400 Subject: [PATCH] enforce the unbraced `extern ` invariant Quoting 9.11.8: >

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via cfe-commits
temyurchenko wrote: > I see the 2nds commit doesn't add any tests! Please make it do so I've tried and I'm not quite sure how to do it. The issue is we need to test AST printing of «implicitly declared» functions, such as builtins and functions instrumented by lldb, such as `log` for logging;

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Erich Keane via cfe-commits
erichkeane wrote: I see the 2nds commit doesn't add any tests! Please make it do so, else LGTM (plus might want to do a 'merge' commit to reset the CI to a more stable state). https://github.com/llvm/llvm-project/pull/93913 ___ cfe-commits mailing li

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-06 Thread Artem Yurchenko via cfe-commits
temyurchenko wrote: This is a relanding of #93131. The first commit is the same, the second commit presents and fixes the issue from the linked discussion. cc @erichkeane, @AaronBallman, @gulfemsavrun. (I can't set the reviewers myself) https://github.com/llvm/llvm-project/pull/93913 ___

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-06 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From fac45476736cd04f044f046fd0df9e59450a926b Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Wed, 22 May 2024 23:41:35 -0400 Subject: [PATCH 1/2] [clang][AST] fix ast-print of `extern ` with >=2 decl

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 5f243b3fffca42ed320529a54aefd86087aa85f8 db1eb9b69f2ed961a586d15d165acd000bb728c4 --

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-06 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From fac45476736cd04f044f046fd0df9e59450a926b Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Wed, 22 May 2024 23:41:35 -0400 Subject: [PATCH 1/2] [clang][AST] fix ast-print of `extern ` with >=2 decl