[clang] [clang][bytecode] Implement __noop (PR #106714)

2024-08-30 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/106714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode][NFC] Check for custom typechecking in call cleanup (PR #106826)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/106826 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e4cf0a0 - [clang][bytecode][NFC] Check for custom typechecking in call cleanup (#106826)

2024-08-30 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-31T08:06:06+02:00 New Revision: e4cf0a047d30fcd6cf606af0764883ca896a5153 URL: https://github.com/llvm/llvm-project/commit/e4cf0a047d30fcd6cf606af0764883ca896a5153 DIFF: https://github.com/llvm/llvm-project/commit/e4cf0a047d30fcd6cf606af0764883ca896a5153.diff L

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-08-30 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @DavidTruby @DavidSpickett A fix for this issue is up at https://github.com/llvm/llvm-project/pull/106829 https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang] function template non-call partial ordering fixes (PR #106829)

2024-08-30 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: FYI @DavidTruby @DavidSpickett https://github.com/llvm/llvm-project/pull/106829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] function template non-call partial ordering fixes (PR #106829)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This applies to function template non-call partial ordering the same provisional wording change applied in the call context: Don't perform the consistency check on return type and parameters which didn't

[clang] [clang] function template non-call partial ordering fixes (PR #106829)

2024-08-30 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/106829 This applies to function template non-call partial ordering the same provisional wording change applied in the call context: Don't perform the consistency check on return type and parameters which didn't have

[clang] [clang][bytecode][NFC] Check for custom typechecking in call cleanup (PR #106826)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes The comment already explains that this is only true for _some_ builtin functions. This also brings the time it takes me to run the builtin-functions.cpp test locally from 50s down to 47s. --- Full diff: htt

[clang] [clang][bytecode][NFC] Check for custom typechecking in call cleanup (PR #106826)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/106826 The comment already explains that this is only true for _some_ builtin functions. This also brings the time it takes me to run the builtin-functions.cpp test locally from 50s down to 47s. >From e38266cd0fa28e

[clang] [clang][bytecode][NFC] Implement MemberPointer::toDiagnosticString() (PR #106825)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/106825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6f81c87 - [clang][bytecode][NFC] Implement MemberPointer::toDiagnosticString() (#106825)

2024-08-30 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-31T07:26:02+02:00 New Revision: 6f81c878ecd40acf1a0364e0ea5c9e6ea87407a2 URL: https://github.com/llvm/llvm-project/commit/6f81c878ecd40acf1a0364e0ea5c9e6ea87407a2 DIFF: https://github.com/llvm/llvm-project/commit/6f81c878ecd40acf1a0364e0ea5c9e6ea87407a2.diff L

[clang] [clang][bytecode] Diagnose comparisons with literals (PR #106734)

2024-08-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot2` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/3304 Here is the relevant piece of the b

[clang] [clang][bytecode][NFC] Implement MemberPointer::toDiagnosticString() (PR #106825)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/106825 >From fd47ce2d92865a5c9e5307478a10dd2c8b91ac44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 31 Aug 2024 02:56:46 +0200 Subject: [PATCH] [clang][bytecode][NFC] Implement MemberPointer

[clang] [clang][bytecode][NFC] Implement MemberPointer::toDiagnosticString() (PR #106825)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/106825.diff 3 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.h (+2-2) - (modified) clang/lib/AST/ByteCode/MemberPointer.h (+6-6) - (m

[clang] [clang][bytecode][NFC] Implement MemberPointer::toDiagnosticString() (PR #106825)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/106825 None >From 7d3a2ba57c5eefe47c2ccc57584881efdef41262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 31 Aug 2024 02:56:46 +0200 Subject: [PATCH] [clang][bytecode][NFC] Implement MemberP

[clang] [clang-format] Correctly annotate braces in macro definition (PR #106662)

2024-08-30 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/106662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Diagnose comparisons with literals (PR #106734)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/106734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 360e4ab - [clang][bytecode] Diagnose comparisons with literals (#106734)

2024-08-30 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-31T06:24:36+02:00 New Revision: 360e4abfc8c7298283041e8f5a07f1829a888d18 URL: https://github.com/llvm/llvm-project/commit/360e4abfc8c7298283041e8f5a07f1829a888d18 DIFF: https://github.com/llvm/llvm-project/commit/360e4abfc8c7298283041e8f5a07f1829a888d18.diff L

[clang-tools-extra] [clangd] Update TidyFastChecks for release/19.x (PR #106354)

2024-08-30 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. https://github.com/llvm/llvm-project/pull/106354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix crash in code with StmtExpr and atomic char load in Expr::EvaluateAsRValue. (PR #106751)

2024-08-30 Thread via cfe-commits
c8ef wrote: I'm curious about why Clang emits atomic-to-non-atomic and non-atomic-to-atomic conversions when the type of the expression is atomic and the input is also atomic. (I'm not very familiar with C++ expression rules, so I may have missed something in the standards.) https://github.c

[clang] [clang] Fix crash in code with StmtExpr and atomic char load in Expr::EvaluateAsRValue. (PR #106751)

2024-08-30 Thread Timm Baeder via cfe-commits
tbaederr wrote: Of course not! The reason that `AtomicToNonAtomic` is handled but `NonAtomicToAtomic` isn't, is that this is in `IntExprEvaluator`, meaning the result must be a (non-atomic) integer. If it was atomic, it'd be in `AtomicExprEvaluator`. This AST for the LHS of the binary operato

[clang] [clang][bytecode] Diagnose comparisons with literals (PR #106734)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/106734 >From af84a7c4effc0372386b598bf323783d0e7fd132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 30 Aug 2024 15:51:17 +0200 Subject: [PATCH] [clang][bytecode] Diagnose comparisons with lit

[clang-tools-extra] [clang-tidy] Add type annotations to add_new_check.py, fix minor bug (PR #106801)

2024-08-30 Thread Nicolas van Kempen via cfe-commits
@@ -324,9 +329,14 @@ def add_release_notes(module_path, module, check_name, description): # Adds a test for the check. -def write_test(module_path, module, check_name, test_extension, test_standard): -if test_standard: -test_standard = f"-std={test_standard}-or-l

[clang-tools-extra] [clang-tidy] Add type annotations to add_new_check.py, fix minor bug (PR #106801)

2024-08-30 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank edited https://github.com/llvm/llvm-project/pull/106801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add type annotations to add_new_check.py, fix minor bug (PR #106801)

2024-08-30 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/106801 >From 6d4241a1858a0c46ceedf3034191a606af2e3941 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Fri, 30 Aug 2024 23:18:37 -0400 Subject: [PATCH] [clang-tidy] Add type annotations to add_new_check.py, fix

[clang-tools-extra] [clang-tidy] Add type annotations to add_new_check.py, fix minor bug (PR #106801)

2024-08-30 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/106801 >From 6d4241a1858a0c46ceedf3034191a606af2e3941 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Fri, 30 Aug 2024 23:18:37 -0400 Subject: [PATCH] [clang-tidy] Add type annotations to add_new_check.py, fix

[clang] Deprecate -fheinous-gnu-extensions; introduce a new warning flag (PR #105821)

2024-08-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-x86_64-linux-abi-test` running on `sie-linux-worker2` while building `clang` at step 7 "abi-test-suite". Full details are available at: https://lab.llvm.org/buildbot/#/builders/8/builds/3716 Here is the relevant piece

[clang] [clang] Fix crash in code with StmtExpr and atomic char load in Expr::EvaluateAsRValue. (PR #106751)

2024-08-30 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: @tbaederr I am not confident this is the right approach. If we compare the non-statement-expression case: https://godbolt.org/z/vseWeh5jP We don't have the same issue as the original case: https://godbolt.org/z/Gh13WcMEz So I suspect there is something abo

[clang] Fix implicit conversion rank ordering (PR #106811)

2024-08-30 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/106811 >From 4abb34b1b21e666e20a9b3bad8af146d3bf322f0 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Fri, 30 Aug 2024 23:54:41 + Subject: [PATCH 1/2] Fix implicit conversion rank ordering DXC prefers dimen

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-08-30 Thread Damyan Pepper via cfe-commits
@@ -722,7 +722,8 @@ static void ValidateMultipleRegisterAnnotations(Sema &S, Decl *TheDecl, } static void DiagnoseHLSLRegisterAttribute(Sema &S, SourceLocation &ArgLoc, - Decl *TheDecl, RegisterType regType) { +

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-08-30 Thread Damyan Pepper via cfe-commits
@@ -795,6 +796,9 @@ static void DiagnoseHLSLRegisterAttribute(Sema &S, SourceLocation &ArgLoc, S.Diag(ArgLoc, diag::warn_hlsl_deprecated_register_type_b); else if (regType != RegisterType::C) S.Diag(ArgLoc, diag::err_hlsl_binding_type_mismatch) << regType

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-08-30 Thread Damyan Pepper via cfe-commits
@@ -817,8 +821,12 @@ static void DiagnoseHLSLRegisterAttribute(Sema &S, SourceLocation &ArgLoc, S.Diag(TheDecl->getLocation(), diag::warn_hlsl_user_defined_type_missing_member) << regTypeNum; - -return; +// Space argument cannot be specifie

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-08-30 Thread Damyan Pepper via cfe-commits
@@ -722,7 +722,8 @@ static void ValidateMultipleRegisterAnnotations(Sema &S, Decl *TheDecl, } static void DiagnoseHLSLRegisterAttribute(Sema &S, SourceLocation &ArgLoc, - Decl *TheDecl, RegisterType regType) { +

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-08-30 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp requested changes to this pull request. https://github.com/llvm/llvm-project/pull/106782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Chore] Fix `formating` typos. NFC. (PR #106817)

2024-08-30 Thread via cfe-commits
c8ef wrote: ```   | # \| /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-c4bpt-1/llvm-project/github-pull-requests/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp:25:64: error: declaration of 'uint64_t' must be imported from module 'std_cstdint' before it is required

[clang] [clang-format] Correctly annotate braces in ObjC square brackets (PR #106654)

2024-08-30 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#106819 https://github.com/llvm/llvm-project/pull/106654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate braces in ObjC square brackets (PR #106654)

2024-08-30 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick e0f2368cdeb7312973a92fb2d22199d1de540db8 https://github.com/llvm/llvm-project/pull/106654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate braces in ObjC square brackets (PR #106654)

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

[clang] e0f2368 - [clang-format] Correctly annotate braces in ObjC square brackets (#106654)

2024-08-30 Thread via cfe-commits
Author: Owen Pan Date: 2024-08-30T19:23:45-07:00 New Revision: e0f2368cdeb7312973a92fb2d22199d1de540db8 URL: https://github.com/llvm/llvm-project/commit/e0f2368cdeb7312973a92fb2d22199d1de540db8 DIFF: https://github.com/llvm/llvm-project/commit/e0f2368cdeb7312973a92fb2d22199d1de540db8.diff LOG:

[clang] [RISCV][NFC] Reimplementation of target attribute override mechanism (PR #106680)

2024-08-30 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/106680 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Chore] Fix `formating` typos. NFC. (PR #106817)

2024-08-30 Thread via cfe-commits
https://github.com/c8ef edited https://github.com/llvm/llvm-project/pull/106817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix crash in code with StmtExpr and atomic char load in Expr::EvaluateAsRValue. (PR #106751)

2024-08-30 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/106751 >From 6ce4604725d36afaea17cf533d422a978c4389ff Mon Sep 17 00:00:00 2001 From: c8ef Date: Fri, 30 Aug 2024 15:34:34 + Subject: [PATCH] fix cast --- clang/lib/AST/ExprConstant.cpp | 2 +- clang/test/AST/atomic-

[clang] [clang] Fix crash in code with StmtExpr and atomic char load in Expr::EvaluateAsRValue. (PR #106751)

2024-08-30 Thread via cfe-commits
c8ef wrote: The libc++ test also appears to be unrelated. https://github.com/llvm/llvm-project/pull/106751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-30 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. Thanks, LGTM. https://github.com/llvm/llvm-project/pull/101083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-30 Thread Xiang Li via cfe-commits
https://github.com/python3kgae updated https://github.com/llvm/llvm-project/pull/101240 >From 65b4ab94bc533c8dee9733761947671a4d326e90 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Tue, 30 Jul 2024 16:34:40 -0400 Subject: [PATCH 1/7] [HLSL] AST support for WaveSize attribute. First step for su

[clang] fix kcfi doesn't take effect when callee function has no input parameter (PR #106677)

2024-08-30 Thread Fangrui Song via cfe-commits
MaskRay wrote: > If a function is declared without a prototype (pre-C23), it doesn't mean it > has a void argument list; it means the argument list is undeclared. So you > can't just assume the argument list is void; you have to compute the argument > types from the actual arguments passed to

[clang] [llvm] [Chore] Fix `formating` typos. (PR #106817)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: None (c8ef) Changes Fixes #106761. --- Full diff: https://github.com/llvm/llvm-project/pull/106817.diff 4 Files Affected: - (modified) clang/lib/Tooling/Refactoring/AtomicChange.cpp (+4-4) - (modified) clang/tools/clang-format/C

[clang] [llvm] [Chore] Fix `formating` typos. (PR #106817)

2024-08-30 Thread via cfe-commits
https://github.com/c8ef created https://github.com/llvm/llvm-project/pull/106817 Fixes #106761. >From dc9e84136e33c6ab35b1263382b740ff9a9dcd68 Mon Sep 17 00:00:00 2001 From: c8ef Date: Sat, 31 Aug 2024 09:30:49 +0800 Subject: [PATCH] fix formating typo --- clang/lib/Tooling/Refactoring/Atomic

[clang] Fix implicit conversion rank ordering (PR #106811)

2024-08-30 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/106811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MC] Emit a jump table size section (PR #101962)

2024-08-30 Thread Saleem Abdulrasool via cfe-commits
@@ -2764,10 +2771,59 @@ void AsmPrinter::emitJumpTableInfo() { for (const MachineBasicBlock *MBB : JTBBs) emitJumpTableEntry(MJTI, MBB, JTI); } + + if (EmitJumpTableSizesSection) +emitJumpTableSizesSection(MJTI, F); + if (!JTInDiffSection) OutStreamer->

[clang] [llvm] [MC] Emit a jump table size section (PR #101962)

2024-08-30 Thread Saleem Abdulrasool via cfe-commits
@@ -2764,10 +2771,59 @@ void AsmPrinter::emitJumpTableInfo() { for (const MachineBasicBlock *MBB : JTBBs) emitJumpTableEntry(MJTI, MBB, JTI); } + + if (EmitJumpTableSizesSection) +emitJumpTableSizesSection(MJTI, F); + if (!JTInDiffSection) OutStreamer->

[clang] [clang][bytecode] Diagnose comparisons with literals (PR #106734)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/106734 >From 0786e92abfceb279ad79b3da3c33b3c645aa8754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 30 Aug 2024 15:51:17 +0200 Subject: [PATCH] [clang][bytecode] Diagnose comparisons with lit

[clang] [clang][bytecode] Diagnose comparisons with literals (PR #106734)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/106734 >From bbf8b0f42845ada6ddb3935d975b06f9044b3c10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 30 Aug 2024 15:51:17 +0200 Subject: [PATCH] [clang][bytecode] Diagnose comparisons with lit

[clang] [clang] Fix crash in code with StmtExpr and atomic char load in Expr::EvaluateAsRValue. (PR #106751)

2024-08-30 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/106751 >From 6ce4604725d36afaea17cf533d422a978c4389ff Mon Sep 17 00:00:00 2001 From: c8ef Date: Fri, 30 Aug 2024 15:34:34 + Subject: [PATCH] fix cast --- clang/lib/AST/ExprConstant.cpp | 2 +- clang/test/AST/atomic-

[clang] [clang] Fix crash in code with StmtExpr and atomic char load in Expr::EvaluateAsRValue. (PR #106751)

2024-08-30 Thread via cfe-commits
c8ef wrote: I'm not sure why the `ELF/avr-reloc.s` test failed. I will attempt to update the branch. https://github.com/llvm/llvm-project/pull/106751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] Fix implicit conversion rank ordering (PR #106811)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris B (llvm-beanz) Changes DXC prefers dimension-preserving conversions over precision-losing conversions. This means a double4 -> float4 conversion is preferred over a double4 -> double3 or double4 -> double conversion. --- Full diff:

[clang] Fix implicit conversion rank ordering (PR #106811)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Chris B (llvm-beanz) Changes DXC prefers dimension-preserving conversions over precision-losing conversions. This means a double4 -> float4 conversion is preferred over a double4 -> double3 or double4 -> double conversion. --- Full diff:

[clang] Fix implicit conversion rank ordering (PR #106811)

2024-08-30 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/106811 DXC prefers dimension-preserving conversions over precision-losing conversions. This means a double4 -> float4 conversion is preferred over a double4 -> double3 or double4 -> double conversion. >From 4abb34

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-08-30 Thread Aaron Puchert via cfe-commits
@@ -3978,7 +3978,9 @@ def warn_acquired_before : Warning< def warn_acquired_before_after_cycle : Warning< "cycle in acquired_before/after dependencies, starting with '%0'">, InGroup, DefaultIgnore; - +def warn_attribute_mismatch : Warning< + "attribute mismatch between fun

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-08-30 Thread Aaron Puchert via cfe-commits
@@ -2260,6 +2260,37 @@ static bool neverReturns(const CFGBlock *B) { return false; } +template +static SmallVector collectAttrArgs(const FunctionDecl *FD) { + SmallVector Args; + for (const AttrT *A : FD->specific_attrs()) { +for (const Expr *E : A->args()) + Arg

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-08-30 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/67520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-08-30 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert commented: This probably fits better in `Sema/SemaDeclAttr.cpp`. Maybe `checkLockFunAttrCommon` is a good place. Add a test to `clang/test/Sema/attr-capabilities.c{,pp}`. https://github.com/llvm/llvm-project/pull/67520 __

[clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] [polly] [NFC] Add explicit #include llvm-config.h where its macros are used. (PR #106810)

2024-08-30 Thread Daniil Fukalov via cfe-commits
https://github.com/dfukalov created https://github.com/llvm/llvm-project/pull/106810 This is the second part. Without these explicit includes, removing other headers, who implicitly include llvm-config.h, may have non-trivial side effects. For example, `clagd` may report even `llvm-config.h`

[clang] [clang][bytecode] Implement __noop (PR #106714)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/106714 >From b04dc6d69039eeabe177cc5d109970734e0c29ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 30 Aug 2024 13:45:37 +0200 Subject: [PATCH] [clang][bytecode] Implement __noop This does n

[clang] [clang][bytecode][NFC] Cache the BuiltinID in Function (PR #106745)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/106745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3745a2e - [clang][bytecode][NFC] Cache the BuiltinID in Function (#106745)

2024-08-30 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-31T01:50:59+02:00 New Revision: 3745a2e8ab10029f8f401f5ff3c3c76c12e94822 URL: https://github.com/llvm/llvm-project/commit/3745a2e8ab10029f8f401f5ff3c3c76c12e94822 DIFF: https://github.com/llvm/llvm-project/commit/3745a2e8ab10029f8f401f5ff3c3c76c12e94822.diff L

[clang] [clang][bytecode] Implement __noop (PR #106714)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/106714 >From 0423c99a3b539e20c807ae4a773521a5ad5063c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 30 Aug 2024 13:45:37 +0200 Subject: [PATCH] [clang][bytecode] Implement __noop This does n

[clang] [clang][bytecode] Diagnose comparisons with literals (PR #106734)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/106734 >From 099ae16b3e41392f8fde9d4c92b4af48486bd027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 30 Aug 2024 15:51:17 +0200 Subject: [PATCH] [clang][bytecode] Diagnose comparisons with lit

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-08-30 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: > Maybe I misunderstood the code of this PR, but I thought it only checks > definitions. That's my understanding as well. I was just thinking about the usual requirement of putting the attribute on the first declaration (like the standard mandates it for `[[noreturn]]`). U

[clang] [llvm] [LLVM] Add IRNormalizer Pass (PR #68176)

2024-08-30 Thread Puyan Lotfi via cfe-commits
plotfi wrote: @justinfargnoli Is there anything I can do to help with moving this forward, what seems to be the blocker on this at this point (asking to re-attain context)? https://github.com/llvm/llvm-project/pull/68176 ___ cfe-commits mailing list

[clang] [llvm] [LTO] Reduce memory usage for import lists (PR #106772)

2024-08-30 Thread Kazu Hirata via cfe-commits
@@ -1827,15 +1831,13 @@ Expected FunctionImporter::importFunctions( if (Error Err = SrcModule->materializeMetadata()) return std::move(Err); -auto &ImportGUIDs = FunctionsToImportPerModule->second; - // Find the globals to import SetVector GlobalsToImpo

[clang] [llvm] [LTO] Reduce memory usage for import lists (PR #106772)

2024-08-30 Thread Kazu Hirata via cfe-commits
@@ -215,13 +215,49 @@ class FunctionImporter { SmallVector getSourceModules() const; std::optional -getImportType(const FunctionsToImportTy &GUIDToImportType, - GlobalValue::GUID GUID) const; +getImportType(StringRef FromModule, GlobalValue::GU

[clang] [llvm] [LTO] Reduce memory usage for import lists (PR #106772)

2024-08-30 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/106772 >From 2013008e1e0cf7df73b735d1ecfaf927b49542fd Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 29 Aug 2024 09:44:16 -0700 Subject: [PATCH 1/2] [LTO] Reduce memory usage for import lists This patch

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-08-30 Thread via cfe-commits
yabinc wrote: > It probably makes sense to add a helper like the following to CodeGenModule > or something like that: > > ``` > bool shouldZeroInitPadding() { > // Comment explaining reasoning for this rule > return !CGM.getLangOpts().CPlusPlus; > } > ``` > > So we don't have `// See c

[clang] [libc] [libc] Use correct names for locale variants in spec.td (PR #106806)

2024-08-30 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek closed https://github.com/llvm/llvm-project/pull/106806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8b77aa9 - [libc] Use correct names for locale variants in spec.td (#106806)

2024-08-30 Thread via cfe-commits
Author: Petr Hosek Date: 2024-08-30T15:13:23-07:00 New Revision: 8b77aa990b5f2f75ea7128a87bdbb8b905162e90 URL: https://github.com/llvm/llvm-project/commit/8b77aa990b5f2f75ea7128a87bdbb8b905162e90 DIFF: https://github.com/llvm/llvm-project/commit/8b77aa990b5f2f75ea7128a87bdbb8b905162e90.diff LO

[clang] [libc] [libc] Use correct names for locale variants in spec.td (PR #106806)

2024-08-30 Thread Michael Jones via cfe-commits
https://github.com/michaelrj-google approved this pull request. LGTM from libc side https://github.com/llvm/llvm-project/pull/106806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [libc] Use correct names for locale variants in spec.td (PR #106806)

2024-08-30 Thread via cfe-commits
https://github.com/Prabhuk approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/106806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-08-30 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/106782 >From 99408f31a8946df7ef9efa223d0dba2ab876fcd0 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 30 Aug 2024 12:08:37 -0700 Subject: [PATCH 1/3] add diag and testing for space and global constants ---

[clang] [llvm] [LTO] Reduce memory usage for import lists (PR #106772)

2024-08-30 Thread Mingming Liu via cfe-commits
@@ -215,13 +215,49 @@ class FunctionImporter { SmallVector getSourceModules() const; std::optional -getImportType(const FunctionsToImportTy &GUIDToImportType, - GlobalValue::GUID GUID) const; +getImportType(StringRef FromModule, GlobalValue::GU

[clang] [llvm] [LTO] Reduce memory usage for import lists (PR #106772)

2024-08-30 Thread Mingming Liu via cfe-commits
@@ -1827,15 +1831,13 @@ Expected FunctionImporter::importFunctions( if (Error Err = SrcModule->materializeMetadata()) return std::move(Err); -auto &ImportGUIDs = FunctionsToImportPerModule->second; - // Find the globals to import SetVector GlobalsToImpo

[clang] [libc] [libc] Use correct names for locale variants in spec.td (PR #106806)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libc Author: Petr Hosek (petrhosek) Changes This addresses issue introduced in #105718. --- Full diff: https://github.com/llvm/llvm-project/pull/106806.diff 2 Files Affected: - (modified) clang/cmake/caches/Fuchsia-stage2.cmake (+2-2) - (modified) l

[clang] [libc] [libc] Use correct names for locale variants in spec.td (PR #106806)

2024-08-30 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/106806 This addresses issue introduced in #105718. >From ef70fea3ffa9fc1787c4f8aa1fde591adda5fd6b Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Fri, 30 Aug 2024 14:57:29 -0700 Subject: [PATCH] [libc] Use correct n

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-30 Thread John McCall via cfe-commits
@@ -11427,6 +11427,19 @@ static void AnalyzeImplicitConversions( return; } + if (auto *OutArgE = dyn_cast(E)) { +// The base expression is only used to initialize the parameter for +// arguments to `inout` parameters, so we only traverse down the base +// ex

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-30 Thread John McCall via cfe-commits
@@ -5915,6 +5916,16 @@ bool Sema::GatherArgumentsForCall(SourceLocation CallLoc, FunctionDecl *FDecl, ProtoArgType->isBlockPointerType()) if (auto *BE = dyn_cast(Arg->IgnoreParenNoopCasts(Context))) BE->getBlockDecl()->setDoesNotEscape(); + //

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-30 Thread John McCall via cfe-commits
@@ -5432,6 +5434,57 @@ LValue CodeGenFunction::EmitOpaqueValueLValue(const OpaqueValueExpr *e) { return getOrCreateOpaqueLValueMapping(e); } +LValue CodeGenFunction::BindHLSLOutArgExpr(const HLSLOutArgExpr *E, + Address OutTemp) { +

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-30 Thread John McCall via cfe-commits
@@ -285,6 +285,13 @@ class CallArgList : public SmallVector { /// A value to "use" after the writeback, or null. llvm::Value *ToUse; + +/// An Expression representing a cast from the temporary's type to the +/// source l-value's type. +const Expr *CastExpr;

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-30 Thread John McCall via cfe-commits
@@ -7071,6 +7071,102 @@ class ArraySectionExpr : public Expr { void setRBracketLoc(SourceLocation L) { RBracketLoc = L; } }; +/// This class represents temporary values used to represent inout and out +/// arguments in HLSL. From the callee perspective these parameters are m

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-30 Thread John McCall via cfe-commits
@@ -7071,6 +7071,102 @@ class ArraySectionExpr : public Expr { void setRBracketLoc(SourceLocation L) { RBracketLoc = L; } }; +/// This class represents temporary values used to represent inout and out +/// arguments in HLSL. From the callee perspective these parameters are m

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-30 Thread John McCall via cfe-commits
@@ -7071,6 +7071,102 @@ class ArraySectionExpr : public Expr { void setRBracketLoc(SourceLocation L) { RBracketLoc = L; } }; +/// This class represents temporary values used to represent inout and out +/// arguments in HLSL. From the callee perspective these parameters are m

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-08-30 Thread via cfe-commits
https://github.com/yabinc updated https://github.com/llvm/llvm-project/pull/97121 >From d7e0361ed91032154aafee3cf2f9a7cdc233a395 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Thu, 27 Jun 2024 17:11:52 -0700 Subject: [PATCH 1/3] [clang][CodeGen] Zero init unspecified fields in initializers in

[clang-tools-extra] [NFC][clang-tidy] Add type annotations to add_new_check.py (PR #106801)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Nicolas van Kempen (nicovank) Changes ``` python3 -m mypy --strict clang-tools-extra/clang-tidy/add_new_check.py Success: no issues found in 1 source file ``` --- Full diff: https://github.com/llvm/llvm-project/pull/106801.diff 1

[clang-tools-extra] [NFC][clang-tidy] Add type annotations to add_new_check.py (PR #106801)

2024-08-30 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank created https://github.com/llvm/llvm-project/pull/106801 ``` python3 -m mypy --strict clang-tools-extra/clang-tidy/add_new_check.py Success: no issues found in 1 source file ``` >From 0213feed46b0cb7ba38410c26eba4d1d7226bd5b Mon Sep 17 00:00:00 2001 From: Nicolas v

[clang] [HLSL] Allow truncation to scalar (PR #104844)

2024-08-30 Thread Chris B via cfe-commits
@@ -143,19 +143,3 @@ float test_dot_float3(float3 p0, float3 p1) { return dot(p0, p1); } // CHECK: %dx.dot = call float @llvm.dx.dot4.v4f32(<4 x float> %0, <4 x float> %1) // CHECK: ret float %dx.dot float test_dot_float4(float4 p0, float4 p1) { return dot(p0, p1); } - -// CH

[clang] [HLSL][Doc] Document multi-argument resolution (PR #104474)

2024-08-30 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/104474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 02654f7 - [HLSL][Doc] Document multi-argument resolution (#104474)

2024-08-30 Thread via cfe-commits
Author: Chris B Date: 2024-08-30T16:18:46-05:00 New Revision: 02654f7370638889b989b4d776d35c3d47c87cdd URL: https://github.com/llvm/llvm-project/commit/02654f7370638889b989b4d776d35c3d47c87cdd DIFF: https://github.com/llvm/llvm-project/commit/02654f7370638889b989b4d776d35c3d47c87cdd.diff LOG:

[clang] [HLSL] Implement TransformHLSLAttributedResourceType (PR #106673)

2024-08-30 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/106673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement TransformHLSLAttributedResourceType (PR #106673)

2024-08-30 Thread Helena Kotas via cfe-commits
hekota wrote: > Is there some other way to slice this so that there's a smaller part of your > larger change that can actually be tested? The thing is that we are already using resource attributes in many places, and they all need to be updated when we switch to having the attributes on types

[clang] [llvm] [LTO] Reduce memory usage for import lists (PR #106772)

2024-08-30 Thread Kazu Hirata via cfe-commits
@@ -174,51 +174,33 @@ std::string llvm::computeLTOCacheKey( for (auto GUID : ExportsGUID) Hasher.update(ArrayRef((uint8_t *)&GUID, sizeof(GUID))); - // Include the hash for every module we import functions from. The set of - // imported symbols for each module may affe

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-30 Thread Helena Kotas via cfe-commits
@@ -480,6 +480,9 @@ struct RegisterBindingFlags { bool ContainsNumeric = false; bool DefaultGlobals = false; + + // used only when Resource == true + llvm::dxil::ResourceClass ResourceClass = llvm::dxil::ResourceClass::UAV; hekota wrote: Yes, the indivi

  1   2   3   4   5   >