[clang] [Clang][Interp] Fix the location of uninitialized base warning (PR #100761)

2024-07-29 Thread Timm Baeder via cfe-commits
tbaederr wrote: CC @AaronBallman @Sirraide @shafik Since this adds new API to `CXXBaseSpecifier`. https://github.com/llvm/llvm-project/pull/100761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] 5d2c324 - Remove a leftover debug-only statement in CheckExprLifetime.cpp

2024-07-29 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2024-07-29T09:22:03+02:00 New Revision: 5d2c324fea2d7cf86ec50e4bb6b680acf89b2ed5 URL: https://github.com/llvm/llvm-project/commit/5d2c324fea2d7cf86ec50e4bb6b680acf89b2ed5 DIFF: https://github.com/llvm/llvm-project/commit/5d2c324fea2d7cf86ec50e4bb6b680acf89b2ed5.diff LO

[clang] Revert "Reland [clang][ASTImport] Add support for import of empty records" (PR #100903)

2024-07-29 Thread Balázs Kéri via cfe-commits
https://github.com/balazske approved this pull request. https://github.com/llvm/llvm-project/pull/100903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Warn about `-c/-S` with `-fsyntax-only` (PR #98607)

2024-07-29 Thread Fangrui Song via cfe-commits
MaskRay wrote: > FWIW, in addition to `-c` in combination with `-fsyntax-only`, this now also > warns for `-c` in combination with `-E`. > > That sounds like a reasonable thing to do to me, so it's probably fine, but > it'd be nice to have that aspect acknowledged as one intended behaviour >

[clang] [clang-format] Fix misannotations of `<` in ternary expressions (PR #100980)

2024-07-29 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/100980 Fixes #100300. >From 594a3517f9074cd2794366d3fba5fb4679785ce8 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 29 Jul 2024 00:19:02 -0700 Subject: [PATCH] [clang-format] Fix misannotations of `<` in ternary e

[clang] [clang-format] Fix misannotations of `<` in ternary expressions (PR #100980)

2024-07-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #100300. --- Full diff: https://github.com/llvm/llvm-project/pull/100980.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+26-16) - (modified) clang/unittests/Format/TokenA

[clang] [analyzer] Avoid crashes in the stream checker (PR #100901)

2024-07-29 Thread Balázs Kéri via cfe-commits
balazske wrote: In the state dump I see that `stdout` seems to be NULL (last line in "constraints"). This explains why the `StateNull` becomes NULL, because call to `assumeNoAliasingWithStdStreams` was called already. I think the better solution is to check NULL-ness of the std stream variable

[clang] 2db0c00 - [clang][CGDebugInfo] Don't generate an implicit 'this' parameter if one was specified explicitly (#100767)

2024-07-29 Thread via cfe-commits
Author: Michael Buch Date: 2024-07-29T08:47:02+01:00 New Revision: 2db0c00e6092947fa07cc587c4a7537213bbc093 URL: https://github.com/llvm/llvm-project/commit/2db0c00e6092947fa07cc587c4a7537213bbc093 DIFF: https://github.com/llvm/llvm-project/commit/2db0c00e6092947fa07cc587c4a7537213bbc093.diff

[clang] [clang][CGDebugInfo] Don't generate an implicit 'this' parameter if one was specified explicitly (PR #100767)

2024-07-29 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/100767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 31769e4 - Revert "Reland [clang][ASTImport] Add support for import of empty records" (#100903)

2024-07-29 Thread via cfe-commits
Author: Michael Buch Date: 2024-07-29T08:47:57+01:00 New Revision: 31769e4d0892312948812fbc2d0a56249ea72492 URL: https://github.com/llvm/llvm-project/commit/31769e4d0892312948812fbc2d0a56249ea72492 DIFF: https://github.com/llvm/llvm-project/commit/31769e4d0892312948812fbc2d0a56249ea72492.diff

[clang] Revert "Reland [clang][ASTImport] Add support for import of empty records" (PR #100903)

2024-07-29 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/100903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang-new][OpenMP] Add bitcode files for AMD GPU OpenMP (PR #96742)

2024-07-29 Thread Dominik Adamski via cfe-commits
DominikAdamski wrote: @jhuber6 You are right. Flang-new for AMD GPU requires `-mlink-builtin-bitcode` for math functions. https://github.com/llvm/llvm-project/pull/96742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [flang] [Flang-new][OpenMP] Add bitcode files for AMD GPU OpenMP (PR #96742)

2024-07-29 Thread Dominik Adamski via cfe-commits
https://github.com/DominikAdamski updated https://github.com/llvm/llvm-project/pull/96742 >From 5b487aac3c8414b6f37f6888f361ca7488094048 Mon Sep 17 00:00:00 2001 From: Dominik Adamski Date: Fri, 21 Jun 2024 18:03:53 +0200 Subject: [PATCH 1/5] [Flang-new][OpenMP] Add offload related flags for AM

[clang] [clang][CodeGen] Don't crash on output whose size is zero. (PR #99849)

2024-07-29 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk updated https://github.com/llvm/llvm-project/pull/99849 >From 86221475bc98c0115cad564b1dc36a96544e921d Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Mon, 22 Jul 2024 01:18:51 -0700 Subject: [PATCH] [clang][CodeGen] Don't crash on output whose size is zero. This fix

[clang] [clang][CodeGen] Don't crash on output whose size is zero. (PR #99849)

2024-07-29 Thread Yeting Kuo via cfe-commits
yetingk wrote: Rebase and ping. https://github.com/llvm/llvm-project/pull/99849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Avoid crashes in the stream checker (PR #100901)

2024-07-29 Thread Balazs Benics via cfe-commits
steakhal wrote: > In the state dump I see that `stdout` seems to be NULL (last line in > "constraints"). This explains why the `StateNull` becomes NULL, because call > to `assumeNoAliasingWithStdStreams` was called already. I think the better > solution is to check NULL-ness of the std stream

[clang] [RISCV] full support for riscv_rvv_vector_bits attribute (PR #100110)

2024-07-29 Thread Vladislav Belov via cfe-commits
vbe-sc wrote: @topperc, could you please have a look at this patch https://github.com/llvm/llvm-project/pull/100110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Avoid crashes in the stream checker (PR #100901)

2024-07-29 Thread Balázs Kéri via cfe-commits
balazske wrote: > Exactly. I didn't want to rush too much, but I can share that my current idea > is to call `assumeNoAliasingWithStdStreams` only on the success path. This can be a better (and more simple) solution. https://github.com/llvm/llvm-project/pull/100901

[clang] [Driver] Have getTargetSubDirPath better match get_compiler_rt_target (PR #100091)

2024-07-29 Thread Rainer Orth via cfe-commits
https://github.com/rorth milestoned https://github.com/llvm/llvm-project/pull/100091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-07-29 Thread via cfe-commits
https://github.com/ivanaivanovska created https://github.com/llvm/llvm-project/pull/100985 When a plain return statement was used in a coroutine, the error "return statement not allowed in coroutine" was surfaced too late (e.g. after other errors in the return statement). Surfacing it earlier

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-07-29 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-07-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (ivanaivanovska) Changes When a plain return statement was used in a coroutine, the error "return statement not allowed in coroutine" was surfaced too late (e.g. after other errors in the return statement). Surfacing it earlier now,

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-07-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-coroutines Author: None (ivanaivanovska) Changes When a plain return statement was used in a coroutine, the error "return statement not allowed in coroutine" was surfaced too late (e.g. after other errors in the return statement). Surfacing it earlier

[clang] [Clang] Demote always_inline error to warning for mismatching SME attrs (PR #100740)

2024-07-29 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm milestoned https://github.com/llvm/llvm-project/pull/100740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5430f73 - [Clang] Demote always_inline error to warning for mismatching SME attrs (#100740)

2024-07-29 Thread via cfe-commits
Author: Sander de Smalen Date: 2024-07-29T09:29:30+01:00 New Revision: 5430f73b501f9fc0a38c3768592f5f31bcbdf2f0 URL: https://github.com/llvm/llvm-project/commit/5430f73b501f9fc0a38c3768592f5f31bcbdf2f0 DIFF: https://github.com/llvm/llvm-project/commit/5430f73b501f9fc0a38c3768592f5f31bcbdf2f0.di

[clang] [Clang] Demote always_inline error to warning for mismatching SME attrs (PR #100740)

2024-07-29 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm closed https://github.com/llvm/llvm-project/pull/100740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Keep alive short-circuiting condition subexpressions in a conditional (PR #100745)

2024-07-29 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun commented: Nice catch, thanks for fixing! https://github.com/llvm/llvm-project/pull/100745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Demote always_inline error to warning for mismatching SME attrs (PR #100740)

2024-07-29 Thread Sander de Smalen via cfe-commits
sdesmalen-arm wrote: /cherry-pick 5430f73b501f9fc0a38c3768592f5f31bcbdf2f0 https://github.com/llvm/llvm-project/pull/100740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Fix bug in `buildContainsExprConsumedInDifferentBlock()`. (PR #100874)

2024-07-29 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/100874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Demote always_inline error to warning for mismatching SME attrs (PR #100740)

2024-07-29 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#100987 https://github.com/llvm/llvm-project/pull/100740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang-new][OpenMP] Add bitcode files for AMD GPU OpenMP (PR #96742)

2024-07-29 Thread Dominik Adamski via cfe-commits
https://github.com/DominikAdamski edited https://github.com/llvm/llvm-project/pull/96742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][FMV][AArch64] Improve streaming mode compatibility. (PR #100181)

2024-07-29 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: /cherry-pick [f8ae128](https://github.com/llvm/llvm-project/commit/f8ae128755777424cf4133e4e8e819c0bc08d2b1) https://github.com/llvm/llvm-project/pull/100181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [clang-format] Use double hyphen for multiple-letter flags (PR #100978)

2024-07-29 Thread via cfe-commits
https://github.com/magic-akari ready_for_review https://github.com/llvm/llvm-project/pull/100978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Use double hyphen for multiple-letter flags (PR #100978)

2024-07-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: None (magic-akari) Changes - Closes: #100974 --- Full diff: https://github.com/llvm/llvm-project/pull/100978.diff 5 Files Affected: - (modified) clang/tools/clang-format/clang-format-diff.py (+4-4) - (modified) clang/tools/clan

[clang] [clang][FMV][AArch64] Improve streaming mode compatibility. (PR #100181)

2024-07-29 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: [f8ae128](https://github.com/llvm/llvm-project/commit/f8ae128755777424cf4133e4e8e819c0bc08d2b1) https://github.com/llvm/llvm-project/actions/runs/10140964466 Please manually backport the fix and push it to your github fork. Once this is done, please cre

[clang] [clang][ASTImporter] Fix import of template parameter default values. (PR #100100)

2024-07-29 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/100100 From e4440b82f3d1fe5c7cafbad87da0e266d35a619e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Tue, 23 Jul 2024 11:20:22 +0200 Subject: [PATCH 1/2] [clang][ASTImporter] Fix import of tem

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/100990 Actually, on the failure branch of `fopen`, the resulting pointer could alias with `stdout` iff `stdout` is already known to be null. We crashed in this case as the implementation assumed that the state-split fo

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes Actually, on the failure branch of `fopen`, the resulting pointer could alias with `stdout` iff `stdout` is already known to be null. We crashed in this case as the implementation assumed t

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Balazs Benics via cfe-commits
@@ -1766,13 +1770,6 @@ are assumed to succeed.) fclose(p); } -**Limitations** - -The checker does not track the correspondence between integer file descriptors -and ``FILE *`` pointers. Operations on standard streams like ``stdin`` are not -treated specially and are theref

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Balazs Benics via cfe-commits
steakhal wrote: I decided to put the fixup NFC changes along with this PR (the ones were submitted after I merged the original commit), but on hindsight probably it would be better to merge those NFC changes separately. If you request, I'll split the PR. https://github.com/llvm/llvm-project/pu

[clang] [analyzer] Avoid crashes in the stream checker (PR #100901)

2024-07-29 Thread via cfe-commits
vabridgers wrote: Thanks for the comments. I do not mind abandoning this change in favor of a better solution. Please let me know when you have posted an improved PR and I'll abandon this one. Best https://github.com/llvm/llvm-project/pull/100901 __

[clang] RFC: [cmake] Export CLANG_RESOURCE_DIR in ClangConfig (PR #97197)

2024-07-29 Thread Kim Gräsman via cfe-commits
kimgr wrote: @tstellar @tuliom It seems to me _almost_ all callers pass `CLANG_RESOURCE_DIR` for the `CustomResourceDir` optional argument: https://github.com/search?q=repo%3Allvm%2Fllvm-project%20Driver%3A%3AGetResourcesPath&type=code the one exception being: https://github.com/llvm/llvm-proje

[clang] [analyzer] Avoid crashes in the stream checker (PR #100901)

2024-07-29 Thread Balazs Benics via cfe-commits
steakhal wrote: Thanks for the really valuable reduced case @vabridgers. I'll close this in favor of #100990 if you don't mind. Thanks again for reporting the crash. https://github.com/llvm/llvm-project/pull/100901 ___ cfe-commits mailing list cfe-com

[clang] [analyzer] Avoid crashes in the stream checker (PR #100901)

2024-07-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/100901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Avoid crashes in the stream checker (PR #100901)

2024-07-29 Thread via cfe-commits
vabridgers wrote: Thanks @steakhal ! https://github.com/llvm/llvm-project/pull/100901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang] Demote always_inline error to warning for mismatching SME attrs" (PR #100991)

2024-07-29 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm created https://github.com/llvm/llvm-project/pull/100991 Reverts llvm/llvm-project#100740 >From e3e9cde46626ff525442b21963c03675c6bfa368 Mon Sep 17 00:00:00 2001 From: Sander de Smalen Date: Mon, 29 Jul 2024 10:18:27 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20"[

[clang] Revert "[Clang] Demote always_inline error to warning for mismatching SME attrs" (PR #100991)

2024-07-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Sander de Smalen (sdesmalen-arm) Changes Reverts llvm/llvm-project#100740 --- Full diff: https://github.com/llvm/llvm-project/pull/100991.diff 3 Files Affected: - (modified) clang/include/clang/Basic/D

[clang] e3a3397 - Revert "[Clang] Demote always_inline error to warning for mismatching SME attrs" (#100991)

2024-07-29 Thread via cfe-commits
Author: Sander de Smalen Date: 2024-07-29T10:19:28+01:00 New Revision: e3a3397209fe05ec65d74e9096347fc7a76e919e URL: https://github.com/llvm/llvm-project/commit/e3a3397209fe05ec65d74e9096347fc7a76e919e DIFF: https://github.com/llvm/llvm-project/commit/e3a3397209fe05ec65d74e9096347fc7a76e919e.di

[clang] Revert "[Clang] Demote always_inline error to warning for mismatching SME attrs" (PR #100991)

2024-07-29 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm closed https://github.com/llvm/llvm-project/pull/100991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-07-29 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/100985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-07-29 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov commented: Thanks for the change! This looks like an improvement, but I suspect we can do even better. See the comments I've left in the code. https://github.com/llvm/llvm-project/pull/100985 ___ cfe-commits mailing li

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-07-29 Thread Ilya Biryukov via cfe-commits
@@ -3747,6 +3747,16 @@ Sema::ActOnReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, Diag(ReturnLoc, diag::err_acc_branch_in_out_compute_construct) << /*return*/ 1 << /*out of */ 0); + // using plain return in a coroutine is not allowed. + FunctionScopeIn

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-07-29 Thread Ilya Biryukov via cfe-commits
@@ -291,6 +294,38 @@ void mixed_coreturn_template2(bool b, T) { return; // expected-error {{not allowed in coroutine}} } +struct promise_handle; + +struct Handle : std::coroutine_handle { // expected-note 2{{candidate constructor (the implicit copy constructor) not viable

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-07-29 Thread Ilya Biryukov via cfe-commits
@@ -3747,6 +3747,16 @@ Sema::ActOnReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, Diag(ReturnLoc, diag::err_acc_branch_in_out_compute_construct) << /*return*/ 1 << /*out of */ 0); + // using plain return in a coroutine is not allowed. + FunctionScopeIn

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-07-29 Thread Ilya Biryukov via cfe-commits
@@ -291,6 +294,38 @@ void mixed_coreturn_template2(bool b, T) { return; // expected-error {{not allowed in coroutine}} } +struct promise_handle; + +struct Handle : std::coroutine_handle { // expected-note 2{{candidate constructor (the implicit copy constructor) not viable

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-07-29 Thread Ilya Biryukov via cfe-commits
@@ -1120,7 +1120,7 @@ void Sema::CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body) { // [stmt.return.coroutine]p1: // A coroutine shall not enclose a return statement ([stmt.return]). - if (Fn->FirstReturnLoc.isValid()) { + if (Fn->FirstReturnLoc.isValid() &&

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-07-29 Thread Ilya Biryukov via cfe-commits
@@ -291,6 +294,38 @@ void mixed_coreturn_template2(bool b, T) { return; // expected-error {{not allowed in coroutine}} } +struct promise_handle; + +struct Handle : std::coroutine_handle { // expected-note 2{{candidate constructor (the implicit copy constructor) not viable

[clang] d86311f - [Flang-new][OpenMP] Add bitcode files for AMD GPU OpenMP (#96742)

2024-07-29 Thread via cfe-commits
Author: Dominik Adamski Date: 2024-07-29T11:21:40+02:00 New Revision: d86311f293ebc3867733d4453e0d6c929e620d8b URL: https://github.com/llvm/llvm-project/commit/d86311f293ebc3867733d4453e0d6c929e620d8b DIFF: https://github.com/llvm/llvm-project/commit/d86311f293ebc3867733d4453e0d6c929e620d8b.dif

[clang] [flang] [Flang-new][OpenMP] Add bitcode files for AMD GPU OpenMP (PR #96742)

2024-07-29 Thread Dominik Adamski via cfe-commits
https://github.com/DominikAdamski closed https://github.com/llvm/llvm-project/pull/96742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0362a29 - [clang][dataflow] Fix bug in `buildContainsExprConsumedInDifferentBlock()`. (#100874)

2024-07-29 Thread via cfe-commits
Author: martinboehme Date: 2024-07-29T11:24:26+02:00 New Revision: 0362a29905ab8d68a8eb48741840a514b66552f8 URL: https://github.com/llvm/llvm-project/commit/0362a29905ab8d68a8eb48741840a514b66552f8 DIFF: https://github.com/llvm/llvm-project/commit/0362a29905ab8d68a8eb48741840a514b66552f8.diff

[clang] [clang][dataflow] Fix bug in `buildContainsExprConsumedInDifferentBlock()`. (PR #100874)

2024-07-29 Thread via cfe-commits
https://github.com/martinboehme closed https://github.com/llvm/llvm-project/pull/100874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread via cfe-commits
vabridgers wrote: LGTM, someone must approve. Thanks for fixing this! https://github.com/llvm/llvm-project/pull/100990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/100990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/100990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Donát Nagy via cfe-commits
@@ -1766,13 +1770,6 @@ are assumed to succeed.) fclose(p); } -**Limitations** - -The checker does not track the correspondence between integer file descriptors -and ``FILE *`` pointers. Operations on standard streams like ``stdin`` are not -treated specially and are theref

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Donát Nagy via cfe-commits
@@ -1703,7 +1703,11 @@ are detected: * Invalid 3rd ("``whence``") argument to ``fseek``. The stream operations are by this checker usually split into two cases, a success -and a failure case. However, in the case of write operations (like ``fwrite``, +and a failure case. +On

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > I decided to put the fixup NFC changes along with this PR (the ones were > submitted after I merged the original commit), but on hindsight probably it > would be better to merge those NFC changes separately. If you request, I'll > split the PR. Feel free to keep the NFC cha

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Balazs Benics via cfe-commits
@@ -1703,7 +1703,11 @@ are detected: * Invalid 3rd ("``whence``") argument to ``fseek``. The stream operations are by this checker usually split into two cases, a success -and a failure case. However, in the case of write operations (like ``fwrite``, +and a failure case. +On

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Donát Nagy via cfe-commits
@@ -1703,7 +1703,11 @@ are detected: * Invalid 3rd ("``whence``") argument to ``fseek``. The stream operations are by this checker usually split into two cases, a success -and a failure case. However, in the case of write operations (like ``fwrite``, +and a failure case. +On

[clang] Reland: "[Clang] Demote always_inline error to warning for mismatching SME attrs" (#100991) (PR #100996)

2024-07-29 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm created https://github.com/llvm/llvm-project/pull/100996 Test `aarch64-sme-inline-streaming-attrs.c` caused some buildbot failures, because the test was missing a `REQUIRES: aarch64-registered target`. This was because we've demoted the error to a warning, whic

[clang] Reland: "[Clang] Demote always_inline error to warning for mismatching SME attrs" (#100991) (PR #100996)

2024-07-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 @llvm/pr-subscribers-clang Author: Sander de Smalen (sdesmalen-arm) Changes Test `aarch64-sme-inline-streaming-attrs.c` caused some buildbot failures, because the test was missing a `REQUIRES: aarch64-registered target`. This was becaus

[clang] Reland: "[Clang] Demote always_inline error to warning for mismatching SME attrs" (#100991) (PR #100996)

2024-07-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Sander de Smalen (sdesmalen-arm) Changes Test `aarch64-sme-inline-streaming-attrs.c` caused some buildbot failures, because the test was missing a `REQUIRES: aarch64-registered target`. This was because we've demoted the error to

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Balazs Benics via cfe-commits
@@ -1766,13 +1770,6 @@ are assumed to succeed.) fclose(p); } -**Limitations** - -The checker does not track the correspondence between integer file descriptors -and ``FILE *`` pointers. Operations on standard streams like ``stdin`` are not -treated specially and are theref

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/100990 >From 12ff3274fce8dfe534e71abb9511d6549e32f74c Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Mon, 29 Jul 2024 10:33:55 +0200 Subject: [PATCH 1/6] [analyzer] Fix crash of StreamChecker when eval calling 'f

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Balazs Benics via cfe-commits
steakhal wrote: @balazske Could you please have a look? I wanna make sure everyone is aligned. https://github.com/llvm/llvm-project/pull/100990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

2024-07-29 Thread via cfe-commits
@@ -5337,9 +5337,13 @@ def mmadd4 : Flag<["-"], "mmadd4">, Group, def mno_madd4 : Flag<["-"], "mno-madd4">, Group, HelpText<"Disable the generation of 4-operand madd.s, madd.d and related instructions.">; def mmsa : Flag<["-"], "mmsa">, Group, - HelpText<"Enable MSA ASE (M

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Donát Nagy via cfe-commits
@@ -1766,13 +1770,6 @@ are assumed to succeed.) fclose(p); } -**Limitations** - -The checker does not track the correspondence between integer file descriptors -and ``FILE *`` pointers. Operations on standard streams like ``stdin`` are not -treated specially and are theref

[clang] [clang][dataflow] Handle CXXInheritedCtorInitExpr in ResultObjectVisitor. (PR #99616)

2024-07-29 Thread via cfe-commits
martinboehme wrote: > I have a high-level question not directly related to the patch. We have > probably even talked about it at a conference a few years ago but I don't > remember 😅 I don't recall -- maybe you talked to someone else? > > `ResultObjectVisitor` > > I briefly looked at the imp

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Balazs Benics via cfe-commits
@@ -1766,13 +1770,6 @@ are assumed to succeed.) fclose(p); } -**Limitations** - -The checker does not track the correspondence between integer file descriptors -and ``FILE *`` pointers. Operations on standard streams like ``stdin`` are not -treated specially and are theref

[clang] [llvm] [Clang][LLVM][AArch64] Add intrinsic for MOVT SME2 instruction (PR #97602)

2024-07-29 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/97602 >From 70d1ec0e1c1bd896cf753510a8452325b086430e Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Wed, 3 Jul 2024 15:55:45 + Subject: [PATCH 1/4] [Clang][LLVM][AArch64] Add intrinsic for MOVT SME

[clang] [Clang][OpenMP] Allow `num_teams` to accept multiple expressions (PR #99732)

2024-07-29 Thread Alexey Bataev via cfe-commits
@@ -3793,8 +3793,8 @@ bool RecursiveASTVisitor::VisitOMPMapClause(OMPMapClause *C) { template bool RecursiveASTVisitor::VisitOMPNumTeamsClause( OMPNumTeamsClause *C) { + TRY_TO(VisitOMPClauseList(C)); TRY_TO(VisitOMPClauseWithPreInit(C)); alexey-batae

[clang] 389679d - Reland: "[Clang] Demote always_inline error to warning for mismatching SME attrs" (#100991) (#100996)

2024-07-29 Thread via cfe-commits
Author: Sander de Smalen Date: 2024-07-29T11:23:25+01:00 New Revision: 389679d5f9055bffe8bbd25ae41f084a8d08e0f8 URL: https://github.com/llvm/llvm-project/commit/389679d5f9055bffe8bbd25ae41f084a8d08e0f8 DIFF: https://github.com/llvm/llvm-project/commit/389679d5f9055bffe8bbd25ae41f084a8d08e0f8.di

[clang] Reland: "[Clang] Demote always_inline error to warning for mismatching SME attrs" (#100991) (PR #100996)

2024-07-29 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm closed https://github.com/llvm/llvm-project/pull/100996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Allow `num_teams` to accept multiple expressions (PR #99732)

2024-07-29 Thread Alexey Bataev via cfe-commits
@@ -21587,32 +21597,39 @@ const ValueDecl *SemaOpenMP::getOpenMPDeclareMapperVarName() const { return cast(DSAStack->getDeclareMapperVarRef())->getDecl(); } -OMPClause *SemaOpenMP::ActOnOpenMPNumTeamsClause(Expr *NumTeams, +OMPClause *SemaOpenMP::ActOnOpenMPNumTeamsClause(A

[clang] [Clang][Sema] Disallow applying `onwership_returns` to functions that return non-pointers (PR #99564)

2024-07-29 Thread Pavel Skripkin via cfe-commits
pskrgag wrote: Applied style and spelling fixes, thank you for review! https://github.com/llvm/llvm-project/pull/99564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-07-29 Thread via cfe-commits
https://github.com/skc7 updated https://github.com/llvm/llvm-project/pull/99439 >From 2bcca883eae902238cb49d44ed24aa1304364646 Mon Sep 17 00:00:00 2001 From: skc7 Date: Thu, 18 Jul 2024 11:49:24 +0530 Subject: [PATCH 1/2] [Sanitizer] Make sanitizer passes idempotent. --- clang/test/CodeGenObjC

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Balázs Kéri via cfe-commits
https://github.com/balazske approved this pull request. This looks good now, documentation could be a bit more exact in that operations on standard streams are not checked by the checker, like any other operation on streams that are not opened on the analysis path. https://github.com/llvm/llvm

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/100990 >From 12ff3274fce8dfe534e71abb9511d6549e32f74c Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Mon, 29 Jul 2024 10:33:55 +0200 Subject: [PATCH 1/7] [analyzer] Fix crash of StreamChecker when eval calling 'f

[clang] [analyzer] Fix crash of StreamChecker when eval calling 'fopen' (PR #100990)

2024-07-29 Thread Balazs Benics via cfe-commits
steakhal wrote: > This looks good now, documentation could be a bit more exact in that > operations on standard streams are not checked by the checker, like any other > operation on streams that are not opened on the analysis path. Elaborated the docs section. https://github.com/llvm/llvm-pro

[clang] [Sema][ObjC] Add warning options to detect bad name prefixes. (PR #97597)

2024-07-29 Thread Alastair Houghton via cfe-commits
al45tair wrote: Failure doesn't look like anything to do with this PR. https://github.com/llvm/llvm-project/pull/97597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix hasName matcher assertion with inline namespaces (PR #100975)

2024-07-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I can't get the assertion to reproduce, but I can see the behavioral change with the first matcher: https://godbolt.org/z/TcsYPoGEh So this should probably come with a release note for the fix? https://github.com/llvm/llvm-project/pull/100975

[clang] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly (PR #99687)

2024-07-29 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/99687 >From 59901100a2c11d37947938dfb9db5dd1164cbbf5 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 19 Jul 2024 14:07:18 -0500 Subject: [PATCH 1/3] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directl

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-07-29 Thread via cfe-commits
@@ -136,6 +155,11 @@ namespace { /// do not contain unexpanded parameter packs. bool TraverseStmt(Stmt *S) { Expr *E = dyn_cast_or_null(S); + + llvm::SaveAndRestore _(InConstraint); + if (CurrentFunction && CurrentFunction->getTrailingRequiresClause() ==

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-07-29 Thread via cfe-commits
@@ -1673,14 +1690,12 @@ namespace { // RecoveryExpr that wraps the uninstantiated default argument so // that downstream diagnostics are omitted. ExprResult ErrorResult = SemaRef.CreateRecoveryExpr( - UninstExpr->getBeginLoc(), UninstE

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-07-29 Thread via cfe-commits
@@ -14037,6 +14037,15 @@ class Sema final : public SemaBase { TemplateArgument Arg, SmallVectorImpl &Unexpanded); + /// Collect the set of unexpanded parameter packs within the given + /// template argument. + /// + /// \param Arg The template argument that wil

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-07-29 Thread via cfe-commits
@@ -170,6 +194,17 @@ namespace { if (D && D->isParameterPack()) return true; + if (D && D->isFunctionOrFunctionTemplate()) { +FunctionDecl *FD; +if (auto *FTD = dyn_cast(D)) + FD = FTD->getTemplatedDecl(); +else + FD

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-07-29 Thread via cfe-commits
@@ -4006,6 +4007,37 @@ class TreeTransform { NumExpansions); } + void RebuildLambdaExprImpl(SourceLocation StartLoc, SourceLocation EndLoc, + LambdaScopeInfo *LSI) {} + + ExprResult RebuildLambdaExpr(SourceL

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-07-29 Thread via cfe-commits
@@ -4006,6 +4007,37 @@ class TreeTransform { NumExpansions); } + void RebuildLambdaExprImpl(SourceLocation StartLoc, SourceLocation EndLoc, + LambdaScopeInfo *LSI) {} + + ExprResult RebuildLambdaExpr(SourceL

[clang] [APINotes] Do not crash for C++ operators (PR #101001)

2024-07-29 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan created https://github.com/llvm/llvm-project/pull/101001 This fixes a crash during `CXXMethod->getName()` in `Sema::ProcessAPINotes`: we were trying to get the name of a C++ method as a string, which fails with an assertion if the name is not a simple identifier.

[clang] [APINotes] Do not crash for C++ operators (PR #101001)

2024-07-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Egor Zhdan (egorzhdan) Changes This fixes a crash during `CXXMethod->getName()` in `Sema::ProcessAPINotes`: we were trying to get the name of a C++ method as a string, which fails with an assertion if the name is not a simple identifier.

  1   2   3   4   5   >