[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-05-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good. https://github.com/llvm/llvm-project/pull/89565 ___ 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-05-06 Thread Aaron Ballman via cfe-commits
@@ -4075,9 +4076,8 @@ AST_POLYMORPHIC_MATCHER_P( AST_POLYMORPHIC_SUPPORTED_TYPES( BlockDecl, CXXBaseSpecifier, CXXCtorInitializer, CXXFunctionalCastExpr, CXXNewExpr, CXXTemporaryObjectExpr, CXXUnresolvedConstructExpr, -ClassTemplateSpecializationDecl

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

2024-05-06 Thread Aaron Ballman via cfe-commits
@@ -764,9 +764,9 @@ AST_POLYMORPHIC_MATCHER(isImplicit, return Node.isImplicit(); } -/// Matches classTemplateSpecializations, templateSpecializationType and -/// functionDecl that have at least one TemplateArgument matching the given -/// InnerMatcher. +/// Matches template

[clang] [clang analysis][thread safety] Warn when returning rvalue references. (PR #91229)

2024-05-06 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle created https://github.com/llvm/llvm-project/pull/91229 We're missing `T&& Consume() && { return std::move(member); }`. >From 86733474a1bf1486b807c95792781aa2d869c2ca Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 6 May 2024 14:15:47 + Subject: [P

[clang] [clang analysis][thread safety] Warn when returning rvalue references. (PR #91229)

2024-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Clement Courbet (legrosbuffle) Changes We're missing `T&& Consume() && { return std::move(member); }`. --- Full diff: https://github.com/llvm/llvm-project/pull/91229.diff 2 Files Affected: - (modified) clang/lib/Analysis/Thread

[clang] [analyzer] Use explicit call description mode in more checkers (PR #90974)

2024-05-06 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. LGTM, I especially like how InnerPointerChecker was simplified. https://github.com/llvm/llvm-project/pull/90974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

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

2024-05-06 Thread Benson Chu via cfe-commits
pestctrl wrote: ping! 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-tools-extra] [NFC][clang-tidy]increase stability for bugprone-return-const-ref-from-parameter (PR #91160)

2024-05-06 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > Is there something specific you hit (test-case)? Either way, it's good to > check No, but I found run clang-tidy in clangd, there are lots of weird case (to process half-written code) https://github.com/llvm/llvm-project/pull/91160

[clang-tools-extra] 5cb13bf - [NFC][clang-tidy]increase stability for bugprone-return-const-ref-from-parameter (#91160)

2024-05-06 Thread via cfe-commits
Author: Congcong Cai Date: 2024-05-06T23:46:14+08:00 New Revision: 5cb13bfd897f5d69439058d3cd7b1af8a37c7e42 URL: https://github.com/llvm/llvm-project/commit/5cb13bfd897f5d69439058d3cd7b1af8a37c7e42 DIFF: https://github.com/llvm/llvm-project/commit/5cb13bfd897f5d69439058d3cd7b1af8a37c7e42.diff

[clang-tools-extra] [NFC][clang-tidy]increase stability for bugprone-return-const-ref-from-parameter (PR #91160)

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

[clang] [llvm] demangle function names in trace files (PR #87626)

2024-05-06 Thread via cfe-commits
Trass3r wrote: Ok done https://github.com/llvm/llvm-project/pull/87626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-06 Thread Doug Wyatt via cfe-commits
@@ -7963,6 +7967,148 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr &Attr) { llvm_unreachable("unexpected attribute kind!"); } +ExprResult Sema::ActOnEffectExpression(Expr *CondExpr, FunctionEffectMode &Mode, + bool RequireC

[clang] [llvm] demangle function names in trace files (PR #87626)

2024-05-06 Thread Jamie Schmeiser via cfe-commits
jamieschmeiser wrote: Thanks, I looked over things and they still look good. https://github.com/llvm/llvm-project/pull/87626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-06 Thread via cfe-commits
zmodem wrote: > @zmodem Fixed in 3191e0b Thanks! In the meantime, we're finding a number of legitimate bugs with this. Pretty cool :) https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI core info (PR #85235)

2024-05-06 Thread Daniil Kovalev via cfe-commits
@@ -1,5 +1,37 @@ +// RUN: %clang -### -c --target=aarch64 %s 2>&1 | FileCheck %s --check-prefix NONE +// NONE: "-cc1" +// NONE-NOT: "-fptrauth- + // RUN: %clang -### -c --target=aarch64 -fno-ptrauth-intrinsics -fptrauth-intrinsics %s 2>&1 | FileCheck %s --check-prefix=INTRIN /

[clang] [analyzer] Clean up apiModeling.llvm.ReturnValue (PR #91231)

2024-05-06 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/91231 This commit heavily refactors and simplifies the small and trivial checker `apiModeling.llvm.ReturnValue`, which is responsible for modeling the peculiar coding convention that in the LLVM/Clang codebase certa

[clang] [analyzer] Clean up apiModeling.llvm.ReturnValue (PR #91231)

2024-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Donát Nagy (NagyDonat) Changes This commit heavily refactors and simplifies the small and trivial checker `apiModeling.llvm.ReturnValue`, which is responsible for modeling the peculiar coding convention that in the LLVM/Clang codebase cer

[clang] [llvm] demangle function names in trace files (PR #87626)

2024-05-06 Thread Jamie Schmeiser via cfe-commits
jamieschmeiser wrote: You may want to look at https://github.com/llvm/llvm-project/pull/90756 https://github.com/llvm/llvm-project/pull/87626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-06 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,79 @@ +//===--- UseInternalLinkageCheck.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: Apa

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90830 >From 24cbbd0c87ab2a06381d210da1dff5f966b72773 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May 2024 15:44:45 +0800 Subject: [PATCH 1/6] reformat --- .../clang-tidy/readability/CMakeLists.txt

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

2024-05-06 Thread via cfe-commits
@@ -801,7 +801,7 @@ static OutputDesc *addInputSec(StringMap> &map, auto *firstIsec = cast( cast(sec->commands[0])->sectionBases[0]); OutputSection *firstIsecOut = - firstIsec->flags & SHF_LINK_ORDER luolent wrote: Hi @MaskRay ,

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-06 Thread via cfe-commits
@@ -7963,6 +7967,148 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr &Attr) { llvm_unreachable("unexpected attribute kind!"); } +ExprResult Sema::ActOnEffectExpression(Expr *CondExpr, FunctionEffectMode &Mode, + bool RequireC

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-05-06 Thread zhijian lin via cfe-commits
diggerlin wrote: I do not further comment on the PR, but I have worry about that , the PR have different mechanism with "-msoft-float" , the -msoft-float pass "use-soft-float"="true" in the IR, the llc will l put float parameter in the GPR, but the PR implement `-fcomplex-ppc-gnu-abi` in the

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

2024-05-06 Thread Krystian Stasiowski via cfe-commits
@@ -764,9 +764,9 @@ AST_POLYMORPHIC_MATCHER(isImplicit, return Node.isImplicit(); } -/// Matches classTemplateSpecializations, templateSpecializationType and -/// functionDecl that have at least one TemplateArgument matching the given -/// InnerMatcher. +/// Matches template

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

2024-05-06 Thread via cfe-commits
jyu2-git wrote: Hi @vitalybuka, could you please try to see if this change fix the problem? Thanks. I also put same fix in https://github.com/llvm/llvm-project/pull/91141. But both test run fails, which should not cause by my change. Thanks again. Jennifer https://github.com/llvm/llvm-proje

[clang] 48c8a57 - [OpenACC] Implement 'deviceptr' and 'attach' sema for compute constructs

2024-05-06 Thread via cfe-commits
Author: erichkeane Date: 2024-05-06T09:29:04-07:00 New Revision: 48c8a5791ae71c96661479f684459b7b9427a22d URL: https://github.com/llvm/llvm-project/commit/48c8a5791ae71c96661479f684459b7b9427a22d DIFF: https://github.com/llvm/llvm-project/commit/48c8a5791ae71c96661479f684459b7b9427a22d.diff LO

[clang] [llvm] Try to use non-volatile registers for `preserve_none` parameters (PR #88333)

2024-05-06 Thread Brandt Bucher via cfe-commits
brandtbucher wrote: Anyone available to merge this (now that it's been approved)? https://github.com/llvm/llvm-project/pull/88333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90830 >From 24cbbd0c87ab2a06381d210da1dff5f966b72773 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May 2024 15:44:45 +0800 Subject: [PATCH 1/7] reformat --- .../clang-tidy/readability/CMakeLists.txt

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

2024-05-06 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @AaronBallman release note added (feel free to suggest any changes to it :)) 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-c

[clang] [llvm] [clang][hlsl] Add tan intrinsic part 1 (PR #90276)

2024-05-06 Thread Farzon Lotfi via cfe-commits
farzonl wrote: > I'm worried if we add a whole new series of math intrinsics without adding > the corresponding constrained intrinsics, it's going to be confusing for > anyone trying to understand how math intrinsics work. Why does tan exist, but > not constrained tan? > > `tan` is defined ba

[clang] [Clang][Sema] Explicit template arguments are not substituted into the exception specification of a function (PR #90760)

2024-05-06 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/90760 >From a30530b4de31fab70911cb7b51e7a7e274fd2a38 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 1 May 2024 10:54:12 -0400 Subject: [PATCH 1/4] [Clang][Sema] Explicit template arguments are not su

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-06 Thread S. Bharadwaj Yadavalli via cfe-commits
https://github.com/bharadwajy updated https://github.com/llvm/llvm-project/pull/90809 >From 1b6bb5bf115c9f72adde27b6d77d957edbc49321 Mon Sep 17 00:00:00 2001 From: Bharadwaj Yadavalli Date: Wed, 1 May 2024 14:42:42 -0400 Subject: [PATCH 1/3] Set DXIL Version in DXIL target triple based on shade

[clang] cc1: Report an error for multiple actions unless separated by -main-file-name (PR #91140)

2024-05-06 Thread Fangrui Song via cfe-commits
@@ -2841,6 +2841,30 @@ static bool ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args, } Opts.ProgramAction = *ProgramAction; + +// Catch common mistakes when multiple actions are specified for cc1 (e.g. +// -S -emit-llvm means -emit-llvm while -emit-llvm

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-06 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -4675,7 +4676,7 @@ bool CompilerInvocation::CreateFromArgsImpl( // FIXME: We shouldn't have to pass the DashX option around here InputKind DashX = Res.getFrontendOpts().DashX; ParseTargetArgs(Res.getTargetOpts(), Args, Diags); - llvm::Triple T(Res.getTargetOpts().Trip

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-06 Thread Doug Wyatt via cfe-commits
@@ -7963,6 +7967,148 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr &Attr) { llvm_unreachable("unexpected attribute kind!"); } +ExprResult Sema::ActOnEffectExpression(Expr *CondExpr, FunctionEffectMode &Mode, + bool RequireC

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

2024-05-06 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/90574 >From 1dcb4c3ac1efaf3a6a4317751e23089a6c8ccac1 Mon Sep 17 00:00:00 2001 From: yronglin Date: Tue, 30 Apr 2024 17:18:26 +0800 Subject: [PATCH 1/6] =?UTF-8?q?[Clang]=20Implement=20P3034R1=20Module=20De?= =?UTF-8?

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

2024-05-06 Thread via cfe-commits
yronglin wrote: > Either way, the parsing of semi conlon/attributes should stay in the parser. Agree! It's still stay in the parser. https://github.com/llvm/llvm-project/pull/90574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

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

2024-05-06 Thread via cfe-commits
@@ -1329,6 +1342,129 @@ bool Preprocessor::LexAfterModuleImport(Token &Result) { return true; } +/// Lex a token following the 'module' contextual keyword. +/// +/// [cpp.module]/p2: +/// The pp-tokens, if any, of a pp-module shall be of the form: +/// pp-module-name p

[clang] [llvm] demangle function names in trace files (PR #87626)

2024-05-06 Thread via cfe-commits
Trass3r wrote: I haven't seen a Loop entry in a trace file yet. Do we want to change it anyway? https://github.com/llvm/llvm-project/pull/87626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-06 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/91017 >From 82e51e4cea0cb889842273fcac874bb52d6bd780 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 3 May 2024 14:14:58 -0700 Subject: [PATCH 1/2] [NFC][Driver] Clean up RenderFloatingPointOptions() This cha

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

2024-05-06 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/90574 >From 1dcb4c3ac1efaf3a6a4317751e23089a6c8ccac1 Mon Sep 17 00:00:00 2001 From: yronglin Date: Tue, 30 Apr 2024 17:18:26 +0800 Subject: [PATCH 1/7] =?UTF-8?q?[Clang]=20Implement=20P3034R1=20Module=20De?= =?UTF-8?

[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This change refactors RenderFloatingPointOptions() to eliminate some excessively complicated logic and a redundant switch statement. The logic being simplified is an artifact of the original -ffp-model imple

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

2024-05-06 Thread via cfe-commits
@@ -0,0 +1,80 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t + +// RUN: %clang_cc1 -std=c++20 %t/A.cppm -triple x86_64-linux-gnu -verify +// RUN: %clang_cc1 -std=c++20 %t/B.cppm -triple x86_64-linux-gnu -verify +// RUN: %clang_cc1 -std=c++20 %t/C.cppm -triple

[clang] f0f02b9 - [NFC][Driver] Clean up RenderFloatingPointOptions() (#91017)

2024-05-06 Thread via cfe-commits
Author: Andy Kaylor Date: 2024-05-06T10:16:00-07:00 New Revision: f0f02b9c3eb1834f4c38d0c95bf19559869788ea URL: https://github.com/llvm/llvm-project/commit/f0f02b9c3eb1834f4c38d0c95bf19559869788ea DIFF: https://github.com/llvm/llvm-project/commit/f0f02b9c3eb1834f4c38d0c95bf19559869788ea.diff L

[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-06 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/91017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Only bypass scanning VFS for the module cache (PR #88800)

2024-05-06 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: I don't think I'll have time to work on this PR in the short-term. https://github.com/llvm/llvm-project/pull/88800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-06 Thread S. Bharadwaj Yadavalli via cfe-commits
https://github.com/bharadwajy updated https://github.com/llvm/llvm-project/pull/90809 >From 1b6bb5bf115c9f72adde27b6d77d957edbc49321 Mon Sep 17 00:00:00 2001 From: Bharadwaj Yadavalli Date: Wed, 1 May 2024 14:42:42 -0400 Subject: [PATCH 1/4] Set DXIL Version in DXIL target triple based on shade

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-06 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -744,7 +744,7 @@ void codegen::setFunctionAttributes(StringRef CPU, StringRef Features, Expected> codegen::createTargetMachineForTriple(StringRef TargetTriple, CodeGenOptLevel OptLevel) { - Triple TheTriple(TargetTriple); + Triple The

[clang] [clang-scan-deps] Expand response files before the argument adjuster (PR #89950)

2024-05-06 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,36 @@ +// Check that the scanner can adjust arguments by reading .rsp files in advance. + +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json +// RUN: echo /Fo%t/tu.obj >> %t/args_nested.rsp jan

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

2024-05-06 Thread David Blaikie via cfe-commits
@@ -27,6 +27,9 @@ namespace llvm { } } +// Prefix for __builtin_verbose_trap. +#define CLANG_VERBOSE_TRAP_PREFIX "__llvm_verbose_trap" dwblaikie wrote: I think we usually use some llvm or clang prefix in these sort of things, to reduce the chance of confli

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

2024-05-06 Thread David Blaikie via cfe-commits
@@ -27,6 +27,9 @@ namespace llvm { } } +// Prefix for __builtin_verbose_trap. +#define CLANG_VERBOSE_TRAP_PREFIX "__llvm_verbose_trap" dwblaikie wrote: & not sure it being a compile time constant regex is super important - the regex compilation probably dw

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

2024-05-06 Thread via cfe-commits
jyu2-git wrote: Hi @vitalybuka, do you think, this patch is ready to check-in? Thanks. https://github.com/llvm/llvm-project/pull/90935 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e4d2427 - [test] %clang_cc1 -analyze: remove redundant actions

2024-05-06 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-06T10:36:19-07:00 New Revision: e4d242768aefabc0091dd01fabecaffbc2b6984b URL: https://github.com/llvm/llvm-project/commit/e4d242768aefabc0091dd01fabecaffbc2b6984b DIFF: https://github.com/llvm/llvm-project/commit/e4d242768aefabc0091dd01fabecaffbc2b6984b.diff

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

2024-05-06 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/90574 >From 1dcb4c3ac1efaf3a6a4317751e23089a6c8ccac1 Mon Sep 17 00:00:00 2001 From: yronglin Date: Tue, 30 Apr 2024 17:18:26 +0800 Subject: [PATCH 1/8] =?UTF-8?q?[Clang]=20Implement=20P3034R1=20Module=20De?= =?UTF-8?

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

2024-05-06 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/90574 >From 1dcb4c3ac1efaf3a6a4317751e23089a6c8ccac1 Mon Sep 17 00:00:00 2001 From: yronglin Date: Tue, 30 Apr 2024 17:18:26 +0800 Subject: [PATCH 1/9] =?UTF-8?q?[Clang]=20Implement=20P3034R1=20Module=20De?= =?UTF-8?

[clang] d3e77f5 - Try to use non-volatile registers for `preserve_none` parameters (#88333)

2024-05-06 Thread via cfe-commits
Author: Brandt Bucher Date: 2024-05-06T10:55:36-07:00 New Revision: d3e77f5408fded2b4bb70f51d6d9e52684badc92 URL: https://github.com/llvm/llvm-project/commit/d3e77f5408fded2b4bb70f51d6d9e52684badc92 DIFF: https://github.com/llvm/llvm-project/commit/d3e77f5408fded2b4bb70f51d6d9e52684badc92.diff

[clang] [llvm] Try to use non-volatile registers for `preserve_none` parameters (PR #88333)

2024-05-06 Thread via cfe-commits
https://github.com/weiguozhi closed https://github.com/llvm/llvm-project/pull/88333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Try to use non-volatile registers for `preserve_none` parameters (PR #88333)

2024-05-06 Thread via cfe-commits
github-actions[bot] wrote: @brandtbucher Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a b

[clang] cc1: Report an error for multiple actions unless separated by -main-file-name (PR #91140)

2024-05-06 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/91140 >From c8677337fbcc6a1456466e65dd847f9317f16a4f Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 5 May 2024 13:06:36 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-

[clang] cc1: Report an error for multiple actions unless separated by -main-file-name (PR #91140)

2024-05-06 Thread Fangrui Song via cfe-commits
@@ -134,6 +134,8 @@ def err_fe_no_pch_in_dir : Error< "no suitable precompiled header file found in directory '%0'">; def err_fe_action_not_available : Error< "action %0 not compiled in">; +def err_fe_invalid_multiple_actions : Error< +"action %0 is specified, anoth

[clang] cc1: Report an error for multiple actions unless separated by -main-file-name (PR #91140)

2024-05-06 Thread Fangrui Song via cfe-commits
MaskRay wrote: > This sounds good in principle, but some tests are failing in CI, so this > might need more refinement. There were `%clang_analyze_cc1 -analyze` (redundant `-analyze`) errors. Fixed by e4d242768aefabc0091dd01fabecaffbc2b6984b https://github.com/llvm/llvm-project/pull/91140 ___

[clang] cc1: Report an error for multiple actions unless separated by -main-file-name (PR #91140)

2024-05-06 Thread Fangrui Song via cfe-commits
MaskRay wrote: > CI seems to have noticed what I feared :) This is going to hit a good amount > of our internal tests, there is no way our copy-paste cargo-cult didn't come > up with this before. This one-liner might be useful to auto fix some downstream tests... ``` xargs sed -Ei 's/(-fsynta

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-06 Thread S. Bharadwaj Yadavalli via cfe-commits
https://github.com/bharadwajy updated https://github.com/llvm/llvm-project/pull/90809 >From 1b6bb5bf115c9f72adde27b6d77d957edbc49321 Mon Sep 17 00:00:00 2001 From: Bharadwaj Yadavalli Date: Wed, 1 May 2024 14:42:42 -0400 Subject: [PATCH 1/5] Set DXIL Version in DXIL target triple based on shade

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-06 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -630,7 +630,7 @@ extern "C" int optMain( } } - Triple ModuleTriple(M->getTargetTriple()); + Triple ModuleTriple(Triple::normalize(M->getTargetTriple())); bharadwajy wrote: > Similarly to my concern about updating `createTargetMachineForTriple`, I

[clang] cc1: Report an error for multiple actions unless separated by -main-file-name (PR #91140)

2024-05-06 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. This looks good to me, please give this a day or so for any conversations to die down. https://github.com/llvm/llvm-project/pull/91140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI core info (PR #85235)

2024-05-06 Thread Fangrui Song via cfe-commits
@@ -1796,6 +1796,26 @@ void Clang::AddAArch64TargetArgs(const ArgList &Args, Args.addOptInFlag(CmdArgs, options::OPT_fptrauth_intrinsics, options::OPT_fno_ptrauth_intrinsics); + MaskRay wrote: I'd delete blank lines for these similar `OP

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI core info (PR #85235)

2024-05-06 Thread Fangrui Song via cfe-commits
@@ -1,5 +1,37 @@ +// RUN: %clang -### -c --target=aarch64 %s 2>&1 | FileCheck %s --check-prefix NONE +// NONE: "-cc1" +// NONE-NOT: "-fptrauth- + // RUN: %clang -### -c --target=aarch64 -fno-ptrauth-intrinsics -fptrauth-intrinsics %s 2>&1 | FileCheck %s --check-prefix=INTRIN /

[clang] [clang][driver] Support `-x` for all languages in CL mode (PR #89772)

2024-05-06 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/89772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Support `-x` for all languages in CL mode (PR #89772)

2024-05-06 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/89772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Support `-x` for all languages in CL mode (PR #89772)

2024-05-06 Thread Fangrui Song via cfe-commits
@@ -5,7 +5,3 @@ // RUN: %clang -fsyntax-only -xc %s -xc++ -fsyntax-only 2>&1 | FileCheck %s // RUN: %clang -fsyntax-only %s -xc %s -xc++ -fsyntax-only 2>&1 | FileCheck %s // CHECK: '-x c++' after last input file has no effect - -// RUN: not %clang_cl /WX /clang:-xc /clang:-E /c

[clang] [clang-tools-extra] [clang] Don't preserve the typo expr in the recovery expr for invalid VarDecls (PR #90948)

2024-05-06 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/90948 >From 2f29011bae5bf1b285c2ab1700c887d74eaec4b0 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 3 May 2024 10:06:39 +0200 Subject: [PATCH 1/2] [clang] Don't preserve the typo expr in the recovery expr for inv

[clang] [clang-tools-extra] [clang] Don't preserve the typo expr in the recovery expr for invalid VarDecls (PR #90948)

2024-05-06 Thread Haojian Wu via cfe-commits
@@ -13530,9 +13530,12 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { } if (VDecl->isInvalidDecl()) { -CorrectDelayedTyposInExpr(Init, VDecl); +ExprResult Res = CorrectDelayedTyposInExpr(Init, VDecl); +std::vector SubExprs; --

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/90809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. Other than [my comment here](https://github.com/llvm/llvm-project/pull/90809/files#r1589771652) about what to do in getArchName this looks reasonable. The string handling in `normalize` feels a bit unwieldy, but I don't have any obvious th

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-06 Thread Justin Bogner via cfe-commits
@@ -744,7 +744,7 @@ void codegen::setFunctionAttributes(StringRef CPU, StringRef Features, Expected> codegen::createTargetMachineForTriple(StringRef TargetTriple, CodeGenOptLevel OptLevel) { - Triple TheTriple(TargetTriple); + Triple The

[clang] [HLSL] Implement 202x conforming literals (PR #91015)

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

[clang] [llvm] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-05-06 Thread David Blaikie via cfe-commits
@@ -5636,6 +5636,84 @@ void CGDebugInfo::EmitExternalVariable(llvm::GlobalVariable *Var, Var->addDebugInfo(GVE); } +void CGDebugInfo::EmitPseudoVariable(CGBuilderTy &Builder, + llvm::Instruction *Value, QualType Ty) { + // Only when -g2

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-06 Thread Rajveer Singh Bharadwaj via cfe-commits
Rajveer100 wrote: Should we introduce a new Kind in `DerefKind`? https://github.com/llvm/llvm-project/pull/91119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-06 Thread S. Bharadwaj Yadavalli via cfe-commits
https://github.com/bharadwajy updated https://github.com/llvm/llvm-project/pull/90809 >From 1b6bb5bf115c9f72adde27b6d77d957edbc49321 Mon Sep 17 00:00:00 2001 From: Bharadwaj Yadavalli Date: Wed, 1 May 2024 14:42:42 -0400 Subject: [PATCH 1/6] Set DXIL Version in DXIL target triple based on shade

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-06 Thread Doug Wyatt via cfe-commits
@@ -10778,6 +10778,101 @@ def warn_imp_cast_drops_unaligned : Warning< "implicit cast from type %0 to type %1 drops __unaligned qualifier">, InGroup>; +def warn_func_effect_allocates : Warning< + "'%0' function '%1' must not allocate or deallocate memory">, + InGroup; +

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-06 Thread Doug Wyatt via cfe-commits
@@ -10778,6 +10778,101 @@ def warn_imp_cast_drops_unaligned : Warning< "implicit cast from type %0 to type %1 drops __unaligned qualifier">, InGroup>; +def warn_func_effect_allocates : Warning< + "'%0' function '%1' must not allocate or deallocate memory">, + InGroup; +

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-06 Thread Doug Wyatt via cfe-commits
@@ -1870,6 +1870,28 @@ bool Sema::IsFunctionConversion(QualType FromType, QualType ToType, FromFn = QT->getAs(); Changed = true; } + +// For C, when called from checkPointerTypesForAssignment, +// we need not to alter FromFn, or else even an innocuous c

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-06 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,126 @@ +// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fblocks -verify -x c -std=c23 %s dougsonos wrote: There's now a separate file for pre-C23 - currently it just tests the prototypeless case

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

2024-05-06 Thread Eli Friedman via cfe-commits
@@ -2239,6 +2239,20 @@ The semantics are as follows: }]; } +def ARMInterruptSaveFPDocs : Documentation { +let Category = DocCatFunction; + let Heading = "interrupt_save_fp (ARM)"; + let Content = [{ +Clang supports the GNU style ``__attribute__((interrupt_save_fp("TYPE

[clang] [MSP430][Clang] Update list of MCUs (PR #91258)

2024-05-06 Thread Marian Buschsieweke via cfe-commits
https://github.com/maribu created https://github.com/llvm/llvm-project/pull/91258 This updates the list of MSP430 MCUs from TI's devices.csv obtained from [1] under the "Header and Support Files" link. A simple python script has been used to generate this list. [1]: https://www.ti.com/tool/MS

[clang] [MSP430][Clang] Update list of MCUs (PR #91258)

2024-05-06 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] [MSP430][Clang] Update list of MCUs (PR #91258)

2024-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Marian Buschsieweke (maribu) Changes This updates the list of MSP430 MCUs from TI's devices.csv obtained from [1] under the "Header and Support Files" link. A simple python script has been used to generate this list. [1]: https://www.ti.

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI core info (PR #85235)

2024-05-06 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/85235 >From 919af72c09216838bfe586c3da503f5d74104a7d Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Tue, 19 Mar 2024 23:57:06 +0300 Subject: [PATCH 1/9] [PAC][clang] Define ptrauth driver flags and preprocessor

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-05-06 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] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Eric Wright (efwright) Changes This is a portion of the implementation for the 'simd' directive for OpenMP offload. Included in this PR is new code generation for OpenMP 'simd' loops using the OpenMPIRBuilder, and some adjustments

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI core info (PR #85235)

2024-05-06 Thread Daniil Kovalev via cfe-commits
@@ -1,5 +1,37 @@ +// RUN: %clang -### -c --target=aarch64 %s 2>&1 | FileCheck %s --check-prefix NONE +// NONE: "-cc1" +// NONE-NOT: "-fptrauth- + // RUN: %clang -### -c --target=aarch64 -fno-ptrauth-intrinsics -fptrauth-intrinsics %s 2>&1 | FileCheck %s --check-prefix=INTRIN /

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI core info (PR #85235)

2024-05-06 Thread Daniil Kovalev via cfe-commits
@@ -1796,6 +1796,26 @@ void Clang::AddAArch64TargetArgs(const ArgList &Args, Args.addOptInFlag(CmdArgs, options::OPT_fptrauth_intrinsics, options::OPT_fno_ptrauth_intrinsics); + kovdan01 wrote: Deleted, see b0f9a1985846448d01af9bacdb6e3d

[clang] [HLSL] Implement 202x conforming literals (PR #91015)

2024-05-06 Thread Natalie Chouinard via cfe-commits
https://github.com/sudonatalie approved this pull request. https://github.com/llvm/llvm-project/pull/91015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-06 Thread Benson Chu via cfe-commits
https://github.com/pestctrl updated https://github.com/llvm/llvm-project/pull/89654 >From 0e0fcca8752ff4e9478cc2e6710e188e65da71e6 Mon Sep 17 00:00:00 2001 From: Jake Vossen Date: Wed, 30 Jun 2021 15:13:13 -0500 Subject: [PATCH 1/2] [ARM] Save floating point registers with save_fp function att

[clang] [llvm] [WIP][OpenMP] Remove dependency on `libffi` from offloading runtime (PR #91264)

2024-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Joseph Huber (jhuber6) Changes Summary: This patch attempts to remove the dependency on `libffi` by instead emitting the host / CPU kernels using an aggregate struct made from the captured context. This callows us to have a fixed fu

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-06 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -744,7 +744,7 @@ void codegen::setFunctionAttributes(StringRef CPU, StringRef Features, Expected> codegen::createTargetMachineForTriple(StringRef TargetTriple, CodeGenOptLevel OptLevel) { - Triple TheTriple(TargetTriple); + Triple The

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-06 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -115,6 +115,30 @@ StringRef Triple::getArchName(ArchType Kind, SubArchType SubArch) { if (SubArch == AArch64SubArch_arm64e) return "arm64e"; break; + case Triple::dxil: +switch (SubArch) { +case Triple::NoSubArch: +case Triple::DXILSubArch_v1_0: +

[clang] [Clang][Sema] Explicit template arguments are not substituted into the exception specification of a function (PR #90760)

2024-05-06 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/90760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

2024-05-06 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/90809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add support for Qualcomm Oryon processor (PR #91022)

2024-05-06 Thread Jonathan Thackray via cfe-commits
@@ -85,6 +85,10 @@ def SMEUnsupported : AArch64Unsupported { SME2Unsupported.F); } +def MTEUnsupported : AArch64Unsupported { + let F = [HasMTE]; +} + jthackray wrote: I can't see that MTEUnsupported is referenced from elsewhere in this

<    1   2   3   4   >