[clang] [OpenMP][TR12] change property of map-type modifier. (PR #90499)

2024-04-30 Thread via cfe-commits
@@ -113,7 +114,7 @@ struct SA { #pragma omp target map(b[true:true]) {} -#pragma omp target map(: c,f) // expected-error {{missing map type}} +#pragma omp target map(: c,f) // lt60-error {{missing map type}} jyu2-git wrote: All those can be om

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-30 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Ping @AaronBallman https://github.com/llvm/llvm-project/pull/81642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-30 Thread Erich Keane via cfe-commits
erichkeane wrote: > Ping @AaronBallman Aaron is on vacation this week, is there feedback from him that you're looking for? https://github.com/llvm/llvm-project/pull/81642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [OpenMP][TR12] change property of map-type modifier. (PR #90499)

2024-04-30 Thread Alexey Bataev via cfe-commits
@@ -113,7 +114,7 @@ struct SA { #pragma omp target map(b[true:true]) {} -#pragma omp target map(: c,f) // expected-error {{missing map type}} +#pragma omp target map(: c,f) // lt60-error {{missing map type}} alexey-bataev wrote: Yes, if you ha

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-30 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: I'd like someone to review the AST matcher changes (the code owner listed in `CodeOwners.rst` appears to be inactive). https://github.com/llvm/llvm-project/pull/81642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Alexey Bataev via cfe-commits
@@ -134,6 +134,24 @@ OpenACCNumGangsClause *OpenACCNumGangsClause::Create(const ASTContext &C, return new (Mem) OpenACCNumGangsClause(BeginLoc, LParenLoc, IntExprs, EndLoc); } +OpenACCPrivateClause *OpenACCPrivateClause::Create(const ASTContext &C, +

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-04-30 Thread via cfe-commits
@@ -2690,6 +2690,13 @@ bool Parser::ParseModuleName( return true; } +// P3034R1: Module Declarations Shouldn’t be Macros +if (!IsImport && Tok.getLocation().isMacroID()) { + Diag(Tok, diag::err_module_decl_cannot_be_macros); + SkipUntil(tok::semi);

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-30 Thread Erich Keane via cfe-commits
erichkeane wrote: > I'd like someone to review the AST matcher changes (the code owner listed in > `CodeOwners.rst` appears to be inactive). Ah, yes! Unfortunately I think he's the best person to review, I don't know of anyone familiar enough with the matchers. But he'll be back next week.

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Alexey Bataev via cfe-commits
@@ -423,6 +450,52 @@ ExprResult SemaOpenACC::ActOnIntExpr(OpenACCDirectiveKind DK, return IntExpr; } +ExprResult SemaOpenACC::ActOnVar(Expr *VarExpr) { + // We still need to retain the array subscript/subarray exprs, so work on a + // copy. + Expr *CurVarExpr = VarExpr->

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/90521 >From 54ba7d0b7d71d751cf268c3bdfb89bc5ca628a6b Mon Sep 17 00:00:00 2001 From: erichkeane Date: Mon, 22 Apr 2024 13:31:52 -0700 Subject: [PATCH 1/3] [OpenACC] Private Clause on Compute Constructs The private c

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/90521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
@@ -134,6 +134,24 @@ OpenACCNumGangsClause *OpenACCNumGangsClause::Create(const ASTContext &C, return new (Mem) OpenACCNumGangsClause(BeginLoc, LParenLoc, IntExprs, EndLoc); } +OpenACCPrivateClause *OpenACCPrivateClause::Create(const ASTContext &C, +

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

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

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
@@ -423,6 +450,52 @@ ExprResult SemaOpenACC::ActOnIntExpr(OpenACCDirectiveKind DK, return IntExpr; } +ExprResult SemaOpenACC::ActOnVar(Expr *VarExpr) { + // We still need to retain the array subscript/subarray exprs, so work on a + // copy. + Expr *CurVarExpr = VarExpr->

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

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

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-04-30 Thread via cfe-commits
@@ -1671,6 +1671,8 @@ def err_unexpected_module_decl : Error< "module declaration can only appear at the top level">; def err_module_expected_ident : Error< "expected a module name after '%select{module|import}0'">; +def err_module_decl_cannot_be_macros : Error< + "module

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

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

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-04-30 Thread via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -std=c++20 -emit-module-interface %s -triple x86_64-linux-gnu -DTEST=1 -verify +// RUN: %clang_cc1 -std=c++20 -emit-module-interface %s -triple x86_64-linux-gnu -DTEST=2 -verify + +module; +export module x; +#include "version.h" +#if TEST ==

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-04-30 Thread via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -std=c++20 -emit-module-interface %s -triple x86_64-linux-gnu -DTEST=1 -verify +// RUN: %clang_cc1 -std=c++20 -emit-module-interface %s -triple x86_64-linux-gnu -DTEST=2 -verify + +module; +export module x; +#include "version.h" +#if TEST ==

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

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

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-04-30 Thread Paschalis Mpeis via cfe-commits
https://github.com/paschalis-mpeis updated https://github.com/llvm/llvm-project/pull/78432 >From d3ca209a7690d9ecbe188d8a2145177f43ed1951 Mon Sep 17 00:00:00 2001 From: Paschalis Mpeis Date: Tue, 16 Jan 2024 10:53:09 + Subject: [PATCH 1/7] LAA cannot vectorize lib calls like modf/modff Fun

[clang] [clang][dataflow] Don't propagate result objects in unevaluated contexts (PR #90438)

2024-04-30 Thread Gábor Horváth via cfe-commits
@@ -350,6 +350,13 @@ class ResultObjectVisitor : public RecursiveASTVisitor { return RecursiveASTVisitor::TraverseDecl(D); } + bool TraverseDecltypeTypeLoc(DecltypeTypeLoc Node) { Xazax-hun wrote: > It also turns out that, even though the operand of t

[clang] [clang][dataflow] Don't propagate result objects in unevaluated contexts (PR #90438)

2024-04-30 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/90438 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Alexey Bataev via cfe-commits
@@ -166,3 +176,9 @@ void OpenACCClausePrinter::VisitVectorLengthClause( const OpenACCVectorLengthClause &C) { OS << "vector_length(" << C.getIntExpr() << ")"; } + +void OpenACCClausePrinter::VisitPrivateClause(const OpenACCPrivateClause &C) { + OS << "private("; + llvm:

[clang] [clang][CodeGen] Propagate pragma set fast-math flags to floating point builtins (PR #90377)

2024-04-30 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam deleted https://github.com/llvm/llvm-project/pull/90377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Don't propagate result objects in unevaluated contexts (PR #90438)

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

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

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

[clang] [clang][CodeGen] Propagate pragma set fast-math flags to floating point builtins (PR #90377)

2024-04-30 Thread Zahira Ammarguellat via cfe-commits
@@ -0,0 +1,28 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4 +// RUN: %clang_cc1 -triple x86_64-linux-gnu -O3 -emit-llvm -o - %s \ +// RUN: | FileCheck -check-prefix=CHECK %s + +// Reproducer for issue #87758 +// The testca

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
@@ -166,3 +176,9 @@ void OpenACCClausePrinter::VisitVectorLengthClause( const OpenACCVectorLengthClause &C) { OS << "vector_length(" << C.getIntExpr() << ")"; } + +void OpenACCClausePrinter::VisitPrivateClause(const OpenACCPrivateClause &C) { + OS << "private("; + llvm:

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-04-30 Thread Florian Hahn via cfe-commits
@@ -0,0 +1,117 @@ +; RUN: opt < %s -mattr=+sve -vector-library=ArmPL -passes=inject-tli-mappings,loop-vectorize -debug-only=loop-accesses -disable-output 2>&1 | FileCheck %s + +; REQUIRES: asserts + +target triple = "aarch64-unknown-linux-gnu" + +; TODO: add mappings for frexp/f

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-04-30 Thread via cfe-commits
yronglin wrote: The paper does not clearly state whether disallow function-like macro is also needed, but I think disallow function-like macro has the same goal as the paper. WDYT? @cor3ntin @ChuanqiXu9 https://github.com/llvm/llvm-project/pull/90574 __

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-04-30 Thread Paschalis Mpeis via cfe-commits
https://github.com/paschalis-mpeis edited https://github.com/llvm/llvm-project/pull/78432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-04-30 Thread Paschalis Mpeis via cfe-commits
https://github.com/paschalis-mpeis edited https://github.com/llvm/llvm-project/pull/78432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Handle implicit casts in hicpp-signed-bitwise for IgnorePositiveIntegerLiterals (PR #90621)

2024-04-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/90621 Improved hicpp-signed-bitwise check by ignoring false positives involving positive integer literals behind implicit casts when IgnorePositiveIntegerLiterals is enabled. Closes #89367 >From b61a47b8c98adbdb0aa

[clang-tools-extra] [clang-tidy] Handle implicit casts in hicpp-signed-bitwise for IgnorePositiveIntegerLiterals (PR #90621)

2024-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Piotr Zegar (PiotrZSL) Changes Improved hicpp-signed-bitwise check by ignoring false positives involving positive integer literals behind implicit casts when IgnorePositiveIntegerLiterals is enabled. Closes #89367 --- Full diff: ht

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-04-30 Thread via cfe-commits
cor3ntin wrote: A function like macro needs parentheses to be substituted. As such, #define foo() module foo; Should be allowed (and foo is not a macro expansion on line 2) module foo(); should be Ill-formed. https://github.com/llvm/llvm-project/pull/90574

[clang] [analyzer] Removing untrusted buffer size taint warning (PR #68607)

2024-04-30 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/68607 >From 143db26ffe8620c2b45eb15d331466c883bbfce0 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Mon, 9 Oct 2023 16:52:13 +0200 Subject: [PATCH 1/5] [analyzer] Removing untrusted buffer size taint warning alpha.s

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-04-30 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > The paper does not clearly says whether disallow function-like macro is also > needed, but I think disallow function-like macro has the same goal as the > paper. WDYT? @cor3ntin @ChuanqiXu9 > > The wording in the paper said: _No identifier in the pp-module-name or > pp-mod

[clang] [analyzer] Removing untrusted buffer size taint warning (PR #68607)

2024-04-30 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 e50a857fb16bcfe7cfc99bf87db620bc82d1cff5 5d7c44a7e4b338f83f791ebc6ec3297d62983c0b --

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the Di

[clang] [analyzer] Removing untrusted buffer size taint warning (PR #68607)

2024-04-30 Thread Donát Nagy via cfe-commits
@@ -95,22 +94,23 @@ void testReadStdIn(){ } void multipleTaintSources(void) { - int x,y,z; - scanf("%d", &x); // expected-note {{Taint originated here}} + char cmd[2048], file[1024]; + scanf ("%1022[^\n] ", cmd); // expected-note {{Taint originated here}}

[clang] [analyzer] Removing untrusted buffer size taint warning (PR #68607)

2024-04-30 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/68607 From 143db26ffe8620c2b45eb15d331466c883bbfce0 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Mon, 9 Oct 2023 16:52:13 +0200 Subject: [PATCH 1/6] [analyzer] Removing untrusted buffer size taint warning alpha

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-04-30 Thread Paschalis Mpeis via cfe-commits
@@ -0,0 +1,117 @@ +; RUN: opt < %s -mattr=+sve -vector-library=ArmPL -passes=inject-tli-mappings,loop-vectorize -debug-only=loop-accesses -disable-output 2>&1 | FileCheck %s + +; REQUIRES: asserts + +target triple = "aarch64-unknown-linux-gnu" + +; TODO: add mappings for frexp/f

[clang] cc6113d - [OpenACC] Fix ast-print for OpenACC Clauses

2024-04-30 Thread via cfe-commits
Author: erichkeane Date: 2024-04-30T08:54:19-07:00 New Revision: cc6113da826e82f19762eb813e6d932fcef09593 URL: https://github.com/llvm/llvm-project/commit/cc6113da826e82f19762eb813e6d932fcef09593 DIFF: https://github.com/llvm/llvm-project/commit/cc6113da826e82f19762eb813e6d932fcef09593.diff LO

[clang] [clang-format] Fix a bug in annotating struct braces (PR #90555)

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

[clang] [analysis] assume expr is not mutated after analysis to avoid recursive (PR #90581)

2024-04-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/90581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

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

[clang] [analysis] assume expr is not mutated after analysis to avoid recursive (PR #90581)

2024-04-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/90581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coroutines][Test] Specify target triple in coro-elide-thinlto (PR #90549)

2024-04-30 Thread Wei Wang via cfe-commits
https://github.com/apolloww updated https://github.com/llvm/llvm-project/pull/90549 >From 1fac46855bf6bb3feb2e8b7a0918e61c8468ea07 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Mon, 29 Apr 2024 20:01:29 -0700 Subject: [PATCH] fix build failure --- clang/test/CodeGenCoroutines/coro-elide-thinl

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

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

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

2024-04-30 Thread via cfe-commits
luolent wrote: Hi @bulbazord , @lntue , thanks for your helpful comments, first time contributing here :) I have updated the PR. https://github.com/llvm/llvm-project/pull/90391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [llvm] [Clang][RISCV] Handle RVV tuple types correctly as InputOperand/OutputOperand for inline asm (PR #89883)

2024-04-30 Thread Craig Topper via cfe-commits
topperc wrote: This crashes in SelectionDAG. https://github.com/llvm/llvm-project/pull/89883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/90521 >From 54ba7d0b7d71d751cf268c3bdfb89bc5ca628a6b Mon Sep 17 00:00:00 2001 From: erichkeane Date: Mon, 22 Apr 2024 13:31:52 -0700 Subject: [PATCH 1/4] [OpenACC] Private Clause on Compute Constructs The private c

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
@@ -166,3 +176,9 @@ void OpenACCClausePrinter::VisitVectorLengthClause( const OpenACCVectorLengthClause &C) { OS << "vector_length(" << C.getIntExpr() << ")"; } + +void OpenACCClausePrinter::VisitPrivateClause(const OpenACCPrivateClause &C) { + OS << "private("; + llvm:

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/90521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Process include files changes with -fmodules-validate-input-files-content and -fno-pch-timestamp options (PR #90319)

2024-04-30 Thread Ben Langmuir via cfe-commits
@@ -0,0 +1,34 @@ +// UNSUPPORTED: system-windows +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: cd %t +// +// RUN: cp a1.h a.h +// RUN: %clang -fmodules -fmodules-validate-input-files-content -Xclang -fno-pch-timestamp -fimplicit-modules -fmodule-map-file=module.modulemap

[clang] [llvm] [z/OS] treat text files as text files so auto-conversion is done (PR #90128)

2024-04-30 Thread via cfe-commits
@@ -413,8 +413,9 @@ static bool format(StringRef FileName, bool ErrorOnIncompleteFormat = false) { // On Windows, overwriting a file with an open file mapping doesn't work, // so read the whole file into memory when formatting in-place. ErrorOr> CodeOrErr = - !Outpu

[clang] [llvm] [z/OS] treat text files as text files so auto-conversion is done (PR #90128)

2024-04-30 Thread via cfe-commits
https://github.com/mydeveloperday commented: We don't normally commit in clang-format with a unit test https://github.com/llvm/llvm-project/pull/90128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [llvm] [z/OS] treat text files as text files so auto-conversion is done (PR #90128)

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

[clang] [llvm] [z/OS] treat text files as text files so auto-conversion is done (PR #90128)

2024-04-30 Thread via cfe-commits
@@ -413,8 +413,9 @@ static bool format(StringRef FileName, bool ErrorOnIncompleteFormat = false) { // On Windows, overwriting a file with an open file mapping doesn't work, // so read the whole file into memory when formatting in-place. ErrorOr> CodeOrErr = - !Outpu

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the Di

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the Di

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-04-30 Thread via cfe-commits
yronglin wrote: > module foo(); should be Ill-formed. Ahh, so case like the following also should be ill-formed: ``` #define FUNC_LIKE(X) function_like_##X export module FUNC_LIKE(bar); ``` > we can get the module name of a TU by cat and grep This means that no macros of any kind can appear in

[clang] [clang-tools-extra] [analysis] assume expr is not mutated after analysis to avoid recursive (PR #90581)

2024-04-30 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90581 >From f0d640d4c1ba2ede182fdf31cc7030aad01de8b8 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 30 Apr 2024 17:46:37 +0800 Subject: [PATCH 1/2] [analysis] assume expr is not mutated after analysis to a

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the Di

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the Di

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-04-30 Thread via cfe-commits
cor3ntin wrote: > This means that no macros of any kind can appear in the module name. Exactly. This is why the grammar in the wording is defined in terms of `pp-token` and not `identifiers`: no macro expansion takes place at all. https://github.com/llvm/llvm-project/pull/90574 __

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

2024-04-30 Thread Jay Foad via cfe-commits
jayfoad wrote: AMDGPU changes are fine. https://github.com/llvm/llvm-project/pull/90391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the Di

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-30 Thread Mike Crowe via cfe-commits
@@ -0,0 +1,107 @@ +//===--- UseStdFormatCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-30 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe updated https://github.com/llvm/llvm-project/pull/90397 >From 0d6ede5d59cc70d803bfe2c7997737c1be358c75 Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Sun, 28 Apr 2024 12:41:46 +0100 Subject: [PATCH 1/9] [clang-tidy] Add modernize-use-std-format check Add a new cla

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-30 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe updated https://github.com/llvm/llvm-project/pull/90397 >From 0d6ede5d59cc70d803bfe2c7997737c1be358c75 Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Sun, 28 Apr 2024 12:41:46 +0100 Subject: [PATCH 01/10] [clang-tidy] Add modernize-use-std-format check Add a new c

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-30 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe updated https://github.com/llvm/llvm-project/pull/90397 >From 0d6ede5d59cc70d803bfe2c7997737c1be358c75 Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Sun, 28 Apr 2024 12:41:46 +0100 Subject: [PATCH 01/11] [clang-tidy] Add modernize-use-std-format check Add a new c

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-04-30 Thread via cfe-commits
yronglin wrote: > > This means that no macros of any kind can appear in the module name. > > Exactly. This is why the grammar in the wording is defined in terms of > `pp-token` and not `identifiers`: no macro expansion takes place at all. Thanks! Let's use `LexUnexpandedToken` during parsing m

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-04-30 Thread Paschalis Mpeis via cfe-commits
https://github.com/paschalis-mpeis edited https://github.com/llvm/llvm-project/pull/78432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Re-use existing BinaryOperator if possible (PR #90625)

2024-04-30 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/90625 First round of Sema checks were run at initial parsing step. Creating a new BinaryOperator instance (with the re-built LHS or RHS) will trigger another round of Sema checks, which can lead to duplicate diagnosti

[clang] [clang][Sema] Re-use existing BinaryOperator if possible (PR #90625)

2024-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Youngsuk Kim (JOE1994) Changes First round of Sema checks were run at initial parsing step. Creating a new BinaryOperator instance (with the re-built LHS or RHS) will trigger another round of Sema checks, which can lead to duplicate diagn

[clang] [clang][Sema] Re-use existing BinaryOperator if possible (PR #90625)

2024-04-30 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 97069a86193a617a9e4cf742a29db6116b2bf449 24eb4db70e296d6454bac4c84a5bbc47e638876f --

[clang] [Clang] Prevent null pointer dereference in Sema::​CodeCompleteQualifiedId() (PR #90490)

2024-04-30 Thread Tom Honermann via cfe-commits
tahonermann wrote: Adding Sam McCall as an additional reviewer since he originally authored this code in commit a76e68c9704fb5b3faf25bb8d51e405b5310ff08. https://github.com/llvm/llvm-project/pull/90490 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [Clang] Prevent null pointer dereference in Sema::​CodeCompleteQualifiedId() (PR #90490)

2024-04-30 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann approved this pull request. The change looks good to me. I recommend giving @sam-mccall a day or so to comment if he wants to. https://github.com/llvm/llvm-project/pull/90490 ___ cfe-commits mailing list cfe-commits@list

[clang] [Clang] Prevent null pointer dereference in Sema::​CodeCompleteQualifiedId() (PR #90490)

2024-04-30 Thread via cfe-commits
smanna12 wrote: Thanks @tahonermann for reviews! https://github.com/llvm/llvm-project/pull/90490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenCL] Put constant initializer globals into constant addrspace (PR #90048)

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

[clang] [clang-tools-extra] [analysis] assume expr is not mutated after analysis to avoid recursive (PR #90581)

2024-04-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/90581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-04-30 Thread Akira Hatanaka via cfe-commits
@@ -27,6 +27,9 @@ namespace llvm { } } +// Prefix for __builtin_verbose_trap. +#define CLANG_VERBOSE_TRAP_PREFIX "__llvm_verbose_trap" ahatanak wrote: @delcypher I don't think it has to mention `llvm`. Can we make it even shorter, e.g., `__trap_msg`? http

[clang] [Clang] Implement P2809: Trivial infinite loops are not Undefined Behavior (PR #90066)

2024-04-30 Thread Eli Friedman via cfe-commits
@@ -908,6 +908,74 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) { incrementProfileCounter(&S); } +bool CodeGenFunction::checkIfLoopMustProgress(const Expr *ControllingExpression, + bool IsTrivialCXXLoop) { + if (CGM.get

[clang] [Clang] Fix Null Pointer Dereference in Sema::BuildClassMessageImplicit() (PR #90482)

2024-04-30 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann requested changes to this pull request. I believe the static analyzer is reporting a false positive in this case. I don't think this change is correct. `BuildClassMessage()` only dereferences `receiverTypeInfo` if the provided source location is not valid. The exi

[clang] [llvm] [x86] Add tan intrinsic part 4 (PR #90503)

2024-04-30 Thread Farzon Lotfi via cfe-commits
@@ -674,6 +674,9 @@ # DEBUG-NEXT: .. opcode {{[0-9]+}} is aliased to {{[0-9]+}} # DEBUG-NEXT: .. the first uncovered type index: 1, OK # DEBUG-NEXT: .. the first uncovered imm index: 0, OK +# DEBUG-NEXT: G_FTAN (opcode {{[0-9]+}}): 1 type index, 0 imm indices f

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

2024-04-30 Thread Alex Langford via cfe-commits
bulbazord wrote: LLDB changes look fine. https://github.com/llvm/llvm-project/pull/90391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] Reland "[clang] Enable sized deallocation by default in C++14 onwards" (PR #90373)

2024-04-30 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Thanks a lot, that was quick! There is another AddressSanitizer issue that > may possibly be fixed by #90292. cc @vitalybuka Yes, please wait for #90292. https://github.com/llvm/llvm-project/pull/90373 ___ cfe-commits mailing lis

[clang] [Modules] Process include files changes with -fmodules-validate-input-files-content and -fno-pch-timestamp options (PR #90319)

2024-04-30 Thread Ivan Murashko via cfe-commits
@@ -0,0 +1,34 @@ +// UNSUPPORTED: system-windows +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: cd %t +// +// RUN: cp a1.h a.h +// RUN: %clang -fmodules -fmodules-validate-input-files-content -Xclang -fno-pch-timestamp -fimplicit-modules -fmodule-map-file=module.modulemap

[clang] Add isTrivial() and isTriviallyCopyable() AST matchers (PR #90634)

2024-04-30 Thread via cfe-commits
https://github.com/higher-performance created https://github.com/llvm/llvm-project/pull/90634 There are currently no AST matchers for the equivalent of `std::is_trivial`, `std::is_trivially_default_constructible`, `std::is_trivially_copyable`, and the like. This pull request adds matchers to

[clang] Add isTrivial() and isTriviallyCopyable() AST matchers (PR #90634)

2024-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (higher-performance) Changes There are currently no AST matchers for the equivalent of `std::is_trivial`, `std::is_trivially_default_constructible`, `std::is_trivially_copyable`, and the like. This pull request adds matchers to chec

[clang] Add isTrivial() and isTriviallyCopyable() AST matchers (PR #90634)

2024-04-30 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-email

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #90389)

2024-04-30 Thread Eli Friedman via cfe-commits
@@ -3133,15 +3149,13 @@ Address X86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, // Copy into a temporary if the type is more aligned than the // register save area. -if (TyAlign.getQuantity() > 8) { - Address Tmp = CGF.CreateMemTemp(Ty); +

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #90389)

2024-04-30 Thread Eli Friedman via cfe-commits
@@ -3122,9 +3122,25 @@ Address X86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, CGF.Builder.CreateStore(V, CGF.Builder.CreateStructGEP(Tmp, 1)); RegAddr = Tmp.withElementType(LTy); - } else if (neededInt) { -RegAddr = Address(CGF.Builder.CreateG

[clang] [clang][Sema] Re-use existing BinaryOperator if possible (PR #90625)

2024-04-30 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: `clang-format` issues an error for the comments from a previous commit wrote by a different author. I'd like to disregard the clang-format errror, so to keep the diff of this commit minimial. https://github.com/llvm/llvm-project/pull/90625 ___

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/90220 >From b9b17fa34dab666e4c77dad9cd4109f7a88d1c2e Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 26 Apr 2024 18:03:44 +0300 Subject: [PATCH 1/3] [clang] Fix crash when destructor definition is preceded

[clang] [llvm] [DirectX] Start documenting DXIL Resource handling (PR #90553)

2024-04-30 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,799 @@ +== +DXIL Resource Handling +== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +Resources in DXIL are represented via ``TargetExtType`` in LLVM IR and +eventually lowered by the Di

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-30 Thread Vlad Serebrennikov via cfe-commits
@@ -3893,9 +3893,12 @@ namespace { } void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *E) { - if (E->getTemporary()->getDestructor()->isTrivial()) { -Inherited::VisitStmt(E); -return; + if (const CXXDestructorDecl *DtorDecl = +

[clang] [Clang] Fix Null Pointer Dereference in Sema::BuildClassMessageImplicit() (PR #90482)

2024-04-30 Thread via cfe-commits
https://github.com/smanna12 closed https://github.com/llvm/llvm-project/pull/90482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >