[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-18 Thread Kees Cook via cfe-commits
@@ -1,13 +1,158 @@ -// RUN: %clang_cc1 %s -verify=c -fsyntax-only -// RUN: %clang_cc1 %s -verify -fsyntax-only -x c++ -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -x c++ +// RUN: %clang_cc1 %s

[clang] [analyzer] Allow egraph rewriter not to open the generated HTML directly (PR #85515)

2024-03-18 Thread Ella Ma via cfe-commits
Snape3058 wrote: Updated as suggested. https://github.com/llvm/llvm-project/pull/85515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-18 Thread Kees Cook via cfe-commits
https://github.com/kees updated https://github.com/llvm/llvm-project/pull/84428 >From eb5138b45fa450737600050ad8dabdcb27513d42 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Thu, 7 Mar 2024 17:03:09 -0800 Subject: [PATCH 1/3] [Clang][Sema]: Allow flexible arrays in unions and alone in structs

[clang] [analyzer] Allow egraph rewriter not to open the generated HTML directly (PR #85515)

2024-03-18 Thread Ella Ma via cfe-commits
@@ -1186,6 +1192,14 @@ def main(): "displaying it, dump the rewritten dot file " "to stdout", ) +dump_conflict.add_argument( +"--dump-html-only", +action="store_const", +dest="dump_html_only", +const=True, +

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-18 Thread Kees Cook via cfe-commits
https://github.com/kees edited https://github.com/llvm/llvm-project/pull/84428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-18 Thread Kees Cook via cfe-commits
@@ -1,13 +1,158 @@ -// RUN: %clang_cc1 %s -verify=c -fsyntax-only -// RUN: %clang_cc1 %s -verify -fsyntax-only -x c++ -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -x c++ +// RUN: %clang_cc1 %s

[clang] [analyzer] Allow egraph rewriter not to open the generated HTML directly (PR #85515)

2024-03-18 Thread Ella Ma via cfe-commits
@@ -479,12 +479,15 @@ def add_raw_line(self, raw_line): # A visitor that dumps the ExplodedGraph into a DOT file with fancy HTML-based # syntax highlighing. class DotDumpVisitor: -def __init__(self, do_diffs, dark_mode, gray_mode, topo_mode, dump_dot_only): +def

[clang] [analyzer] Allow egraph rewriter not to open the generated HTML directly (PR #85515)

2024-03-18 Thread Ella Ma via cfe-commits
@@ -479,12 +479,15 @@ def add_raw_line(self, raw_line): # A visitor that dumps the ExplodedGraph into a DOT file with fancy HTML-based # syntax highlighing. class DotDumpVisitor: -def __init__(self, do_diffs, dark_mode, gray_mode, topo_mode, dump_dot_only): +def

[clang] [analyzer] Allow egraph rewriter not to open the generated HTML directly (PR #85515)

2024-03-18 Thread Ella Ma via cfe-commits
https://github.com/Snape3058 edited https://github.com/llvm/llvm-project/pull/85515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Allow egraph rewriter not to open the generated HTML directly (PR #85515)

2024-03-18 Thread Ella Ma via cfe-commits
https://github.com/Snape3058 updated https://github.com/llvm/llvm-project/pull/85515 >From 1d37cd1a7dac2ddb05fdcf125483991b3ac645d8 Mon Sep 17 00:00:00 2001 From: Ella Ma Date: Sat, 16 Mar 2024 18:25:12 +0800 Subject: [PATCH 1/3] allow egraph rewriter not to open html directly ---

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-03-18 Thread Evan Wilde via cfe-commits
https://github.com/etcwilde updated https://github.com/llvm/llvm-project/pull/82084 >From 9e665d05743022350e06f4ea357ecfecde82efb8 Mon Sep 17 00:00:00 2001 From: Evan Wilde Date: Fri, 16 Feb 2024 16:39:10 -0800 Subject: [PATCH] Support sysroot-relative header search paths Clang supported

[clang] [NFC] Refactor ConstantArrayType size storage (PR #85716)

2024-03-18 Thread Timm Baeder via cfe-commits
@@ -3182,34 +3182,98 @@ class ArrayType : public Type, public llvm::FoldingSetNode { /// For example, the canonical type for 'int A[4 + 4*100]' is a /// ConstantArrayType where the element type is 'int' and the size is 404. class ConstantArrayType final -: public

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-18 Thread Wang Pengcheng via cfe-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/76357 >From 28000eb88b54b02993107d4f222acc5d733c623f Mon Sep 17 00:00:00 2001 From: wangpc Date: Mon, 25 Dec 2023 18:52:36 +0800 Subject: [PATCH 1/3] [RISCV] Support RISC-V Profiles in -march option This PR

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

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

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-18 Thread Wang Pengcheng via cfe-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/76357 >From 28000eb88b54b02993107d4f222acc5d733c623f Mon Sep 17 00:00:00 2001 From: wangpc Date: Mon, 25 Dec 2023 18:52:36 +0800 Subject: [PATCH 1/2] [RISCV] Support RISC-V Profiles in -march option This PR

[clang] [clang-format][NFC] Eliminate the IsCpp parameter in all functions (PR #84599)

2024-03-18 Thread Owen Pan via cfe-commits
owenca wrote: Can you provide more info about the failed use cases? https://github.com/llvm/llvm-project/pull/84599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix clang-format issue with 'new' and 'delete' keywords in C files (PR #85470)

2024-03-18 Thread Owen Pan via cfe-commits
@@ -11450,6 +11450,11 @@ TEST_F(FormatTest, UnderstandsNewAndDelete) { "void new (link p);\n" "void delete (link p);"); + verifyFormat("{ p->delete(); }\n" + "{ p->new(); }", + "{ p->delete (); }\n" + "{

[clang] a2527e0 - [clang-format] Put erroneously removed braces back into a unit test

2024-03-18 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-03-18T20:22:42-07:00 New Revision: a2527e06d77766d00e83ecb7988844aae7088bb1 URL: https://github.com/llvm/llvm-project/commit/a2527e06d77766d00e83ecb7988844aae7088bb1 DIFF: https://github.com/llvm/llvm-project/commit/a2527e06d77766d00e83ecb7988844aae7088bb1.diff

[clang] [X86_64] fix arg pass error in struct. (PR #85394)

2024-03-18 Thread Longsheng Mou via cfe-commits
https://github.com/CoTinker updated https://github.com/llvm/llvm-project/pull/85394 >From 57760b2bfe87c689030975d5914393fd29d7d1f5 Mon Sep 17 00:00:00 2001 From: Longsheng Mou Date: Fri, 15 Mar 2024 20:50:54 +0800 Subject: [PATCH] [X86_64] fix arg pass error in struct. typedef long long ll

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-18 Thread Qizhi Hu via cfe-commits
@@ -13714,6 +13714,12 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { // Capturing 'this' is trivial. if (C->capturesThis()) { + // We need ThisType when build capture in CheckCXXThisCapture. jcsxky wrote: Thanks for your patience!

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-18 Thread Harald van Dijk via cfe-commits
@@ -1,13 +1,158 @@ -// RUN: %clang_cc1 %s -verify=c -fsyntax-only -// RUN: %clang_cc1 %s -verify -fsyntax-only -x c++ -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -x c++ +// RUN: %clang_cc1 %s

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-18 Thread via cfe-commits
Sirraide wrote: CI for the docs seems to be broken because of something clang-format related; the changes to the docs here are trivial, so we should just be able to ignore that. https://github.com/llvm/llvm-project/pull/85565 ___ cfe-commits mailing

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

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

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-18 Thread via cfe-commits
@@ -13714,6 +13714,12 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { // Capturing 'this' is trivial. if (C->capturesThis()) { + // We need ThisType when build capture in CheckCXXThisCapture. Sirraide wrote: No problem—writing

[clang] [clang] Add `__has_extension(swiftcc)` support (PR #85347)

2024-03-18 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. Might be nice to have a test for `swiftasynccc` as well. https://github.com/llvm/llvm-project/pull/85347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-18 Thread Kees Cook via cfe-commits
@@ -1,13 +1,158 @@ -// RUN: %clang_cc1 %s -verify=c -fsyntax-only -// RUN: %clang_cc1 %s -verify -fsyntax-only -x c++ -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -x c++ +// RUN: %clang_cc1 %s

[libclc] [libclc] implemented a suggestion to avoid magic numbers (PR #85724)

2024-03-18 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you,

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-18 Thread Qizhi Hu via cfe-commits
@@ -13714,6 +13714,12 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { // Capturing 'this' is trivial. if (C->capturesThis()) { + // We need ThisType when build capture in CheckCXXThisCapture. jcsxky wrote: Ah, I see. I didn't realize to

[libclc] [libclc] implemented a suggestion to avoid magic numbers (PR #85724)

2024-03-18 Thread via cfe-commits
https://github.com/matrixication created https://github.com/llvm/llvm-project/pull/85724 None >From 17d806c308a7835aeb52aeb347bbfa1e3b135275 Mon Sep 17 00:00:00 2001 From: Matrix Date: Tue, 19 Mar 2024 00:59:06 + Subject: [PATCH] [libclc] implemented a suggestion to avoid magic numbers

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-18 Thread via cfe-commits
github-actions[bot] wrote: @alexcrichton 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

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-18 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode closed https://github.com/llvm/llvm-project/pull/84569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d66121d - [WebAssembly] Change the default linker for `wasm32-wasip2` (#84569)

2024-03-18 Thread via cfe-commits
Author: Alex Crichton Date: 2024-03-18T17:55:34-07:00 New Revision: d66121d74a458e098511b9de920d815440acaa1b URL: https://github.com/llvm/llvm-project/commit/d66121d74a458e098511b9de920d815440acaa1b DIFF: https://github.com/llvm/llvm-project/commit/d66121d74a458e098511b9de920d815440acaa1b.diff

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-18 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/85565 >From b286dcfb2ae59d650e6b49fee97f159e2e958dcc Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 17 Mar 2024 17:48:05 +0800 Subject: [PATCH] [Clang][Sema] Fix a crash in lambda instantiation ---

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-18 Thread Kees Cook via cfe-commits
@@ -1,13 +1,158 @@ -// RUN: %clang_cc1 %s -verify=c -fsyntax-only -// RUN: %clang_cc1 %s -verify -fsyntax-only -x c++ -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -x c++ +// RUN: %clang_cc1 %s

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-18 Thread Kees Cook via cfe-commits
@@ -1,13 +1,158 @@ -// RUN: %clang_cc1 %s -verify=c -fsyntax-only -// RUN: %clang_cc1 %s -verify -fsyntax-only -x c++ -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -x c++ +// RUN: %clang_cc1 %s

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-03-18 Thread via cfe-commits
@@ -6375,12 +6383,16 @@ ExprResult Sema::BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field) { ImmediateCallVisitor V(getASTContext()); if (!NestedDefaultChecking) V.TraverseDecl(Field); - if (V.HasImmediateCalls) { + if (V.HasImmediateCalls ||

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-18 Thread via cfe-commits
@@ -0,0 +1,24 @@ +/// attribute parsing error cases. + +// RUN: not llvm-mc -triple=hexagon -filetype=asm %s 2>&1 \ +// RUN: | FileCheck %s + + .attribute Tag_unknown_name, 0 +// CHECK: error: attribute name not recognized: Tag_unknown_name quic-areg wrote:

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-18 Thread via cfe-commits
@@ -251,7 +251,10 @@ StringRef llvm::object::getELFSectionTypeName(uint32_t Machine, unsigned Type) { } break; case ELF::EM_HEXAGON: -switch (Type) { STRINGIFY_ENUM_CASE(ELF, SHT_HEX_ORDERED); } +switch (Type) { + STRINGIFY_ENUM_CASE(ELF,

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-18 Thread via cfe-commits
@@ -0,0 +1,20 @@ +/// Enabled by default for assembly +// RUN: %clang -target hexagon-unknown-elf -### %s 2>&1 \ +// RUN:| FileCheck %s -check-prefix CHECK-ENABLED + +/// Can be forced on or off for assembly. +// RUN: %clang -target hexagon-unknown-elf -### %s 2>&1

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-18 Thread via cfe-commits
@@ -395,7 +396,8 @@ template class ELFObjectFile : public ELFObjectFileBase { for (const Elf_Shdr : *SectionsOrErr) { if (Sec.sh_type == ELF::SHT_ARM_ATTRIBUTES || - Sec.sh_type == ELF::SHT_RISCV_ATTRIBUTES) { + Sec.sh_type ==

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-18 Thread via cfe-commits
@@ -652,6 +660,57 @@ bool HexagonAsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned , return finishBundle(IDLoc, Out); return false; } +/// parseDirectiveAttribute +/// ::= .attribute int, int +/// ::= .attribute Tag_name, int +bool

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-18 Thread Craig Topper via cfe-commits
@@ -244,6 +249,42 @@ static const RISCVSupportedExtension SupportedExperimentalExtensions[] = { }; // clang-format on +static const RISCVProfile SupportedProfiles[] = { topperc wrote: `const` -> `constexpr` to be sure the StringLiteral constexpr constructor

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-18 Thread via cfe-commits
@@ -79,7 +80,8 @@ static cl::opt ErrorNoncontigiousRegister( "merror-noncontigious-register", cl::desc("Error for register names that aren't contigious"), cl::init(false)); - +static cl::opt AddBuildAttributes("hexagon-add-build-attributes", +

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-18 Thread via cfe-commits
@@ -0,0 +1,20 @@ +/// Enabled by default for assembly +// RUN: %clang -target hexagon-unknown-elf -### %s 2>&1 \ quic-areg wrote: Done https://github.com/llvm/llvm-project/pull/85359 ___ cfe-commits mailing list

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-18 Thread via cfe-commits
https://github.com/quic-areg updated https://github.com/llvm/llvm-project/pull/85359 >From 997c2741ce4ca85e5e23d7e73b6894fd07b79b8d Mon Sep 17 00:00:00 2001 From: quic-areg Date: Thu, 14 Mar 2024 20:31:37 -0700 Subject: [PATCH 1/3] [Hexagon] ELF attributes for Hexagon Defines a subset of

[clang] [NFC] Refactor ConstantArrayType size storage (PR #85716)

2024-03-18 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 4841858862df4b8ac4ac68922086f03c8bbd3dc2 4a11a73b4dd41637b1d730489954c2994489d6be --

[clang] [NFC] Refactor ConstantArrayType size storage (PR #85716)

2024-03-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-backend-arm Author: Chris B (llvm-beanz) Changes In PR #79382, I need to add a new type that derives from ConstantArrayType. This means that ConstantArrayType can no longer use

[clang] [NFC] Refactor ConstantArrayType size storage (PR #85716)

2024-03-18 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/85716 In PR #79382, I need to add a new type that derives from ConstantArrayType. This means that ConstantArrayType can no longer use `llvm::TrailingObjects` to store the trailing optional Expr*. This change

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

2024-03-18 Thread Dan Liew via cfe-commits
@@ -3424,6 +3445,26 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation *CGDebugInfo::CreateTrapFailureMessageFor( delcypher wrote: @dwblaikie We

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

2024-03-18 Thread Dan Liew via cfe-commits
https://github.com/delcypher deleted 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] Add support for builtin_verbose_trap (PR #79230)

2024-03-18 Thread Dan Liew via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++20 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s delcypher wrote: @ahatanak Any follow up? https://github.com/llvm/llvm-project/pull/79230

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

2024-03-18 Thread Dan Liew via cfe-commits
@@ -602,6 +613,19 @@ class CGDebugInfo { return CoroutineParameterMappings; } + // Create a debug location from `TrapLocation` that adds an artificial inline + // frame where the frame name is + // + // * `: ` if `` is not empty. + // * `` if `` is empty. Note ``

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

2024-03-18 Thread Dan Liew via cfe-commits
@@ -346,6 +348,15 @@ class CGDebugInfo { const FieldDecl *BitFieldDecl, const llvm::DIDerivedType *BitFieldDI, llvm::ArrayRef PreviousFieldsDI, const RecordDecl *RD); + // A cache that maps artificial inlined function names used for + // __builtin_verbose_trap

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

2024-03-18 Thread Dan Liew via cfe-commits
@@ -346,6 +348,15 @@ class CGDebugInfo { const FieldDecl *BitFieldDecl, const llvm::DIDerivedType *BitFieldDI, llvm::ArrayRef PreviousFieldsDI, const RecordDecl *RD); + // A cache that maps artificial inlined function names used for + // __builtin_verbose_trap

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

2024-03-18 Thread Dan Liew via cfe-commits
@@ -3379,6 +3379,54 @@ Query for this feature with ``__has_builtin(__builtin_debugtrap)``. Query for this feature with ``__has_builtin(__builtin_trap)``. +``__builtin_verbose_trap`` +-- + +``__builtin_verbose_trap`` causes the program to stop its

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

2024-03-18 Thread Dan Liew via cfe-commits
@@ -3379,6 +3379,60 @@ Query for this feature with ``__has_builtin(__builtin_debugtrap)``. Query for this feature with ``__has_builtin(__builtin_trap)``. +``__builtin_verbose_trap`` +-- + +``__builtin_verbose_trap`` causes the program to stop its

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

2024-03-18 Thread Dan Liew via cfe-commits
@@ -3379,6 +3379,57 @@ Query for this feature with ``__has_builtin(__builtin_debugtrap)``. Query for this feature with ``__has_builtin(__builtin_trap)``. +``__builtin_verbose_trap`` +-- + +``__builtin_verbose_trap`` causes the program to stop its

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

2024-03-18 Thread Dan Liew 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"; +

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

2024-03-18 Thread Dan Liew via cfe-commits
https://github.com/delcypher 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] Add support for builtin_verbose_trap (PR #79230)

2024-03-18 Thread Dan Liew via cfe-commits
https://github.com/delcypher requested changes to this pull request. It looks like there are still some unresolved discussions in this PR. https://github.com/llvm/llvm-project/pull/79230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-03-18 Thread Dan Liew via cfe-commits
@@ -3424,6 +3447,24 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation * +CGDebugInfo::CreateTrapFailureMessageFor(llvm::DebugLoc TrapLocation, +

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

2024-03-18 Thread Dan Liew via cfe-commits
@@ -3452,6 +3452,18 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, case Builtin::BI__builtin_trap: EmitTrapCall(Intrinsic::trap); return RValue::get(nullptr); + case Builtin::BI__builtin_verbose_trap: { +llvm::DILocation

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-18 Thread Eli Friedman via cfe-commits
@@ -1,13 +1,158 @@ -// RUN: %clang_cc1 %s -verify=c -fsyntax-only -// RUN: %clang_cc1 %s -verify -fsyntax-only -x c++ -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -x c++ +// RUN: %clang_cc1 %s

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-18 Thread Eli Friedman via cfe-commits
@@ -1,13 +1,158 @@ -// RUN: %clang_cc1 %s -verify=c -fsyntax-only -// RUN: %clang_cc1 %s -verify -fsyntax-only -x c++ -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -x c++ +// RUN: %clang_cc1 %s

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-18 Thread Eli Friedman via cfe-commits
@@ -1,13 +1,158 @@ -// RUN: %clang_cc1 %s -verify=c -fsyntax-only -// RUN: %clang_cc1 %s -verify -fsyntax-only -x c++ -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -x c++ +// RUN: %clang_cc1 %s

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

2024-03-18 Thread Dan Liew via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++20 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s delcypher wrote: Really? We don't test the generated IR in an optimized build? That seems like a bad idea given that code built

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

2024-03-18 Thread Dan Liew via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++20 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s delcypher wrote: Really? We don't test the generated IR in an optimized build? That seems like a bad idea given that code built

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

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

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-18 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/85340 >From 3cdcfa4e63550b9677c8ffe2f33eab85899b2c45 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Thu, 14 Mar 2024 17:04:12 -0700 Subject: [PATCH 1/5] add test --- .../clang/Basic/DiagnosticDriverKinds.td

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-18 Thread Nathan Sidwell via cfe-commits
urnathan wrote: Sorry to push another update, but I realized the LimitOffset computation could be sunk to the point of use, and therefore not computed in all cases. https://github.com/llvm/llvm-project/pull/65742 ___ cfe-commits mailing list

[clang] [Clang] Coroutines: Properly Check if `await_suspend` return type convertible to `std::coroutine_handle<>` (PR #85684)

2024-03-18 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/85684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-03-18 Thread Michael Toguchi via cfe-commits
https://github.com/mdtoguchi approved this pull request. https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][C23] N3006 Underspecified object declarations (PR #79845)

2024-03-18 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -std=c2x -verify %s + +/* WG14 N3006: Full + * Underspecified object declarations + */ + +struct S1 { int x, y; };// expected-note {{previous definition is here}} +union U1 { int a; double b; }; // expected-note {{previous definition

[clang] [Driver,AArch64] Remove AArch32-specific -m[no-]unaligned-access (PR #85441)

2024-03-18 Thread Fangrui Song via cfe-commits
MaskRay wrote: Thanks for the comment. I'll abandon this. https://github.com/llvm/llvm-project/pull/85441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver,AArch64] Remove AArch32-specific -m[no-]unaligned-access (PR #85441)

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

[clang] [llvm] [DXIL] implement dot intrinsic lowering for integers (PR #85662)

2024-03-18 Thread Xiang Li via cfe-commits
https://github.com/python3kgae approved this pull request. https://github.com/llvm/llvm-project/pull/85662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP] clang driver: enable fast unaligned access for Android on RISCV64 (PR #85704)

2024-03-18 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

[clang] [llvm] [DXIL] implement dot intrinsic lowering for integers (PR #85662)

2024-03-18 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/85662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP] clang driver: enable fast unaligned access for Android on RISCV64 (PR #85704)

2024-03-18 Thread via cfe-commits
https://github.com/hiraditya created https://github.com/llvm/llvm-project/pull/85704 Android CTS test already requires fast unaligned access https://android-review.googlesource.com/c/platform/cts/+/2675633 Pending testcase >From e9a5140853eb4a76765189f38fa31ee21be827ef Mon Sep 17 00:00:00

[clang] [llvm] [DXIL] implement dot intrinsic lowering for integers (PR #85662)

2024-03-18 Thread Farzon Lotfi via cfe-commits
@@ -39,11 +39,44 @@ static bool isIntrinsicExpansion(Function ) { case Intrinsic::dx_uclamp: case Intrinsic::dx_lerp: case Intrinsic::dx_rcp: + case Intrinsic::dx_sdot: + case Intrinsic::dx_udot: return true; } return false; } +static bool

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-03-18 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/82084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-18 Thread Kees Cook via cfe-commits
@@ -1,13 +1,58 @@ -// RUN: %clang_cc1 %s -verify=c -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only // RUN: %clang_cc1 %s -verify -fsyntax-only -x c++ -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility // RUN: %clang_cc1 %s -verify -fsyntax-only

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-18 Thread Kees Cook via cfe-commits
https://github.com/kees updated https://github.com/llvm/llvm-project/pull/84428 >From eb5138b45fa450737600050ad8dabdcb27513d42 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Thu, 7 Mar 2024 17:03:09 -0800 Subject: [PATCH 1/2] [Clang][Sema]: Allow flexible arrays in unions and alone in structs

[clang] [llvm] [DXIL] implement dot intrinsic lowering for integers (PR #85662)

2024-03-18 Thread Xiang Li via cfe-commits
@@ -39,11 +39,44 @@ static bool isIntrinsicExpansion(Function ) { case Intrinsic::dx_uclamp: case Intrinsic::dx_lerp: case Intrinsic::dx_rcp: + case Intrinsic::dx_sdot: + case Intrinsic::dx_udot: return true; } return false; } +static bool

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-03-18 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This looks good to me. Thanks for the updates! https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][dataflow] Refactor processing of terminator element (PR #84499)

2024-03-18 Thread Yitzhak Mandelbaum via cfe-commits
@@ -337,26 +274,33 @@ computeBlockInputState(const CFGBlock , AnalysisContext ) { AC.BlockStates[Pred->getBlockID()]; if (!MaybePredState) continue; - -if (AC.Analysis.builtinOptions()) { - if (const Stmt *PredTerminatorStmt =

[clang] [clang][dataflow] Refactor processing of terminator element (PR #84499)

2024-03-18 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand updated https://github.com/llvm/llvm-project/pull/84499 >From 3b20e1823753ab46e3e259d3d8c727dea91ce1d4 Mon Sep 17 00:00:00 2001 From: Yitzhak Mandelbaum Date: Fri, 8 Mar 2024 15:19:14 + Subject: [PATCH 1/2] [clang][dataflow] Refactor processing of terminator

[clang-tools-extra] [clang-tidy] Improved --verify-config when using literal style in config file (PR #85591)

2024-03-18 Thread Danny Mösch via cfe-commits
@@ -454,11 +454,14 @@ static constexpr StringLiteral VerifyConfigWarningEnd = " [-verify-config]\n"; static bool verifyChecks(const StringSet<> , StringRef CheckGlob, StringRef Source) { - llvm::StringRef Cur, Rest; + llvm::StringRef Cur =

[clang-tools-extra] [clang-tidy] Improved --verify-config when using literal style in config file (PR #85591)

2024-03-18 Thread Danny Mösch via cfe-commits
@@ -251,6 +251,9 @@ Miscellaneous option is specified. Now ``clang-apply-replacements`` applies formatting only with the option. +- Fixed ``--verify-check`` option not properly parsing checks when using the + literal operator in the ``.clang-tidy`` config

[clang-tools-extra] [clang-tidy] Improved --verify-config when using literal style in config file (PR #85591)

2024-03-18 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny approved this pull request. Seems like the parsing logic got duplicated. That eventually caused the misbehavior in verification. Alignment would be preferred. From my point of view, the fix is okay for now though. https://github.com/llvm/llvm-project/pull/85591

[clang-tools-extra] [clang-tidy] Improved --verify-config when using literal style in config file (PR #85591)

2024-03-18 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny edited https://github.com/llvm/llvm-project/pull/85591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-18 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/85340 >From 3cdcfa4e63550b9677c8ffe2f33eab85899b2c45 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Thu, 14 Mar 2024 17:04:12 -0700 Subject: [PATCH 1/4] add test --- .../clang/Basic/DiagnosticDriverKinds.td

[clang] [HIP] do not link runtime for -r (PR #85675)

2024-03-18 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/85675 >From 2e0967c0c606ad647185a739442647ab7d90ed52 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Mon, 18 Mar 2024 14:09:56 -0400 Subject: [PATCH] [HIP] do not link runtime for -r since it will cause

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-03-18 Thread Evan Wilde via cfe-commits
@@ -3218,6 +3218,21 @@ static bool ParseHeaderSearchArgs(HeaderSearchOptions , ArgList , bool IsIndexHeaderMap = false; bool IsSysrootSpecified = Args.hasArg(OPT__sysroot_EQ) || Args.hasArg(OPT_isysroot); + + // Expand a leading `=` to the sysroot if one was passed

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-03-18 Thread Evan Wilde via cfe-commits
@@ -3218,6 +3218,21 @@ static bool ParseHeaderSearchArgs(HeaderSearchOptions , ArgList , bool IsIndexHeaderMap = false; bool IsSysrootSpecified = Args.hasArg(OPT__sysroot_EQ) || Args.hasArg(OPT_isysroot); + + // Expand a leading `=` to the sysroot if one was passed

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-03-18 Thread Evan Wilde via cfe-commits
https://github.com/etcwilde edited https://github.com/llvm/llvm-project/pull/82084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-03-18 Thread Evan Wilde via cfe-commits
@@ -3256,12 +3262,14 @@ static bool ParseHeaderSearchArgs(HeaderSearchOptions , ArgList , } for (const auto *A : Args.filtered(OPT_idirafter)) -Opts.AddPath(A->getValue(), frontend::After, false, true); +Opts.AddPath(ConvertHeaderPath(A), frontend::After, false,

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-03-18 Thread Evan Wilde via cfe-commits
https://github.com/etcwilde updated https://github.com/llvm/llvm-project/pull/82084 >From 4c147d0508df51ca713b182dd8b85130cafb1f6c Mon Sep 17 00:00:00 2001 From: Evan Wilde Date: Fri, 16 Feb 2024 16:39:10 -0800 Subject: [PATCH] Support sysroot-relative header search paths Clang supported

[clang] [clang][NFC] Add documentation for `CastExpr::path()`. (PR #85623)

2024-03-18 Thread John McCall via cfe-commits
@@ -3552,6 +3552,15 @@ class CastExpr : public Expr { /// function that it invokes. NamedDecl *getConversionFunction() const; + /// Path through the class hierarchy taken by a `DerivedToBase` or + /// `UncheckedDerivedToBase` cast. For each derived-to-base edge in the

[clang] [openmp] [docs] Prefer --gcc-install-dir= to deprecated GCC_INSTALL_PREFIX (PR #85458)

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

  1   2   3   4   >