[clang] [clang] Add GCC-compatible code model names for sparc64 (PR #79485)

2024-01-26 Thread Rainer Orth via cfe-commits
rorth wrote: > `embmedany` is already rejected by the driver at the moment: > > ``` > error: unsupported argument 'embmedany' to option '-mcmodel=' for target > 'sparc64' > ``` Seems sensible indeed. > On the testing issue, however, would compiling LLVM with each of the code > models + running

[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

2024-01-26 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. No more comments, this looks good to me, and now that we are post release-branch, I think I'm happy to have this merged. https://github.com/llvm/llvm-project/pull/72644 ___ cfe-commits mailing

[llvm] [clang-tools-extra] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-26 Thread Félix-Antoine Constantin via cfe-commits
@@ -0,0 +1,195 @@ +//===--- UseStdMinMaxCheck.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

[llvm] [clang-tools-extra] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-26 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 edited https://github.com/llvm/llvm-project/pull/77816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-26 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/77816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-26 Thread Félix-Antoine Constantin via cfe-commits
@@ -0,0 +1,195 @@ +//===--- UseStdMinMaxCheck.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

[llvm] [libc] [flang] [compiler-rt] [clang] [clang-tools-extra] Apply kind code check on exitstat and cmdstat (PR #78286)

2024-01-26 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/78286 >From d56eca56c8e4c64e649febc43e2c48b6e5146680 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Tue, 16 Jan 2024 14:08:00 + Subject: [PATCH 1/9] change exitstat and cmsstat from AnyInt to DefaultInt --- flang/l

[clang] [lldb] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-26 Thread Erich Keane via cfe-commits
erichkeane wrote: I see now that hte problem is probably in the Analyzer, so @steakhal is probably the best person to be leading this, but any work you can do @bolshakov-a would also likely be appreciated. https://github.com/llvm/llvm-project/pull/78041

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

2024-01-26 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fcxx-exceptions -verify %s + +#if !__has_builtin(__builtin_verbose_trap) +#error +#endif + +constexpr char const* constMsg1 = "hello"; +char const* const constMsg2 = "hello"; +char const constMsg3[] = "hello"; + +templ

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

2024-01-26 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,28 @@ +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fcxx-exceptions -verify %s + +#if !__has_builtin(__builtin_verbose_trap) +#error +#endif + +constexpr char const* constMsg1 = "hello"; +char const* const constMsg2 = "hello"; +char const constMsg3[] = "hello"; + +templ

[clang] [llvm] [AIX][TLS] Disallow the use of -maix-small-local-exec-tls and -fno-data-sections (PR #79252)

2024-01-26 Thread Amy Kwan via cfe-commits
@@ -12,6 +15,10 @@ entry: ; Check that the aix-small-local-exec-tls attribute is not supported on Linux and AIX (32-bit). ; CHECK-NOT-SUPPORTED: The aix-small-local-exec-tls attribute is only supported on AIX in 64-bit mode. +; Check that the aix-small-local-exec-tls attribu

[llvm] [clang] [AIX][TLS] Disallow the use of -maix-small-local-exec-tls and -fno-data-sections (PR #79252)

2024-01-26 Thread Amy Kwan via cfe-commits
@@ -124,10 +124,23 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef TuneCPU, // Determine endianness. IsLittleEndian = TM.isLittleEndian(); - if (HasAIXSmallLocalExecTLS && (!TargetTriple.isOSAIX() || !IsPPC64)) -report_fatal_error( - "The ai

[lldb] [clang-tools-extra] [clang] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-26 Thread Andrey Ali Khan Bolshakov via cfe-commits
bolshakov-a wrote: Prior to this PR, arrays in NTTP were represented as `Declaration`s and now as `StructuralValue`s referring to their first element. @steakhal, please note [here](https://github.com/llvm/llvm-project/pull/78041/files#diff-2f25fdb80b1a63f2e0a5a7c7a7c061b494b430ee8f5759b48022a86

[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (re-land) (PR #71417)

2024-01-26 Thread Balazs Benics via cfe-commits
steakhal wrote: Thank you all participating, and especially for @Endilll committing the fix as cc3fd1974696a792ba70ba670ed761937cd0735c. Consider my [issue](https://github.com/llvm/llvm-project/pull/71417#issuecomment-1897925793) resolved. :) https://github.com/llvm/llvm-project/pull/71417 __

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-01-26 Thread Egor Zhdan via cfe-commits
egorzhdan wrote: @compnerd ping :) https://github.com/llvm/llvm-project/pull/78445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] [OpenMP] atomic compare weak : Parser & AST support (PR #79475)

2024-01-26 Thread Alexey Bataev via cfe-commits
@@ -13202,6 +13204,29 @@ StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef Clauses, E = Checker.getE(); D = Checker.getD(); CE = Checker.getCond(); + /* The weak clause may only appear if the resulting atomic operation is + * an atomic condition

[clang-tools-extra] [llvm] [clang] [OpenMP] atomic compare weak : Parser & AST support (PR #79475)

2024-01-26 Thread Alexey Bataev via cfe-commits
@@ -13202,6 +13204,29 @@ StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef Clauses, E = Checker.getE(); D = Checker.getD(); CE = Checker.getCond(); + /* The weak clause may only appear if the resulting atomic operation is + * an atomic condition

[lld] [llvm] [clang] [libcxx] [lldb] [libc] [flang] [compiler-rt] [clang-tools-extra] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-26 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Oh gosh, I'm an idiot, i meant true That makes it a little bit challenging to preserve old warnings for older versions of the language, without additional flags and options, in some cases like: ``` struct A { ~A(); }; struct B : A { }; struct C { B a; co

[clang] [clang] Improved isSimpleTypeSpecifier (PR #79037)

2024-01-26 Thread Carl Peto via cfe-commits
https://github.com/carlos4242 updated https://github.com/llvm/llvm-project/pull/79037 >From fdc1e0dbec6821e292ba3da7770dbae22923db20 Mon Sep 17 00:00:00 2001 From: Carl Peto Date: Fri, 26 Jan 2024 14:20:48 + Subject: [PATCH] [clang] - Sema::isSimpleTypeSpecifier return true for _Bo

[clang] Improved is simple type specifier (PR #78903)

2024-01-26 Thread Carl Peto via cfe-commits
carlos4242 wrote: closed in favour of https://github.com/llvm/llvm-project/pull/79037 https://github.com/llvm/llvm-project/pull/78903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Improved is simple type specifier (PR #78903)

2024-01-26 Thread Carl Peto via cfe-commits
https://github.com/carlos4242 closed https://github.com/llvm/llvm-project/pull/78903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improved isSimpleTypeSpecifier (PR #79037)

2024-01-26 Thread Carl Peto via cfe-commits
https://github.com/carlos4242 ready_for_review https://github.com/llvm/llvm-project/pull/79037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

2024-01-26 Thread Andrew Kaster via cfe-commits
ADKaster wrote: Yeah seems llvm prefers not to force push PRs, but to keep stacking commits. The squashed commit will have the PR description as the final commit description. The compare button is a bit useless when it has a bunch of changes from main on it (https://github.com/llvm/llvm-proje

[clang] [clang] Improved isSimpleTypeSpecifier (PR #79037)

2024-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Carl Peto (carlos4242) Changes - Sema::isSimpleTypeSpecifier return true for _Bool in c99 (currently returns false for _Bool, regardless of C dialect). (Fixes #72203) - move simple type decision code into shared location (IdentifierInfo) -

[clang] [clang] Improved isSimpleTypeSpecifier (PR #79037)

2024-01-26 Thread Carl Peto via cfe-commits
https://github.com/carlos4242 edited https://github.com/llvm/llvm-project/pull/79037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] fix assert in `Environment::getResultObjectLocation` (PR #79608)

2024-01-26 Thread Paul Semel via cfe-commits
https://github.com/paulsemel created https://github.com/llvm/llvm-project/pull/79608 When calling `Environment::getResultObjectLocation` with a CXXOperatorCallExpr that is a prvalue, we just hit an assert because no record was ever created. >From 6af0f5971783214f6f3ce5f95aba97ed1c79824e Mon Se

[clang] [clang][dataflow] fix assert in `Environment::getResultObjectLocation` (PR #79608)

2024-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Paul Semel (paulsemel) Changes When calling `Environment::getResultObjectLocation` with a CXXOperatorCallExpr that is a prvalue, we just hit an assert because no record was ever created. --- Full diff: https://github.com/llvm/llvm-project

[lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-26 Thread via cfe-commits
bgra8 wrote: Heads up: we've stumbled upon this exact crash (https://github.com/llvm/llvm-project/issues/79575) while testing clang inside google too. https://github.com/llvm/llvm-project/pull/78041 ___ cfe-commits mailing list cfe-commits@lists.llvm

[lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-26 Thread via cfe-commits
@@ -8129,29 +8067,133 @@ Sema::BuildExpressionFromIntegralTemplateArgument(const TemplateArgument &Arg, else Kind = CharacterLiteralKind::Ascii; -E = new (Context) CharacterLiteral(Arg.getAsIntegral().getZExtValue(), - Kind,

[lldb] [clang-tools-extra] [clang] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-26 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/78041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [clang-tools-extra] [clang] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-26 Thread Erich Keane via cfe-commits
@@ -8129,29 +8067,133 @@ Sema::BuildExpressionFromIntegralTemplateArgument(const TemplateArgument &Arg, else Kind = CharacterLiteralKind::Ascii; -E = new (Context) CharacterLiteral(Arg.getAsIntegral().getZExtValue(), - Kind,

[clang-tools-extra] [llvm] [clang] [X86][GlobalISel] Remove G_OR/G_AND/G_XOR test duplication (NFC) (PR #79088)

2024-01-26 Thread Evgenii Kudriashov via cfe-commits
https://github.com/e-kud closed https://github.com/llvm/llvm-project/pull/79088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Fix argument invalidations in StreamChecker. (PR #79470)

2024-01-26 Thread Balázs Kéri via cfe-commits
@@ -544,6 +545,21 @@ const ExplodedNode *StreamChecker::getAcquisitionSite(const ExplodedNode *N, return nullptr; } +static ProgramStateRef +escapeArgs(ProgramStateRef State, CheckerContext &C, const CallEvent &Call, + const SmallVector &EscapingArgs) { + const a

[lldb] [clang-tools-extra] [clang] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-26 Thread Erich Keane via cfe-commits
@@ -8129,29 +8067,133 @@ Sema::BuildExpressionFromIntegralTemplateArgument(const TemplateArgument &Arg, else Kind = CharacterLiteralKind::Ascii; -E = new (Context) CharacterLiteral(Arg.getAsIntegral().getZExtValue(), - Kind,

[clang] [clang-tools-extra] [llvm] [SeperateConstOffsetFromGEP] Handle `or disjoint` flags (PR #76997)

2024-01-26 Thread Krzysztof Drewniak via cfe-commits
https://github.com/krzysz00 edited https://github.com/llvm/llvm-project/pull/76997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] [SeperateConstOffsetFromGEP] Handle `or disjoint` flags (PR #76997)

2024-01-26 Thread Krzysztof Drewniak via cfe-commits
https://github.com/krzysz00 closed https://github.com/llvm/llvm-project/pull/76997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Unbreak [[clang::suppress]] on checkers without decl-with-issue. (PR #79398)

2024-01-26 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/79398 ___ 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-01-26 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,28 @@ +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fcxx-exceptions -verify %s + +#if !__has_builtin(__builtin_verbose_trap) +#error +#endif + +constexpr char const* constMsg1 = "hello"; +char const* const constMsg2 = "hello"; +char const constMsg3[] = "hello"; + +templ

[clang] [clang][analyzer] Fix argument invalidations in StreamChecker. (PR #79470)

2024-01-26 Thread Balazs Benics via cfe-commits
@@ -544,6 +545,21 @@ const ExplodedNode *StreamChecker::getAcquisitionSite(const ExplodedNode *N, return nullptr; } +static ProgramStateRef +escapeArgs(ProgramStateRef State, CheckerContext &C, const CallEvent &Call, + const SmallVector &EscapingArgs) { + const a

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

2024-01-26 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,28 @@ +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fcxx-exceptions -verify %s + +#if !__has_builtin(__builtin_verbose_trap) +#error +#endif + +constexpr char const* constMsg1 = "hello"; +char const* const constMsg2 = "hello"; +char const constMsg3[] = "hello"; + +templ

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

2024-01-26 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak edited https://github.com/llvm/llvm-project/pull/79230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Fix argument invalidations in StreamChecker. (PR #79470)

2024-01-26 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/79470 From dbd9af4e77c34fcf6ce82f226f7dbf836033a8f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Thu, 25 Jan 2024 17:50:42 +0100 Subject: [PATCH 1/2] [clang][analyzer] Fix argument invalida

[llvm] [clang] [AArch64][TargetParser] Add mcpu alias for Microsoft Azure Cobalt 100. (PR #79614)

2024-01-26 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/79614 With a690e86 we added -mcpu/mtune=native support to handle the Microsoft Azure Cobalt 100 CPU as a Neoverse N2. This patch adds a CPU alias in TargetParser to maintain compatibility with GCC. >From 3586485f359

[llvm] [clang] [AArch64][TargetParser] Add mcpu alias for Microsoft Azure Cobalt 100. (PR #79614)

2024-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alexandros Lamprineas (labrinea) Changes With a690e86 we added -mcpu/mtune=native support to handle the Microsoft Azure Cobalt 100 CPU as a Neoverse N2. This patch adds a CPU alias in TargetParser to maintain compatibility with GCC. ---

[clang] [WIP] Try to fix GH73418 (PR #79568)

2024-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/79568 >From 386c17d55f68155b711672f87d803eb934372a70 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 26 Jan 2024 18:03:37 +0800 Subject: [PATCH] [Concepts] Traverse the instantiation chain for parameter injecti

[llvm] [clang] [AArch64][TargetParser] Add mcpu alias for Microsoft Azure Cobalt 100. (PR #79614)

2024-01-26 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 f6290e0daf5aff7132cab097fb13aad8a20ad070 3586485f35963b382b95ad566917c26f59e5a0bd --

[clang] [Concepts] Traverse the instantiation chain for parameter injection inside a constraint scope (PR #79568)

2024-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/79568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Concepts] Traverse the instantiation chain for parameter injection inside a constraint scope (PR #79568)

2024-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/79568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2024-01-26 Thread Vladislav Dzhidzhoev via cfe-commits
dzhidzhoev wrote: > Hmmm, that's unexpected -- I reverted the revert (tree here, contains one > unrelated commit: > https://github.com/jmorse/llvm-project/tree/reapply-localvars-patch) and > rebuilt. The assertion-failure occurs just with `llc foobar.ll -o out.o > -filetype=obj`, where foobar

[clang] c177507 - [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (#70053)

2024-01-26 Thread via cfe-commits
Author: isuckatcs Date: 2024-01-26T17:19:11+01:00 New Revision: c177507bd2778d69ed918798295d625346ac6ff4 URL: https://github.com/llvm/llvm-project/commit/c177507bd2778d69ed918798295d625346ac6ff4 DIFF: https://github.com/llvm/llvm-project/commit/c177507bd2778d69ed918798295d625346ac6ff4.diff LOG

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-26 Thread via cfe-commits
https://github.com/isuckatcs closed https://github.com/llvm/llvm-project/pull/70053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support C++20 Modules in clang-repl (PR #79261)

2024-01-26 Thread Nathan Chancellor via cfe-commits
nathanchance wrote: @vgvassilev Yes, it appears so, I tried one of the examples from [the documentation](https://clang.llvm.org/docs/ClangRepl.html) since I have no prior experience with `clang-repl`. ``` $ clang-repl --version LLVM (http://llvm.org/): LLVM version 19.0.0git Optimized buil

[lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-26 Thread Andrey Ali Khan Bolshakov via cfe-commits
@@ -8129,29 +8067,133 @@ Sema::BuildExpressionFromIntegralTemplateArgument(const TemplateArgument &Arg, else Kind = CharacterLiteralKind::Ascii; -E = new (Context) CharacterLiteral(Arg.getAsIntegral().getZExtValue(), - Kind,

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

2024-01-26 Thread Paul T Robinson via cfe-commits
@@ -0,0 +1,28 @@ +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fcxx-exceptions -verify %s + +#if !__has_builtin(__builtin_verbose_trap) +#error +#endif + +constexpr char const* constMsg1 = "hello"; +char const* const constMsg2 = "hello"; +char const constMsg3[] = "hello"; + +templ

[clang] [llvm] [clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-26 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,195 @@ +//===--- UseStdMinMaxCheck.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] [clang-tools-extra] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-26 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,195 @@ +//===--- UseStdMinMaxCheck.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] 67c1c1d - [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (#68919)

2024-01-26 Thread via cfe-commits
Author: Nemanja Ivanovic Date: 2024-01-26T11:24:50-05:00 New Revision: 67c1c1dbb6cd473ce302079d0b3791ff461b7bba URL: https://github.com/llvm/llvm-project/commit/67c1c1dbb6cd473ce302079d0b3791ff461b7bba DIFF: https://github.com/llvm/llvm-project/commit/67c1c1dbb6cd473ce302079d0b3791ff461b7bba.di

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2024-01-26 Thread Lei Huang via cfe-commits
https://github.com/lei137 closed https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-26 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,195 @@ +//===--- UseStdMinMaxCheck.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] [llvm] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-26 Thread Bhuminjay Soni via cfe-commits
https://github.com/11happy edited https://github.com/llvm/llvm-project/pull/77816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clangd] Add CodeAction to swap operands to binary operators (PR #78999)

2024-01-26 Thread Tor Shepherd via cfe-commits
@@ -0,0 +1,210 @@ +//===--- SwapBinaryOperands.cpp --*- C++-*-===// +// +// 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

[compiler-rt] [flang] [clang] [libc] [lldb] [clang-tools-extra] [llvm] LLDB Debuginfod usage tests (with fixes) (PR #79181)

2024-01-26 Thread Jonas Devlieghere via cfe-commits
@@ -0,0 +1,65 @@ +# Tests for basic Debuginfod functionality + +Because the Debuginfod protocol is a simple HTTP path-based system, one can +mimic a Debuginfod server by setting up a directory structure to reflect the +protocol properly. That's how all these tests operate. We over

[lldb] [clang] [flang] [libc] [llvm] [clang-tools-extra] [compiler-rt] LLDB Debuginfod usage tests (with fixes) (PR #79181)

2024-01-26 Thread Jonas Devlieghere via cfe-commits
https://github.com/JDevlieghere edited https://github.com/llvm/llvm-project/pull/79181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [clang-tools-extra] [compiler-rt] [llvm] [clang] [flang] [libc] LLDB Debuginfod usage tests (with fixes) (PR #79181)

2024-01-26 Thread Jonas Devlieghere via cfe-commits
https://github.com/JDevlieghere commented: I'm wondering if shell test are really the best way to test this. For more complex scenarios like are being tested here, we generally prefer [1] API tests because they're more expressive and allow you to build more complicated test binaries with our M

[llvm] [clang-tools-extra] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-26 Thread Bhuminjay Soni via cfe-commits
11happy wrote: ``` if (isa(S) && !found) { const auto CastKind = cast(S)->getCastKind(); if (isImplicitCastType(CastKind)) { found = true; const clang::ImplicitCastExpr *ImplicitCast = cast(S); GlobalImplicitCastType = ImplicitCast->getType();

[clang] [Concepts] Traverse the instantiation chain for parameter injection inside a constraint scope (PR #79568)

2024-01-26 Thread Younan Zhang via cfe-commits
zyn0217 wrote: In passing, the current strategy of preserving trailing requires expressions in `TransformLambdaExpr` confuses me: https://github.com/llvm/llvm-project/blob/f13aac6517532bd1ec016d432c23e92ab6450313/clang/lib/Sema/TreeTransform.h#L13686-L13692 Is there a reason why we decided *no

[lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-26 Thread Erich Keane via cfe-commits
@@ -8129,29 +8067,133 @@ Sema::BuildExpressionFromIntegralTemplateArgument(const TemplateArgument &Arg, else Kind = CharacterLiteralKind::Ascii; -E = new (Context) CharacterLiteral(Arg.getAsIntegral().getZExtValue(), - Kind,

[clang] [RISCV][clang] Add Zvfbfwma C intrinsics support (PR #79615)

2024-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brandon Wu (4vtomat) Changes --- Patch is 204.88 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/79615.diff 5 Files Affected: - (modified) clang/include/clang/Basic/riscv_vector.td (+14) -

[clang-tools-extra] silence clang-tidy warning (llvm-qualified-auto) (PR #79617)

2024-01-26 Thread via cfe-commits
https://github.com/Nour1248 created https://github.com/llvm/llvm-project/pull/79617 None >From e2d4da78892a6b62ca7243ef232a4a6d8fdd9bb5 Mon Sep 17 00:00:00 2001 From: Nour Fouad Date: Fri, 26 Jan 2024 18:45:56 +0200 Subject: [PATCH] fix clang-tidy(llvm-qualified-auto) --- clang-tools-extra/c

[clang-tools-extra] silence clang-tidy warning (llvm-qualified-auto) (PR #79617)

2024-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (Nour1248) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/79617.diff 1 Files Affected: - (modified) clang-tools-extra/clangd/AST.cpp (+1-1) ``diff diff --git a/clang-tools-extra/clangd/AST.

[clang] [RISCV][clang] Add Zvfbfmin C intrinsics support (PR #79618)

2024-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Brandon Wu (4vtomat) Changes --- Patch is 137.83 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/79618.diff 9 Files Affected: - (modified) clang/include/clang/Basic/riscv_vector.td

[clang] [Concepts] Traverse the instantiation chain for parameter injection inside a constraint scope (PR #79568)

2024-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/79568 >From 386c17d55f68155b711672f87d803eb934372a70 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 26 Jan 2024 18:03:37 +0800 Subject: [PATCH 1/2] [Concepts] Traverse the instantiation chain for parameter inj

[llvm] [clang-tools-extra] ValueTracking: Merge fcmpImpliesClass and fcmpToClassTest (PR #66522)

2024-01-26 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/66522 >From 076ab2374d84c4112e0bf3fb11ecda2f5774785e Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 11 Sep 2023 10:56:40 +0300 Subject: [PATCH 1/7] ValueTracking: Merge fcmpImpliesClass and fcmpToClassTest --

[clang] [lldb] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-26 Thread Andrey Ali Khan Bolshakov via cfe-commits
@@ -8129,29 +8067,133 @@ Sema::BuildExpressionFromIntegralTemplateArgument(const TemplateArgument &Arg, else Kind = CharacterLiteralKind::Ascii; -E = new (Context) CharacterLiteral(Arg.getAsIntegral().getZExtValue(), - Kind,

[clang] 463529f - [OpenACC] Implement 'tile' clause parsing

2024-01-26 Thread via cfe-commits
Author: erichkeane Date: 2024-01-26T08:53:51-08:00 New Revision: 463529f31b90c9bc8c564a2071748683af166f11 URL: https://github.com/llvm/llvm-project/commit/463529f31b90c9bc8c564a2071748683af166f11 DIFF: https://github.com/llvm/llvm-project/commit/463529f31b90c9bc8c564a2071748683af166f11.diff LO

[clang] [mlir] [compiler-rt] [libunwind] [flang] [lldb] [llvm] [clang-tools-extra] [openmp] [lld] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

2024-01-26 Thread Evgenii Kudriashov via cfe-commits
@@ -0,0 +1,80 @@ +; RUN: llc -mtriple=x86_64-pc-windows-msvc %s e-kud wrote: It seems we still have this file on `avx512-intel64` worker: https://lab.llvm.org/buildbot/#/builders/258/builds/12970 https://lab.llvm.org/buildbot/#/builders/258/builds/12971 https://

[flang] [clang-tools-extra] [clang] [llvm] [flang] add SYSTEM runtime and lowering intrinsics support (PR #74309)

2024-01-26 Thread Tom Eccles via cfe-commits
@@ -1393,6 +1393,11 @@ static const IntrinsicInterface intrinsicSubroutine[]{ {"get", DefaultInt, Rank::vector, Optionality::optional, common::Intent::Out}}, {}, Rank::elemental, IntrinsicClass::impureSubroutine}, +{"system", +{{"

[clang] [llvm] [flang] [clang-tools-extra] [flang] add SYSTEM runtime and lowering intrinsics support (PR #74309)

2024-01-26 Thread Tom Eccles via cfe-commits
https://github.com/tblah commented: Thanks for your work so far. I have a few questions https://github.com/llvm/llvm-project/pull/74309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [llvm] [clang-tools-extra] [flang] add SYSTEM runtime and lowering intrinsics support (PR #74309)

2024-01-26 Thread Tom Eccles via cfe-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/74309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [flang] [clang] [flang] add SYSTEM runtime and lowering intrinsics support (PR #74309)

2024-01-26 Thread Tom Eccles via cfe-commits
@@ -5934,6 +5938,40 @@ IntrinsicLibrary::genSum(mlir::Type resultType, resultType, args); } +// SYSTEM +void IntrinsicLibrary::genSystem(llvm::ArrayRef args) { + assert(args.size() == 2); + mlir::Value command = fir::getBase(args[0]); + const fir::Exte

[clang] [llvm] [flang] [clang-tools-extra] [flang] add SYSTEM runtime and lowering intrinsics support (PR #74309)

2024-01-26 Thread Tom Eccles via cfe-commits
@@ -5934,6 +5938,40 @@ IntrinsicLibrary::genSum(mlir::Type resultType, resultType, args); } +// SYSTEM +void IntrinsicLibrary::genSystem(llvm::ArrayRef args) { + assert(args.size() == 2); + mlir::Value command = fir::getBase(args[0]); + const fir::Exte

[clang-tools-extra] [clang] [flang] [llvm] [flang] add SYSTEM runtime and lowering intrinsics support (PR #74309)

2024-01-26 Thread Tom Eccles via cfe-commits
@@ -5934,6 +5938,40 @@ IntrinsicLibrary::genSum(mlir::Type resultType, resultType, args); } +// SYSTEM +void IntrinsicLibrary::genSystem(llvm::ArrayRef args) { + assert(args.size() == 2); + mlir::Value command = fir::getBase(args[0]); + const fir::Exte

[flang] [clang-tools-extra] [clang] [llvm] [flang] add SYSTEM runtime and lowering intrinsics support (PR #74309)

2024-01-26 Thread Tom Eccles via cfe-commits
@@ -5934,6 +5938,40 @@ IntrinsicLibrary::genSum(mlir::Type resultType, resultType, args); } +// SYSTEM +void IntrinsicLibrary::genSystem(llvm::ArrayRef args) { + assert(args.size() == 2); + mlir::Value command = fir::getBase(args[0]); + const fir::Exte

[clang] [NFC][IdentifierInfo] Use llvm::Bitfield for the bitfield (PR #79366)

2024-01-26 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > It shouldn't be necessary to analyze uint64_t Storage directly through a > debugger. It's handled via the Bitfield getters and setters. Is that not > sufficient for debugging purposes? Unfortunately, it's not. Not every debugger can run getters while displaying the value (e.g

[clang] [llvm] [AArch64][TargetParser] Add mcpu alias for Microsoft Azure Cobalt 100. (PR #79614)

2024-01-26 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/79614 >From e2fe85fb1615abc6e3e82788e7ff26abe329ceeb Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Fri, 26 Jan 2024 10:28:19 + Subject: [PATCH] [AArch64][TargetParser] Add mcpu alias for Microsoft Azu

[clang-tools-extra] [libc] [clang] [flang] [llvm] [compiler-rt] [X86] Do not end 'note.gnu.property' section with -fcf-protection (PR #79360)

2024-01-26 Thread Adhemerval Zanella via cfe-commits
https://github.com/zatrazz updated https://github.com/llvm/llvm-project/pull/79360 >From 240ec1a6b9dda5e6c625e096c52d70eb6458180b Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Wed, 24 Jan 2024 16:49:30 -0300 Subject: [PATCH] [X86] Do not end 'note.gnu.property' section with -fcf-prot

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-26 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm requested changes to this pull request. https://github.com/llvm/llvm-project/pull/77936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-26 Thread Sander de Smalen via cfe-commits
@@ -814,6 +821,93 @@ Address AArch64ABIInfo::EmitMSVAArg(CodeGenFunction &CGF, Address VAListAddr, /*allowHigherAlign*/ false); } +class SMEAttributes { +public: + bool IsStreaming = false; + bool IsStreamingBody = false; + bool IsStreamingCompati

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-26 Thread Sander de Smalen via cfe-commits
sdesmalen-arm wrote: These changes are no longer necessary? https://github.com/llvm/llvm-project/pull/77936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-26 Thread Sander de Smalen via cfe-commits
@@ -279,6 +279,12 @@ def err_builtin_needs_feature : Error<"%0 needs target feature %1">; def err_function_needs_feature : Error< "always_inline function %1 requires target feature '%2', but would " "be inlined into function %0 that is compiled without support for '%2'">;

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-26 Thread Sander de Smalen via cfe-commits
@@ -31,6 +31,7 @@ set(LLVM_LINK_COMPONENTS Target TargetParser TransformUtils + AArch64Utils sdesmalen-arm wrote: This change is no longer necessary? https://github.com/llvm/llvm-project/pull/77936 ___ cfe-co

[llvm] [clang] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-26 Thread Sander de Smalen via cfe-commits
@@ -15,13 +15,13 @@ #define LLVM_LIB_TARGET_AARCH64_AARCH64ISELLOWERING_H #include "AArch64.h" -#include "Utils/AArch64SMEAttributes.h" #include "llvm/CodeGen/CallingConvLower.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/SelectionDAG.h" #include "llv

[llvm] [clang] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-26 Thread Sander de Smalen via cfe-commits
@@ -814,6 +821,93 @@ Address AArch64ABIInfo::EmitMSVAArg(CodeGenFunction &CGF, Address VAListAddr, /*allowHigherAlign*/ false); } +class SMEAttributes { +public: + bool IsStreaming = false; + bool IsStreamingBody = false; + bool IsStreamingCompati

[llvm] [clang] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-26 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/77936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang] [lldb] [clang-tools-extra] [libc] [flang] [llvm] LLDB Debuginfod usage tests (with fixes) (PR #79181)

2024-01-26 Thread Kevin Frei via cfe-commits
kevinfrei wrote: > I'm wondering if shell test are really the best way to test this. For more > complex scenarios like are being tested here, we generally prefer [1] API > tests because they're more expressive and allow you to build more complicated > test binaries with our Makefile system. Th

[clang] 36b4a9c - [Driver,CodeGen] Support -mtls-dialect= (#79256)

2024-01-26 Thread via cfe-commits
Author: Fangrui Song Date: 2024-01-26T09:25:38-08:00 New Revision: 36b4a9ccd9f7e04010476e6b2a311f2052a4ac20 URL: https://github.com/llvm/llvm-project/commit/36b4a9ccd9f7e04010476e6b2a311f2052a4ac20 DIFF: https://github.com/llvm/llvm-project/commit/36b4a9ccd9f7e04010476e6b2a311f2052a4ac20.diff

[compiler-rt] [lldb] [clang] [mlir] [libcxx] [clang-tools-extra] [libc] [lld] [libunwind] [flang] [llvm] [Driver,CodeGen] Support -mtls-dialect= (PR #79256)

2024-01-26 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/79256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] fix assert fail due to offset overflow (PR #79084)

2024-01-26 Thread Balázs Kéri via cfe-commits
@@ -9896,9 +9903,13 @@ Expected ASTImporter::Import(FileID FromID, bool IsBuiltin) { // FIXME: The filename may be a virtual name that does probably not // point to a valid file and we get no Entry here. In this case try with // the memory buffer below

[clang] [clang][ASTImporter] fix assert fail due to offset overflow (PR #79084)

2024-01-26 Thread Balázs Kéri via cfe-commits
@@ -9896,9 +9903,13 @@ Expected ASTImporter::Import(FileID FromID, bool IsBuiltin) { // FIXME: The filename may be a virtual name that does probably not // point to a valid file and we get no Entry here. In this case try with // the memory buffer below

[clang] [Concepts] Traverse the instantiation chain for parameter injection inside a constraint scope (PR #79568)

2024-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/79568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   >