[clang] Control analysis-based diagnostics with #pragma (PR #136323)

2025-04-18 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. https://github.com/llvm/llvm-project/pull/136323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Control analysis-based diagnostics with #pragma (PR #136323)

2025-04-18 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,77 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Werror=unreachable-code-aggressive %s + +// Test that analysis-based warnings honor #pragma diagnostic controls. These +// diagnostics are triggered at the end of a function body, so the pragma needs +// to be enabled thr

[clang] Control analysis-based diagnostics with #pragma (PR #136323)

2025-04-18 Thread via cfe-commits
@@ -0,0 +1,77 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Werror=unreachable-code-aggressive %s + +// Test that analysis-based warnings honor #pragma diagnostic controls. These +// diagnostics are triggered at the end of a function body, so the pragma needs +// to be enabled thr

[clang] Control analysis-based diagnostics with #pragma (PR #136323)

2025-04-18 Thread Erich Keane via cfe-commits
@@ -1202,6 +1202,30 @@ Clang also allows you to push and pop the current warning state. This is particularly useful when writing a header file that will be compiled by other people, because you don't know what warning flags they build with. +Note that the following diagnostic

[clang] [CIR] Upstream support for record packing and padding (PR #136036)

2025-04-18 Thread Andy Kaylor via cfe-commits
andykaylor wrote: @xlauko Are you happy with this after the latest update? https://github.com/llvm/llvm-project/pull/136036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix crash when building a module with CC_PRINT_HEADERS_FORMAT=json (PR #136227)

2025-04-18 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. Ok, LGTM as a targeted fix. https://github.com/llvm/llvm-project/pull/136227 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] IncludeCleaner include not found error now contains path (PR #136237)

2025-04-18 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] [clang][Sema][SYCL] Fix MSVC STL usage on AMDGPU (PR #135979)

2025-04-18 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. https://github.com/llvm/llvm-project/pull/135979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Control analysis-based diagnostics with #pragma (PR #136323)

2025-04-18 Thread Aaron Ballman via cfe-commits
@@ -1202,6 +1202,30 @@ Clang also allows you to push and pop the current warning state. This is particularly useful when writing a header file that will be compiled by other people, because you don't know what warning flags they build with. +Note that the following diagnostic

[clang] [Clang] enhance loop analysis to handle variable changes inside lambdas (PR #135573)

2025-04-18 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @AaronBallman Should this issue ideally be resolved by CFG rather than the current AST matcher fix? https://github.com/llvm/llvm-project/pull/135573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [llvm] Minimal support of floating-point operand bundles (PR #135658)

2025-04-18 Thread Kevin P. Neal via cfe-commits
kpneal wrote: > I don't see the necessity of using operand bundles. All of the possible > arguments are metadata strings, not SSA values. Can't we just use metadata > instead? Operand bundles are replacing the constrained intrinsics so we can use the bundles on the hundreds (thousands?) of in

[clang] [Clang] disallow use of attributes before extern template declarations (PR #136328)

2025-04-18 Thread Erich Keane via cfe-commits
@@ -1049,6 +1049,7 @@ Parser::ParseExternalDeclaration(ParsedAttributes &Attrs, case tok::kw_extern: if (getLangOpts().CPlusPlus && NextToken().is(tok::kw_template)) { + ProhibitAttributes(Attrs); erichkeane wrote: It is prohibited by the grammar f

[clang] [CIR] Infer MLIR context in type builders when possible (PR #136362)

2025-04-18 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko created https://github.com/llvm/llvm-project/pull/136362 None >From 2c711e7f5365c1fe6a34254f69c6480a469aebe7 Mon Sep 17 00:00:00 2001 From: xlauko Date: Fri, 18 Apr 2025 21:59:30 +0200 Subject: [PATCH] [CIR] Infer MLIR context in type builders when possible --- clan

[clang] [CIR] Infer MLIR context in type builders when possible (PR #136362)

2025-04-18 Thread Henrich Lauko via cfe-commits
xlauko wrote: * **#136362** https://app.graphite.dev/github/pr/llvm/llvm-project/136362?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/13636

[clang] LowerGlobalDtors: Use use_empty instead of getNumUses == 0 (#136337) (PR #136361)

2025-04-18 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko closed https://github.com/llvm/llvm-project/pull/136361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] LowerGlobalDtors: Use use_empty instead of getNumUses == 0 (#136337) (PR #136361)

2025-04-18 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/136361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Infer MLIR context in type builders when possible (PR #136362)

2025-04-18 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko ready_for_review https://github.com/llvm/llvm-project/pull/136362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Infer MLIR context in type builders when possible (PR #136362)

2025-04-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Henrich Lauko (xlauko) Changes This mirrors incubator changes from https://github.com/llvm/clangir/pull/1570 --- Full diff: https://github.com/llvm/llvm-project/pull/136362.diff 4 Files Affected: - (modified) clang/include/clang/CIR/D

[clang] [CIR] Infer MLIR context in type builders when possible (PR #136362)

2025-04-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Henrich Lauko (xlauko) Changes This mirrors incubator changes from https://github.com/llvm/clangir/pull/1570 --- Full diff: https://github.com/llvm/llvm-project/pull/136362.diff 4 Files Affected: - (modified) clang/include/clang/CIR/Dia

[clang] [CIR] Infer MLIR context in type builders when possible (PR #136362)

2025-04-18 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/136362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for typedef and type aliases (PR #136335)

2025-04-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/14726 Here is the relevant piece of the build lo

[clang] [CIR][NFC] Simplify BoolAttr builders (PR #136366)

2025-04-18 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko created https://github.com/llvm/llvm-project/pull/136366 None >From 510777f925c25f957567fd874b4474c848b359dc Mon Sep 17 00:00:00 2001 From: xlauko Date: Fri, 18 Apr 2025 22:34:24 +0200 Subject: [PATCH] [CIR][NFC] Simplify BoolAttr builders --- .../clang/CIR/Dialect/

[clang] [CIR][NFC] Simplify BoolAttr builders (PR #136366)

2025-04-18 Thread Henrich Lauko via cfe-commits
xlauko wrote: * **#136366** https://app.graphite.dev/github/pr/llvm/llvm-project/136366?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/13636

[clang] [CIR][NFC] Simplify BoolAttr builders (PR #136366)

2025-04-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Henrich Lauko (xlauko) Changes This mirrors incubator changes from https://github.com/llvm/clangir/pull/1572 --- Full diff: https://github.com/llvm/llvm-project/pull/136366.diff 6 Files Affected: - (modified) clang/include/clang/CIR/D

[clang] [clang][deps] Make dependency directives getter thread-safe (PR #136178)

2025-04-18 Thread Cyndy Ishida via cfe-commits
@@ -92,16 +92,10 @@ bool Preprocessor::EnterSourceFile(FileID FID, ConstSearchDirIterator CurDir, } Lexer *TheLexer = new Lexer(FID, *InputFile, *this, IsFirstIncludeOfFile); - if (getPreprocessorOpts().DependencyDirectivesForFile && - FID != PredefinesFileID) { -

[clang] [clang-format] Fix a bug in annotating TT_PointerOrReference (PR #136073)

2025-04-18 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/136073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve error recovery for invalid calls (PR #136295)

2025-04-18 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/136295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenACC] Switch Clang to use the Flang 'appertainment' rules for cla… (PR #135372)

2025-04-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-x64-windows-msvc` running on `windows-gcebot2` while building `clang,llvm` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/63/builds/5194 Here is the relevant piece of the

[clang-tools-extra] [clang-doc] Avoid C-style casts (PR #136390)

2025-04-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Paul Kirth (ilovepi) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/136390.diff 1 Files Affected: - (modified) clang-tools-extra/clang-doc/BitcodeReader.cpp (+3-3) ``diff diff --git a/clang-tool

[clang-tools-extra] [clang-doc][NFC] Use qualified auto (PR #136394)

2025-04-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Paul Kirth (ilovepi) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/136394.diff 1 Files Affected: - (modified) clang-tools-extra/clang-doc/Representation.cpp (+1-1) ``diff diff --git a/clang-too

[clang-tools-extra] [clang-doc][NFC] Use destructuring in Mapper.cpp (PR #135515)

2025-04-18 Thread Paul Kirth via cfe-commits
ilovepi wrote: ### Merge activity * **Apr 18, 9:05 PM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/135515). https://github.com/llvm/llvm-project/pull/135515

[clang-tools-extra] 5c37898 - [clang-doc] Handle static members and functions (#135457)

2025-04-18 Thread via cfe-commits
Author: Paul Kirth Date: 2025-04-18T18:08:06-07:00 New Revision: 5c3789811fd5b50df1178e7068efb75c5b359383 URL: https://github.com/llvm/llvm-project/commit/5c3789811fd5b50df1178e7068efb75c5b359383 DIFF: https://github.com/llvm/llvm-project/commit/5c3789811fd5b50df1178e7068efb75c5b359383.diff LO

[clang-tools-extra] [clang-doc] Handle static members and functions (PR #135457)

2025-04-18 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/135457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc][NFC] Prefer static functions for internal APIs (PR #136391)

2025-04-18 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/136391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 062db99 - [clang-doc][NFC] Use destructuring in Mapper.cpp (#135515)

2025-04-18 Thread via cfe-commits
Author: Paul Kirth Date: 2025-04-18T18:06:57-07:00 New Revision: 062db99353749ec73a19b030b5553beee59cb0c0 URL: https://github.com/llvm/llvm-project/commit/062db99353749ec73a19b030b5553beee59cb0c0 DIFF: https://github.com/llvm/llvm-project/commit/062db99353749ec73a19b030b5553beee59cb0c0.diff LO

[clang-tools-extra] [clang-doc][NFC] Use destructuring in Mapper.cpp (PR #135515)

2025-04-18 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/135515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Handle static members and functions (PR #135457)

2025-04-18 Thread Paul Kirth via cfe-commits
ilovepi wrote: ### Merge activity * **Apr 18, 9:06 PM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/135457). https://github.com/llvm/llvm-project/pull/135457

[clang] [Fuchsia][cmake][NFC] Indent nested loops in Fuchsia-stage2.cmake (PR #112020)

2025-04-18 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/112020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve error recovery for invalid calls (PR #136295)

2025-04-18 Thread Younan Zhang via cfe-commits
@@ -34,21 +34,22 @@ void test_invalid_call_1(int s) { int some_func2(int a, int b); void test_invalid_call_2() { - // CHECK: -RecoveryExpr {{.*}} 'int' contains-errors + // CHECK: -RecoveryExpr {{.*}} '' contains-errors zyn0217 wrote: We used to call Ac

[clang] [clang-format] Fix a crash in EnumTrailingComma (PR #135903)

2025-04-18 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/135903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c64f670 - [clang-format] Fix a crash in EnumTrailingComma (#135903)

2025-04-18 Thread via cfe-commits
Author: Owen Pan Date: 2025-04-18T18:11:56-07:00 New Revision: c64f670255d3fa279f026994da2cd80f3394e0c8 URL: https://github.com/llvm/llvm-project/commit/c64f670255d3fa279f026994da2cd80f3394e0c8 DIFF: https://github.com/llvm/llvm-project/commit/c64f670255d3fa279f026994da2cd80f3394e0c8.diff LOG:

[clang-tools-extra] [clang-doc][NFC] Prefer static functions for internal APIs (PR #136391)

2025-04-18 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/136391 >From e5bfab96095a222dfef54fffb6eaf52a3994af80 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 18 Apr 2025 17:13:37 -0700 Subject: [PATCH] [clang-doc] Prefer static functions for internal APIs --- clang-t

[clang] [clang][Driver] Support passing arbitrary args to `-cc1as` with `-Xclangas`. (PR #100714)

2025-04-18 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. LGTM! (I will have limited internet access between April 20th and May 4th, and my response time may be delayed..) https://github.com/llvm/llvm-project/pull/100714 ___ cfe-commits mailing list cf

[clang-tools-extra] [clang-doc][NFC] Use qualified auto (PR #136394)

2025-04-18 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/136394 None >From f90ab6839b75906a2444868c43086c5d6ed759f5 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 18 Apr 2025 18:01:43 -0700 Subject: [PATCH] [clang-doc][NFC] Use qualified auto --- clang-tools-extra/c

[clang-tools-extra] [clang-doc][NFC] Use qualified auto (PR #136394)

2025-04-18 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi ready_for_review https://github.com/llvm/llvm-project/pull/136394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Avoid C-style casts (PR #136390)

2025-04-18 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi ready_for_review https://github.com/llvm/llvm-project/pull/136390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc][NFC] Use qualified auto (PR #136394)

2025-04-18 Thread Paul Kirth via cfe-commits
ilovepi wrote: * **#136394** https://app.graphite.dev/github/pr/llvm/llvm-project/136394?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/1363

[clang] 58a5c46 - [clang-format] Fix a bug in BWACS_MultiLine (#136281)

2025-04-18 Thread via cfe-commits
Author: Owen Pan Date: 2025-04-18T18:13:02-07:00 New Revision: 58a5c469d97302bb33a54338cf827a4cbe4e416a URL: https://github.com/llvm/llvm-project/commit/58a5c469d97302bb33a54338cf827a4cbe4e416a DIFF: https://github.com/llvm/llvm-project/commit/58a5c469d97302bb33a54338cf827a4cbe4e416a.diff LOG:

[clang] [clang-format] Fix a bug in BWACS_MultiLine (PR #136281)

2025-04-18 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/136281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ab4c939 - [clang-format] Fix a bug in annotating TT_PointerOrReference (#136073)

2025-04-18 Thread via cfe-commits
Author: Owen Pan Date: 2025-04-18T18:12:27-07:00 New Revision: ab4c939579fe6ca85d9a1022511635c4e6f83f55 URL: https://github.com/llvm/llvm-project/commit/ab4c939579fe6ca85d9a1022511635c4e6f83f55 DIFF: https://github.com/llvm/llvm-project/commit/ab4c939579fe6ca85d9a1022511635c4e6f83f55.diff LOG:

[clang-tools-extra] [clang-doc][NFC] Prefer static functions for internal APIs (PR #136391)

2025-04-18 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/136391 >From b4ab90404dc4011720dbd0d52774f02790143da6 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 18 Apr 2025 17:13:37 -0700 Subject: [PATCH] [clang-doc] Prefer static functions for internal APIs Additionally

[clang-tools-extra] [clang-doc][NFC] Prefer static functions for internal APIs (PR #136391)

2025-04-18 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 HEAD~1 HEAD --extensions h,cpp -- clang-tools-extra/clang-doc/BitcodeReader.cpp clan

[clang-tools-extra] [clang-doc][NFC] Prefer static functions for internal APIs (PR #136391)

2025-04-18 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/136391 >From ec8bd52ba80c206a2de1f3958948dfce038ed9fd Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 18 Apr 2025 17:13:37 -0700 Subject: [PATCH] [clang-doc] Prefer static functions for internal APIs Additionally

[clang-tools-extra] [clang-doc][NFC] Avoid else after return (PR #136389)

2025-04-18 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/136389 >From cbde7084f9e465fb0053cf4b7d2e6aed52fd249b Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 18 Apr 2025 17:13:54 -0700 Subject: [PATCH] [clang-doc][NFC] Avoid else after return --- clang-tools-extra/cl

[clang] 6311b11 - [clang][Driver] Support passing arbitrary args to `-cc1as` with `-Xclangas`. (#100714)

2025-04-18 Thread via cfe-commits
Author: Alex Rønne Petersen Date: 2025-04-19T04:09:58+02:00 New Revision: 6311b11595f152a8f4aa02cfa544e72ede66688a URL: https://github.com/llvm/llvm-project/commit/6311b11595f152a8f4aa02cfa544e72ede66688a DIFF: https://github.com/llvm/llvm-project/commit/6311b11595f152a8f4aa02cfa544e72ede66688a

[clang] [clang][Driver] Support passing arbitrary args to `-cc1as` with `-Xclangas`. (PR #100714)

2025-04-18 Thread Alex Rønne Petersen via cfe-commits
https://github.com/alexrp closed https://github.com/llvm/llvm-project/pull/100714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve error recovery for invalid calls (PR #136295)

2025-04-18 Thread Younan Zhang via cfe-commits
@@ -34,21 +34,22 @@ void test_invalid_call_1(int s) { int some_func2(int a, int b); void test_invalid_call_2() { - // CHECK: -RecoveryExpr {{.*}} 'int' contains-errors + // CHECK: -RecoveryExpr {{.*}} '' contains-errors zyn0217 wrote: And as for concept

[clang] [Reland][Clang][CodeGen][UBSan] Add more precise attributes to recoverable ubsan handlers (PR #135135)

2025-04-18 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > This change broke a couple of ubsan tests on i686 on Windows (i.e. a 32 bit > environment): > https://github.com/mstorsjo/llvm-mingw/actions/runs/14527591706/job/40770945907 > > The failing tests are > https://github.com/llvm/llvm-project/blob/llvmorg-20.1.3/compiler-rt/test/

[clang] [Clang] Improve error recovery for invalid calls (PR #136295)

2025-04-18 Thread Matheus Izvekov via cfe-commits
@@ -34,21 +34,22 @@ void test_invalid_call_1(int s) { int some_func2(int a, int b); void test_invalid_call_2() { - // CHECK: -RecoveryExpr {{.*}} 'int' contains-errors + // CHECK: -RecoveryExpr {{.*}} '' contains-errors mizvekov wrote: If calling ActOnC

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-18 Thread Anutosh Bhat via cfe-commits
@@ -451,13 +451,44 @@ const char *const Runtimes = R"( )"; llvm::Expected> -Interpreter::create(std::unique_ptr CI) { +Interpreter::create(std::unique_ptr CI, +std::unique_ptr DeviceCI) { llvm::Error Err = llvm::Error::success(); auto Interp =

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-18 Thread Vassil Vassilev via cfe-commits
@@ -451,13 +451,44 @@ const char *const Runtimes = R"( )"; llvm::Expected> -Interpreter::create(std::unique_ptr CI) { +Interpreter::create(std::unique_ptr CI, +std::unique_ptr DeviceCI) { llvm::Error Err = llvm::Error::success(); auto Interp =

[clang] [CIR] Infer MLIR context in type builders when possible (PR #136362)

2025-04-18 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko closed https://github.com/llvm/llvm-project/pull/136362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-18 Thread Anutosh Bhat via cfe-commits
@@ -451,13 +451,44 @@ const char *const Runtimes = R"( )"; llvm::Expected> -Interpreter::create(std::unique_ptr CI) { +Interpreter::create(std::unique_ptr CI, +std::unique_ptr DeviceCI) { llvm::Error Err = llvm::Error::success(); auto Interp =

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-18 Thread Vassil Vassilev via cfe-commits
@@ -451,13 +451,44 @@ const char *const Runtimes = R"( )"; llvm::Expected> -Interpreter::create(std::unique_ptr CI) { +Interpreter::create(std::unique_ptr CI, +std::unique_ptr DeviceCI) { llvm::Error Err = llvm::Error::success(); auto Interp =

[clang] [CIR][NFC] Simplify BoolAttr builders (PR #136366)

2025-04-18 Thread Henrich Lauko via cfe-commits
@@ -456,9 +456,7 @@ mlir::LogicalResult CIRGenFunction::emitForStmt(const ForStmt &s) { // scalar type. condVal = evaluateExprAsBool(s.getCond()); } else { -cir::BoolType boolTy = cir::BoolType::get(b.getContext()); -co

[clang] [CIR][NFC] Simplify BoolAttr builders (PR #136366)

2025-04-18 Thread Henrich Lauko via cfe-commits
@@ -692,9 +692,7 @@ mlir::LogicalResult CIRToLLVMConstantOpLowering::matchAndRewrite( // during a pass as long as they don't live past the end of the pass. attr = op.getValue(); } else if (mlir::isa(op.getType())) { -int value = (op.getValue() == -

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-18 Thread Anutosh Bhat via cfe-commits
@@ -451,13 +451,44 @@ const char *const Runtimes = R"( )"; llvm::Expected> -Interpreter::create(std::unique_ptr CI) { +Interpreter::create(std::unique_ptr CI, +std::unique_ptr DeviceCI) { llvm::Error Err = llvm::Error::success(); auto Interp =

[clang] [CIR][NFC] Simplify BoolAttr builders (PR #136366)

2025-04-18 Thread Henrich Lauko via cfe-commits
@@ -692,9 +692,7 @@ mlir::LogicalResult CIRToLLVMConstantOpLowering::matchAndRewrite( // during a pass as long as they don't live past the end of the pass. attr = op.getValue(); } else if (mlir::isa(op.getType())) { -int value = (op.getValue() == -

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-18 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/136404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Control analysis-based diagnostics with #pragma (PR #136323)

2025-04-18 Thread Erich Keane via cfe-commits
@@ -202,6 +202,43 @@ class SemaPPCallbacks : public PPCallbacks { break; } } + void PragmaDiagnostic(SourceLocation Loc, StringRef Namespace, +diag::Severity Mapping, StringRef Str) override { +// If one of the analysis-based diagnostics

[clang] [clang][Driver] Support passing arbitrary args to `-cc1as` with `-Xclangas`. (PR #100714)

2025-04-18 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,6 @@ +/// Check that -Xclangas/-Xclangas= are passed to -cc1as. +// RUN: %clang -### -Xclangas -target-feature -Xclangas=+v5t %s 2>&1 | \ +// RUN: FileCheck -check-prefix=ARGS %s +// ARGS: -cc1as +// ARGS: -target-feature MaskRay wrote: Use `-SAME:`

[clang] [clang][Driver] Support passing arbitrary args to `-cc1as` with `-Xclangas`. (PR #100714)

2025-04-18 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,6 @@ +/// Check that -Xclangas/-Xclangas= are passed to -cc1as. +// RUN: %clang -### -Xclangas -target-feature -Xclangas=+v5t %s 2>&1 | \ MaskRay wrote: Also add a `-Werror` to test `Arg->claim();`. I haven't tested, but without `Arg->claim();` there

[clang] [clang][Driver] Support passing arbitrary args to `-cc1as` with `-Xclangas`. (PR #100714)

2025-04-18 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,6 @@ +/// Check that -Xclangas/-Xclangas= are passed to -cc1as. +// RUN: %clang -### -Xclangas -target-feature -Xclangas=+v5t %s 2>&1 | \ +// RUN: FileCheck -check-prefix=ARGS %s MaskRay wrote: unnecessary to use a custom check prefix. Just omit it a

[clang] Control analysis-based diagnostics with #pragma (PR #136323)

2025-04-18 Thread Artem Dergachev via cfe-commits
haoNoQ wrote: > The current patch actually WILL work with it ONLY enabled on the line inside > of the function, which I think is much more intuitive. Ooo whoa this is awesome!! https://github.com/llvm/llvm-project/pull/136323 ___ cfe-commits mailing

[clang] [llvm] [OpenACC] Switch Clang to use the Flang 'appertainment' rules for cla… (PR #135372)

2025-04-18 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/135372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Fuchsia] Disable PIC (PR #136376)

2025-04-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Petr Hosek (petrhosek) Changes We aren't distributing any shared libraries so we don't need PIC and using PIE instead of PIC can improve performance. --- Full diff: https://github.com/llvm/llvm-project/pull/136376.diff 1 Files Affected:

[clang] [Fuchsia] Disable PIC (PR #136376)

2025-04-18 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/136376 We aren't distributing any shared libraries so we don't need PIC and using PIE instead of PIC can improve performance. >From 55816661f262410862b91e8e54e2f2d947af11fb Mon Sep 17 00:00:00 2001 From: Petr Hosek

[clang] [llvm] [OpenACC] Switch Clang to use the Flang 'appertainment' rules for cla… (PR #135372)

2025-04-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `libc-x86_64-debian-dbg-bootstrap-build` running on `libc-x86_64-debian` while building `clang,llvm` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/200/builds/7666 Here is the r

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-04-18 Thread Dan Liew via cfe-commits
delcypher wrote: I had to tweak some minor issues with the diagnostic text that I discovered when trying to cherry pick this into our fork. I've fixed them and I'm going to land this now. https://github.com/llvm/llvm-project/pull/106321 ___ cfe-commi

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-04-18 Thread Dan Liew via cfe-commits
https://github.com/delcypher closed https://github.com/llvm/llvm-project/pull/106321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenACC] Switch Clang to use the Flang 'appertainment' rules for cla… (PR #135372)

2025-04-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-remote-linux-win` running on `as-builder-10` while building `clang,llvm` at step 13 "build-lldb-server-aarch64-lldb". Full details are available at: https://lab.llvm.org/buildbot/#/builders/197/builds/4212 Here is the

[clang] [Clang] disallow use of attributes before extern template declarations (PR #136328)

2025-04-18 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/136328 >From 0729ae4d4a971905aefc8f1c1ec2ec81a0f149e9 Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Fri, 18 Apr 2025 20:09:56 +0300 Subject: [PATCH 1/2] [Clang] disallow use of attributes before extern tem

[clang] [clang][driver] Suppress gnu-line-marker when saving temps (PR #134621)

2025-04-18 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -std=c99 -fsyntax-only -pedantic %s 2>&1 | grep 'warning: this style of line directive is a GNU extension' MaskRay wrote: We prefer `FileCheck` to `grep`. FileCheck enables testing the line number, e.g. ``` // CHECK: [[#@LINE

[clang] [HLSL] Make it possible to assign an array from a cbuffer (PR #134174)

2025-04-18 Thread Sarah Spall via cfe-commits
@@ -2268,17 +2268,15 @@ static bool IsStandardConversion(Sema &S, Expr* From, QualType ToType, // handling here. if (ToType->isArrayParameterType()) { FromType = S.Context.getArrayParameterType(FromType); - SCS.First = ICK_HLSL_Array_RValue; } else if (

[clang] [clang][Driver] Support passing arbitrary args to `-cc1as` with `-Xclangas`. (PR #100714)

2025-04-18 Thread Alex Rønne Petersen via cfe-commits
@@ -0,0 +1,6 @@ +/// Check that -Xclangas/-Xclangas= are passed to -cc1as. +// RUN: %clang -### -Xclangas -target-feature -Xclangas=+v5t %s 2>&1 | \ alexrp wrote: Tested locally and you're right! https://github.com/llvm/llvm-project/pull/100714 _

[clang] [Clang] Add support for GCC bound member functions extension (PR #135649)

2025-04-18 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: I am going to chime in, in support of both Aaron's and Erich's position here. This does not seem like an extension we want to support. So given the objections, we need at minimum an RFC and see how that goes. Maybe during that discussion a more compelling c

[clang] [HLSL] Make it possible to assign an array from a cbuffer (PR #134174)

2025-04-18 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/134174 >From 5d81a4b7b034dd5999feb6ab37537270d6bae2a8 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Wed, 2 Apr 2025 12:04:18 -0700 Subject: [PATCH 1/2] compare unqualified canonical types and add an hlsl array rvalue

[clang] [CIR] Introduce type aliases for records (PR #136387)

2025-04-18 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Seems reasonable to me, but not the best one to review this. I question stealing `ty` as the prefix to this instead of `rt` (or something more specific to records), but I'm not sure I feel particularly strongly. Just it seems that `t

[clang] [CIR][NFC] Simplify BoolAttr builders (PR #136366)

2025-04-18 Thread Andy Kaylor via cfe-commits
@@ -456,9 +456,7 @@ mlir::LogicalResult CIRGenFunction::emitForStmt(const ForStmt &s) { // scalar type. condVal = evaluateExprAsBool(s.getCond()); } else { -cir::BoolType boolTy = cir::BoolType::get(b.getContext()); -co

[clang] [CIR][NFC] Simplify BoolAttr builders (PR #136366)

2025-04-18 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This looks good. Thanks for the improvements! I just have a couple of questions. https://github.com/llvm/llvm-project/pull/136366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [CIR][NFC] Simplify BoolAttr builders (PR #136366)

2025-04-18 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/136366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Simplify BoolAttr builders (PR #136366)

2025-04-18 Thread Andy Kaylor via cfe-commits
@@ -692,9 +692,7 @@ mlir::LogicalResult CIRToLLVMConstantOpLowering::matchAndRewrite( // during a pass as long as they don't live past the end of the pass. attr = op.getValue(); } else if (mlir::isa(op.getType())) { -int value = (op.getValue() == -

[clang] [CIR] Upstream support for accessing structure members (PR #136383)

2025-04-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This adds ClangIR support for accessing structure members. Access to union members is deferred to a later change. --- Patch is 32.62 KiB, truncated to 20.00 KiB below, full version: https://github.com/ll

[clang] [CIR] Upstream support for accessing structure members (PR #136383)

2025-04-18 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/136383 This adds ClangIR support for accessing structure members. Access to union members is deferred to a later change. >From 17800eddb70a74cf3966d64ab7bc5ad5508f8bb0 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Da

[clang] [clang][Driver] Support passing arbitrary args to `-cc1as` with `-Xclangas`. (PR #100714)

2025-04-18 Thread Alex Rønne Petersen via cfe-commits
https://github.com/alexrp updated https://github.com/llvm/llvm-project/pull/100714 From d98b9b4ab5b2d181b76d23b48eb2e93c0bc8afc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Fri, 26 Jul 2024 09:40:42 +0200 Subject: [PATCH] [clang][Driver] Support passing arbitra

[clang] [llvm] [ARM] Save floating point registers and status registers with save_fp function attribute (PR #89654)

2025-04-18 Thread Benson Chu via cfe-commits
pestctrl wrote: @efriedma-quic No, I will push this on Monday. Thank you! https://github.com/llvm/llvm-project/pull/89654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0c0b5ab - [clang-format] Handle spaces in filename paths in clang-format-diff.py (#135779)

2025-04-18 Thread via cfe-commits
Author: Selim Keles Date: 2025-04-18T19:42:22-07:00 New Revision: 0c0b5abff7ebedde53ccb84a04dadb00b9b91f2b URL: https://github.com/llvm/llvm-project/commit/0c0b5abff7ebedde53ccb84a04dadb00b9b91f2b DIFF: https://github.com/llvm/llvm-project/commit/0c0b5abff7ebedde53ccb84a04dadb00b9b91f2b.diff L

[clang] Fix filename parsing in clang-format-diff.py for paths with spaces (PR #135779)

2025-04-18 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/135779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Use llvm::less_second (NFC) (PR #136396)

2025-04-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/136396.diff 1 Files Affected: - (modified) clang-tools-extra/clang-tidy/modernize/UseStdNumbersCheck.cpp (+1-3) ``diff diff

[clang-tools-extra] [clang-tidy] Use llvm::less_second (NFC) (PR #136396)

2025-04-18 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/136396 None >From c3f948665677851851abedfbb6cf11fe88fa4334 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 18 Apr 2025 10:09:47 -0700 Subject: [PATCH] [clang-tidy] Use llvm::less_second (NFC) --- clang-

<    1   2   3   4   5   6   >