[clang] [clang-format] Handle AttributeMacro before access modifiers (PR #95503)

2024-06-14 Thread Owen Pan via cfe-commits
@@ -57,7 +57,10 @@ class LevelIndentTracker { /// Update the indent state given that \p Line is going to be formatted /// next. void nextLine(const AnnotatedLine &Line) { -Offset = getIndentOffset(*Line.First); +const auto *Tok = Line.First; +if (Tok->is(TT_At

[clang] [clang-format] Handle AttributeMacro before access modifiers (PR #95634)

2024-06-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Closes #95094. --- Full diff: https://github.com/llvm/llvm-project/pull/95634.diff 4 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+6-1) - (modified) clang/lib/Format/TokenAnnotator.

[clang] [clang-format] Handle AttributeMacro before access modifiers (PR #95634)

2024-06-14 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/95634 Closes #95094. >From 1c4ab4a5fd869de44795abd48bbaa43176e7275e Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 14 Jun 2024 23:36:58 -0700 Subject: [PATCH] [clang-format] Handle AttributeMacro before access modi

[clang] bb3091a - [clang][Interp][test] Move explicit object parameter test to cxx23.cpp

2024-06-14 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-15T07:46:03+02:00 New Revision: bb3091a6f3fb2b983fc3e0f539ff1d979ea470ac URL: https://github.com/llvm/llvm-project/commit/bb3091a6f3fb2b983fc3e0f539ff1d979ea470ac DIFF: https://github.com/llvm/llvm-project/commit/bb3091a6f3fb2b983fc3e0f539ff1d979ea470ac.diff LO

[clang-tools-extra] [clang-tidy]fix false positives of the result of std::move() is used as rvalue for performance-move-const-arg (PR #95633)

2024-06-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes Fixes: #86404 --- Full diff: https://github.com/llvm/llvm-project/pull/95633.diff 3 Files Affected: - (modified) clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp (+7-1) - (modifie

[clang-tools-extra] [clang-tidy]fix false positives of the result of std::move() is used as rvalue for performance-move-const-arg (PR #95633)

2024-06-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/95633 Fixes: #86404 >From 0022050f7b537914dff7adf937103def4c9c939a Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 15 Jun 2024 05:40:50 + Subject: [PATCH] [clang-tidy]fix false positives of the result

[clang] 7b6447a - [clang][Interp] Fix calling lambdas with explicit instance pointers...

2024-06-14 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-15T07:36:43+02:00 New Revision: 7b6447a1574a1b852dfd8bff57ad4c48548c0102 URL: https://github.com/llvm/llvm-project/commit/7b6447a1574a1b852dfd8bff57ad4c48548c0102 DIFF: https://github.com/llvm/llvm-project/commit/7b6447a1574a1b852dfd8bff57ad4c48548c0102.diff LO

[clang] (New) Add option to generate additional debug info for expression dereferencing pointer to pointers (PR #95298)

2024-06-14 Thread via cfe-commits
dyung wrote: @huangjd, I'm not sure the buildbot emails on failure are working, but the test you added seems to be failing on many bots. Can you take a look and revert if you need time to investigate? - https://lab.llvm.org/buildbot/#/builders/144/builds/163 - https://lab.llvm.org/buildbot/#/b

[clang] [llvm] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-14 Thread Anton Korobeynikov via cfe-commits
asl wrote: @ahmedbougacha Will you please rebase https://github.com/llvm/llvm-project/pull/93903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add DiagHandler parameter to format::getStyle() (PR #91317)

2024-06-14 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/91317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add DiagHandler parameter to format::getStyle() (PR #91317)

2024-06-14 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/91317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add DiagHandler parameter to format::getStyle() (PR #91317)

2024-06-14 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/91317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add DiagHandler for getStyle function (PR #91317)

2024-06-14 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/91317 >From c1e0ad6ee57a95fa4321bbe91aa754167da9fb3b Mon Sep 17 00:00:00 2001 From: Artem Sokolovskii Date: Tue, 7 May 2024 12:27:29 +0200 Subject: [PATCH 1/3] [clang-format] Add DiagHandler for getStyle function It al

[clang] [clang-format] Add DiagHandler for getStyle function (PR #91317)

2024-06-14 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/91317 >From c1e0ad6ee57a95fa4321bbe91aa754167da9fb3b Mon Sep 17 00:00:00 2001 From: Artem Sokolovskii Date: Tue, 7 May 2024 12:27:29 +0200 Subject: [PATCH 1/2] [clang-format] Add DiagHandler for getStyle function It al

[clang] (New) Add option to generate additional debug info for expression dereferencing pointer to pointers (PR #95298)

2024-06-14 Thread William Junda Huang via cfe-commits
https://github.com/huangjd closed https://github.com/llvm/llvm-project/pull/95298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 675d8d6 - (New) Add option to generate additional debug info for expression dereferencing pointer to pointers (#95298)

2024-06-14 Thread via cfe-commits
Author: William Junda Huang Date: 2024-06-15T00:02:45-04:00 New Revision: 675d8d629dbdc794a78d885511eacbabc7929f8a URL: https://github.com/llvm/llvm-project/commit/675d8d629dbdc794a78d885511eacbabc7929f8a DIFF: https://github.com/llvm/llvm-project/commit/675d8d629dbdc794a78d885511eacbabc7929f8a

[clang] [clang-format] Don't over-indent comment below unbraced body (PR #95354)

2024-06-14 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/95354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cddb9ce - [clang-format] Don't over-indent comment below unbraced body (#95354)

2024-06-14 Thread via cfe-commits
Author: Owen Pan Date: 2024-06-14T20:49:13-07:00 New Revision: cddb9ce04e68d876de895d39d60b6af34d569012 URL: https://github.com/llvm/llvm-project/commit/cddb9ce04e68d876de895d39d60b6af34d569012 DIFF: https://github.com/llvm/llvm-project/commit/cddb9ce04e68d876de895d39d60b6af34d569012.diff LOG:

[clang] 904c53d - [clang][Interp] Use different inline descriptors for global variables

2024-06-14 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-15T05:41:59+02:00 New Revision: 904c53d53e7abc3916a679832ec4fa6e521e09b9 URL: https://github.com/llvm/llvm-project/commit/904c53d53e7abc3916a679832ec4fa6e521e09b9 DIFF: https://github.com/llvm/llvm-project/commit/904c53d53e7abc3916a679832ec4fa6e521e09b9.diff LO

[clang] [llvm] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-14 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha edited https://github.com/llvm/llvm-project/pull/93903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AArch64] Rearrange Apple CPUs by generation, not product class. NFC (PR #95579)

2024-06-14 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs closed https://github.com/llvm/llvm-project/pull/95579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AArch64] Rearrange Apple CPUs by generation, not product class. NFC (PR #95579)

2024-06-14 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/95579 >From 1461be872bf26e2e0f2572f688a45af795421432 Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 13 Jun 2024 10:27:52 -0700 Subject: [PATCH 1/4] [llvm][AArch64] Support -mcpu=apple-m4 --- .../llvm/TargetPa

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-06-14 Thread Tor Shepherd via cfe-commits
torshepherd wrote: @HighCommander4 I've pushed up the change that doesn't allow conflicting fixits. I'll now be smoke-testing this over the coming weeks while I work, but consider it ready for review again whenever you have a chance https://github.com/llvm/llvm-project/pull/79867 _

[clang] [llvm] [llvm][AArch64] Rearrange Apple CPUs by generation, not product class. NFC (PR #95579)

2024-06-14 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/95579 >From 1461be872bf26e2e0f2572f688a45af795421432 Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 13 Jun 2024 10:27:52 -0700 Subject: [PATCH 1/4] [llvm][AArch64] Support -mcpu=apple-m4 --- .../llvm/TargetPa

[clang] [llvm] [llvm][AArch64] Support -mcpu=apple-m4 (PR #95478)

2024-06-14 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs closed https://github.com/llvm/llvm-project/pull/95478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2b33591 - [llvm][AArch64] Support -mcpu=apple-m4 (#95478)

2024-06-14 Thread via cfe-commits
Author: Jon Roelofs Date: 2024-06-14T17:24:45-07:00 New Revision: 2b33591386e855cf82a4104092e1a1d2888f32b1 URL: https://github.com/llvm/llvm-project/commit/2b33591386e855cf82a4104092e1a1d2888f32b1 DIFF: https://github.com/llvm/llvm-project/commit/2b33591386e855cf82a4104092e1a1d2888f32b1.diff L

[clang] [llvm] [llvm][AArch64] Rearrange Apple CPUs by generation, not product class. NFC (PR #95579)

2024-06-14 Thread Jon Roelofs via cfe-commits
@@ -983,50 +1007,58 @@ def : ProcessorModel<"thunderx3t110", ThunderX3T110Model, def : ProcessorModel<"tsv110", TSV110Model, ProcessorFeatures.TSV110, [TuneTSV110]>; +// iPhone, iPad, Mac and Watch CPUs jroelofs wrote: works for me https

[clang-tools-extra] [clang-tidy] Clarify diagnostics of bugprone-sizeof-expression (PR #95550)

2024-06-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/95550 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix(92759): clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp: 6 * Function parameter should be passed by const reference (PR #93252)

2024-06-14 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/93252 >From 994791b862dfecf7bb370f32834645011e69137d Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 24 May 2024 01:39:35 +0300 Subject: [PATCH 1/2] fix(92759): use const references --- .../Frontend/Rewrite/

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
@@ -8015,6 +8015,26 @@ but do not pass them to the underlying coroutine or pass them by value. }]; } +def CoroStructuredConcurrencyDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``[[clang::coro_structured_concurrency]]`` is a class attribute whic

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -299,8 +299,7 @@ Example usage for a project using a compile commands database: llvm::outs() << "Generating assets for docs...\n"; Err = G->get()->createResources(CDCtx); if (Err) { -llvm::errs() << toString(std::move(Err)) << "\n"; -return 1; +llvm::outs(

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,358 @@ +// RUN: rm -rf %t && mkdir -p %t/docs && mkdir -p %t/build ilovepi wrote: ```suggestion // RUN: rm -rf %t && mkdir -p %t/docs %t/build ``` you don't need to run `mkdir` twice. https://github.com/llvm/llvm-project/pull/93928 __

[clang] [llvm] [llvm][AArch64] Support -mcpu=apple-m4 (PR #95478)

2024-06-14 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha approved this pull request. https://github.com/llvm/llvm-project/pull/95478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AArch64] Rearrange Apple CPUs by generation, not product class. NFC (PR #95579)

2024-06-14 Thread Ahmed Bougacha via cfe-commits
@@ -983,50 +1007,58 @@ def : ProcessorModel<"thunderx3t110", ThunderX3T110Model, def : ProcessorModel<"tsv110", TSV110Model, ProcessorFeatures.TSV110, [TuneTSV110]>; +// iPhone, iPad, Mac and Watch CPUs ahmedbougacha wrote: Certainly mino

[clang] [llvm] [llvm][AArch64] Rearrange Apple CPUs by generation, not product class. NFC (PR #95579)

2024-06-14 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha edited https://github.com/llvm/llvm-project/pull/95579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AArch64] Rearrange Apple CPUs by generation, not product class. NFC (PR #95579)

2024-06-14 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha approved this pull request. https://github.com/llvm/llvm-project/pull/95579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Eli Friedman via cfe-commits
@@ -8015,6 +8015,26 @@ but do not pass them to the underlying coroutine or pass them by value. }]; } +def CoroStructuredConcurrencyDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``[[clang::coro_structured_concurrency]]`` is a class attribute whic

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-06-14 Thread Shafik Yaghmour via cfe-commits
@@ -3420,6 +3441,15 @@ static bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, } Result = VD->getEvaluatedValue(); + + // P2280R4 If we don't have a value because this is a reference that was not + // initialized or whose lifetime began within E then create a val

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll can I ask you for a review again? As a next step towards the python-bindings strict typing PR, this one captures all the enum refactoring changes necessary towards that goal. Don't be scared by the LoC changed: 90% of that is just indentation changes :) https://git

[clang-tools-extra] [clang-tidy] avoid false positive when overload for bugprone-return-const-ref-from-parameter (PR #95434)

2024-06-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/95434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 3d25e5a - [clang-tidy] avoid false positive when overload for bugprone-return-const-ref-from-parameter (#95434)

2024-06-14 Thread via cfe-commits
Author: Congcong Cai Date: 2024-06-15T06:21:41+08:00 New Revision: 3d25e5ae996d709cf1496f0c6823f6a82f51831e URL: https://github.com/llvm/llvm-project/commit/3d25e5ae996d709cf1496f0c6823f6a82f51831e DIFF: https://github.com/llvm/llvm-project/commit/3d25e5ae996d709cf1496f0c6823f6a82f51831e.diff

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-06-14 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd updated https://github.com/llvm/llvm-project/pull/79867 >From 94dee94becb7d79b087e183754602e08a5c4669d Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Mon, 29 Jan 2024 11:44:25 -0500 Subject: [PATCH 1/2] [clangd] Add fix-all CodeActions --- clang-tools-extra/c

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
@@ -8015,6 +8015,26 @@ but do not pass them to the underlying coroutine or pass them by value. }]; } +def CoroStructuredConcurrencyDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``[[clang::coro_structured_concurrency]]`` is a class attribute whic

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo "" > %t/compile_flags.txt ilovepi wrote: nit: remove. This isn't required. AFAICT its a clang-tidy/clangd thing. https://github.com/llvm/llvm-project/pull/94717 __

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo "" > %t/compile_flags.txt +// RUN: cp "%s" "%t/test.cpp" +// RUN: clang-doc --format=html --executor=standalone -p %t %t/test.cpp -output=%t/docs > %t/output.txt ilovepi wrote: ```suggestion // R

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -49,6 +49,8 @@ using namespace clang::ast_matchers; using namespace clang::tooling; using namespace clang; +using DirIterator = llvm::sys::fs::directory_iterator; ilovepi wrote: There is a` DirIterator` in LLVM's VFS, and it is confusing to see you reuse t

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: rm -rf %t +// RUN: mkdir %t ilovepi wrote: These still seem to be different steps. combining them is intentional. Actually, do you even need this directory? I don't think you do. https://github.com/llvm/llvm-project/pull/94717

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/94717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo "" > %t/compile_flags.txt +// RUN: cp "%s" "%t/test.cpp" ilovepi wrote: Why copy this file and rename it? https://github.com/llvm/llvm-project/pull/94717 _

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi requested changes to this pull request. https://github.com/llvm/llvm-project/pull/94717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/94717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -127,16 +135,85 @@ std::string getFormatString() { // GetMainExecutable (since some platforms don't support taking the // address of main, and some platforms can't implement GetMainExecutable // without being given the address of a function in the main executable). -std::str

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -131,12 +137,55 @@ std::string GetExecutablePath(const char *Argv0, void *MainAddr) { return llvm::sys::fs::getMainExecutable(Argv0, MainAddr); } +void GetAssetFiles(clang::doc::ClangDocContext &CDCtx) { + std::error_code Code; ilovepi wrote: ```sugges

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/94717 >From eeb334620df72c395a5ad27f44a864a6a0c194a5 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 6 Jun 2024 23:18:12 -0400 Subject: [PATCH 1/9] [clang][clang-doc] add asset path --- .../clang-doc/tool/Cla

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread Jannick Kremer via cfe-commits
@@ -611,51 +612,25 @@ def register(value, name): ### Cursor Kinds ### -class BaseEnumeration: +class BaseEnumeration(Enum): """ Common base class for named enumerations held in sync with Index.h values. - -Subclasses must define their own _kinds and _name_map me

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread Jannick Kremer via cfe-commits
@@ -611,51 +612,25 @@ def register(value, name): ### Cursor Kinds ### -class BaseEnumeration: +class BaseEnumeration(Enum): """ Common base class for named enumerations held in sync with Index.h values. - -Subclasses must define their own _kinds and _name_map me

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread Jannick Kremer via cfe-commits
@@ -31,17 +31,9 @@ class TestCursorKind(unittest.TestCase): def test_from_id(self): """Check that kinds can be constructed from valid IDs""" for enum in self.enums: -self.assertEqual(enum.from_id(2), enum._kinds[2]) +self.assertEqual(

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: There is also `TokenKind`: this one does not currently inherit from `BaseEnumeration` and is defined somewhat differently, having all its variants and their IDs as a dictionary in `enumerations.py`. This seems quite arbitrary to me, is there any reaso

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/95608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread Jannick Kremer via cfe-commits
@@ -611,51 +612,25 @@ def register(value, name): ### Cursor Kinds ### -class BaseEnumeration: +class BaseEnumeration(Enum): """ Common base class for named enumerations held in sync with Index.h values. - -Subclasses must define their own _kinds and _name_map me

[clang] [llvm] Cleanup MC/DC intrinsics for #82448 (PR #95496)

2024-06-14 Thread Alan Phipps via cfe-commits
https://github.com/evodius96 approved this pull request. LGTM thanks https://github.com/llvm/llvm-project/pull/95496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jannick Kremer (DeinAlptraum) Changes Use Python's builtin enum class instead of writing our own. This is preparation for passing a strict type check in PR #78114 , fixing 920 out of 1341 strict typing errors --- Patch is 64.63 KiB, tru

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/95608 Use Python's builtin enum class instead of writing our own. This is preparation for passing a strict type check in PR #78114 , fixing 920 out of 1341 strict typing errors >From 35bfcfbc69ee812c59350440b7b1

[clang] [clang][CodeGen] Return RValue from `EmitVAArg` (PR #94635)

2024-06-14 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. https://github.com/llvm/llvm-project/pull/94635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Eli Friedman via cfe-commits
@@ -8015,6 +8015,26 @@ but do not pass them to the underlying coroutine or pass them by value. }]; } +def CoroStructuredConcurrencyDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``[[clang::coro_structured_concurrency]]`` is a class attribute whic

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 ready_for_review https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
yuxuanchen1997 wrote: @ChuanqiXu9, this is a part of the systematic changes I was talking about. At this stage I know there are quite some rough edges but would like your input on the direction here. https://github.com/llvm/llvm-project/pull/94693 __

[clang] [clang-cl] Map /Ot to -O3 instead of -O2 (PR #95406)

2024-06-14 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: For reference, current MSVC has a flag /Ob3 to request more aggressive inlining. https://github.com/llvm/llvm-project/pull/95406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [Clang][NFC] Avoid opening namespace std (PR #95470)

2024-06-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/95470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4184d33 - [Clang][NFC] Avoid opening namespace std (#95470)

2024-06-14 Thread via cfe-commits
Author: Nikolas Klauser Date: 2024-06-14T22:24:40+02:00 New Revision: 4184d33369a9dce391977220683e3f1975bf1fc9 URL: https://github.com/llvm/llvm-project/commit/4184d33369a9dce391977220683e3f1975bf1fc9 DIFF: https://github.com/llvm/llvm-project/commit/4184d33369a9dce391977220683e3f1975bf1fc9.dif

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/94693 >From 049c29d85a06c58ed8afa689fe359e83c11dc314 Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Tue, 4 Jun 2024 23:22:00 -0700 Subject: [PATCH] [Clang] Introduce [[clang::structured_concurrency]] --- cla

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-06-14 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM with one minor comment https://github.com/llvm/llvm-project/pull/75912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-06-14 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/75912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-06-14 Thread Eli Friedman via cfe-commits
@@ -6853,6 +6853,7 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { if (ES->hasExternalDefinitions(D) == ExternalASTSource::EK_Never) DI->completeUnusedClass(*CRD); } + efriedma-quic wrote: Unnecessary whitespace change https://github.

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-06-14 Thread Eli Friedman via cfe-commits
@@ -318,6 +318,9 @@ namespace { if (Diags.hasUnrecoverableErrorOccurred()) return; + if (RD->shouldEmitInExternalSource()) efriedma-quic wrote: Most of the CodeGen code surrounding vtable emission is optimizations. Specifically, to avoid

[clang] [InstallAPI] Pick up input headers by directory traversal (PR #94508)

2024-06-14 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/94508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] feed66f - [InstallAPI] Pick up input headers by directory traversal (#94508)

2024-06-14 Thread via cfe-commits
Author: Cyndy Ishida Date: 2024-06-14T13:08:27-07:00 New Revision: feed66f3eae5006bb05e6cb34801930fd940daa8 URL: https://github.com/llvm/llvm-project/commit/feed66f3eae5006bb05e6cb34801930fd940daa8 DIFF: https://github.com/llvm/llvm-project/commit/feed66f3eae5006bb05e6cb34801930fd940daa8.diff

[clang] [DebugInfo] Change handling of structured bindings of bitfields (PR #94632)

2024-06-14 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/94632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] [Sema] Diagnose unknown std::initializer_list layout in SemaInit (PR #95580)

2024-06-14 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/95580 >From ef42900b5e3533839c126cb9e6b19d7dcc7806c6 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Fri, 14 Jun 2024 19:14:21 +0100 Subject: [PATCH 1/2] [Clang] [SemaCXX] Diagnose unknown std::initializer_list la

[clang] Add flag to opt out of wasm-opt (PR #95208)

2024-06-14 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode approved this pull request. This looks good to me. https://github.com/llvm/llvm-project/pull/95208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle AttributeMacro before access modifiers (PR #95503)

2024-06-14 Thread Björn Schäpers via cfe-commits
@@ -57,7 +57,10 @@ class LevelIndentTracker { /// Update the indent state given that \p Line is going to be formatted /// next. void nextLine(const AnnotatedLine &Line) { -Offset = getIndentOffset(*Line.First); +const auto *Tok = Line.First; +if (Tok->is(TT_At

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-14 Thread Jan Svoboda via cfe-commits
@@ -84,7 +84,9 @@ struct HeaderFileInfo { LLVM_PREFERRED_TYPE(bool) unsigned isModuleHeader : 1; - /// Whether this header is a `textual header` in a module. + /// Whether this header is a `textual header` in a module. If a header is + /// textual in one module and norm

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-14 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/89005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-14 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/89005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't over-indent comment below unbraced body (PR #95354)

2024-06-14 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/95354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-interp] Use -fno-sized-deallocation in two tests (PR #95546)

2024-06-14 Thread Nico Weber via cfe-commits
https://github.com/nico closed https://github.com/llvm/llvm-project/pull/95546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c63b9a5 - [clang-interp] Use -fno-sized-deallocation in two tests (#95546)

2024-06-14 Thread via cfe-commits
Author: Nico Weber Date: 2024-06-14T15:37:17-04:00 New Revision: c63b9a5af72a7d83d936c12ae4bc79828c073edf URL: https://github.com/llvm/llvm-project/commit/c63b9a5af72a7d83d936c12ae4bc79828c073edf DIFF: https://github.com/llvm/llvm-project/commit/c63b9a5af72a7d83d936c12ae4bc79828c073edf.diff LO

[clang] [clang-interp] Use -fno-sized-deallocation in two tests (PR #95546)

2024-06-14 Thread Nico Weber via cfe-commits
nico wrote: Merging to green up tests on a bot. Happy to address post-commit comments in a follow-up 🙂 https://github.com/llvm/llvm-project/pull/95546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [libcxx] [clang] Add builtin to clear padding bytes (prework for P0528R3) (PR #75371)

2024-06-14 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,807 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [libcxx] [clang] Add builtin to clear padding bytes (prework for P0528R3) (PR #75371)

2024-06-14 Thread Eli Friedman via cfe-commits
@@ -2456,6 +2461,139 @@ static RValue EmitHipStdParUnsupportedBuiltin(CodeGenFunction *CGF, return RValue::get(CGF->Builder.CreateCall(UBF, Args)); } +template +void RecursivelyClearPaddingImpl(CodeGenFunction &CGF, Value *Ptr, QualType Ty, size_t CurrentStartOffset, size

[clang] [libcxx] [clang] Add builtin to clear padding bytes (prework for P0528R3) (PR #75371)

2024-06-14 Thread Eli Friedman via cfe-commits
@@ -2538,6 +2539,205 @@ static RValue EmitHipStdParUnsupportedBuiltin(CodeGenFunction *CGF, return RValue::get(CGF->Builder.CreateCall(UBF, Args)); } +template +void RecursivelyClearPaddingImpl(CodeGenFunction &CGF, Value *Ptr, QualType Ty, +

[clang] [libcxx] [clang] Add builtin to clear padding bytes (prework for P0528R3) (PR #75371)

2024-06-14 Thread Eli Friedman via cfe-commits
@@ -2456,6 +2461,139 @@ static RValue EmitHipStdParUnsupportedBuiltin(CodeGenFunction *CGF, return RValue::get(CGF->Builder.CreateCall(UBF, Args)); } +template +void RecursivelyClearPaddingImpl(CodeGenFunction &CGF, Value *Ptr, QualType Ty, size_t CurrentStartOffset, size

[clang] [Clang] fix(95366): enhance cast operation safety with LValue validation (PR #95479)

2024-06-14 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/95479 >From af6ba760826467a3ce7b7a41c18f194528a1cede Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 14 Jun 2024 01:26:34 +0300 Subject: [PATCH 1/4] [Clang] fix(95366): enhance cast operation safety with LVal

  1   2   3   4   >