[clang] 7d8375b - [clang][driver] Fix -print-libgcc-file-name on Darwin platforms (#98325)

2024-07-19 Thread via cfe-commits
Author: Gábor Horváth Date: 2024-07-19T13:24:38+01:00 New Revision: 7d8375b86ee490acafb4254603ccd4edc2a58256 URL: https://github.com/llvm/llvm-project/commit/7d8375b86ee490acafb4254603ccd4edc2a58256 DIFF: https://github.com/llvm/llvm-project/commit/7d8375b86ee490acafb4254603ccd4edc2a58256.diff

[clang] [clang][driver] Fix -print-libgcc-file-name on Darwin platforms (PR #98325)

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

[clang] 8a79dc7 - [APINotes] Support annotating C++ methods

2024-07-19 Thread via cfe-commits
Author: Egor Zhdan Date: 2024-07-19T13:35:13+01:00 New Revision: 8a79dc7e6f765f3f49c5dd9330fc0826d3362858 URL: https://github.com/llvm/llvm-project/commit/8a79dc7e6f765f3f49c5dd9330fc0826d3362858 DIFF: https://github.com/llvm/llvm-project/commit/8a79dc7e6f765f3f49c5dd9330fc0826d3362858.diff LO

[clang] [APINotes] Support annotating C++ methods (PR #99512)

2024-07-19 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan closed https://github.com/llvm/llvm-project/pull/99512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC][Driver] Support `pauthtest` ABI for AArch64 Linux triples (PR #97237)

2024-07-19 Thread Daniel Kiss via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang --target=aarch64-linux-pauthtest --sysroot=%S/Inputs/multilib_aarch64_linux_tree -### -c %s 2>&1 | FileCheck %s DanielKristofKiss wrote: Looks this is not used: "clang/test/Driver/Inputs/multilib_aarch64_linux_tree/usr/incl

[clang] [clang] NFC, simplify the code in CheckExprLifetime.cpp (PR #99637)

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

[clang] [ExprConstant] Handle shift overflow the same way as other kinds of overflow (PR #99579)

2024-07-19 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/99579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ExprConstant] Handle shift overflow the same way as other kinds of overflow (PR #99579)

2024-07-19 Thread Aaron Ballman via cfe-commits
@@ -142,7 +142,7 @@ constexpr int arb(int n) { // expected-note {{declared here}} expected-note {{function parameter 'n' with unknown value cannot be used in a constant expression}} } constexpr long Overflow[(1 << 30) << 2]{}; // expected-warning {{requires 34

[clang] [ExprConstant] Handle shift overflow the same way as other kinds of overflow (PR #99579)

2024-07-19 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for working on this! In general, this is heading in the right direction. Though I do agree with @shafik that it would be nice to add additional test coverage for the changes which didn't modify existing test behavior. Also, we should have a

[clang] [clang] Fix assertion failure in `injectEmbedTokens` (PR #99624)

2024-07-19 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/99624 >From 4922e1d4de5ccc9e645b151eb923440573e85fae Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Fri, 19 Jul 2024 02:56:38 -0700 Subject: [PATCH] [clang] Fix assertion failure in `injectEmbedTokens`

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-19 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > @alanzhao1 do you think it's reasonable for the workaround to only apply > > > to code in system headers, or does the NDK get included as regular > > > headers generally? > > > > > > Having it only apply to system headers should be OK - in our case, chrome > > impor

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-19 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/99473 >From d6903daf0da6979822b8981ea3641455ff6d06f8 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 16 Jul 2024 14:48:10 +0200 Subject: [PATCH] [Clang] Add __common_type builtin --- clang/include/clang/

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-07-19 Thread via cfe-commits
https://github.com/DenisGZM created https://github.com/llvm/llvm-project/pull/99646 Supported `__usAtomicCAS` builtin originally defined in `/usr/local/cuda/inlcude/crt/sm_70_rt.hpp` >From 2cc142d85e706a2a4921e831fd78c8e609b70ae2 Mon Sep 17 00:00:00 2001 From: Denis Gerasimov Date: Fri, 19 J

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-07-19 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] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-07-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Denis.G (DenisGZM) Changes Supported `__usAtomicCAS` builtin originally defined in `/usr/local/cuda/inlcude/crt/sm_70_rt.hpp` --- Full diff: https://github.com/llvm/llvm-project/pull/99646.diff 6 Files Affected: - (modified) clang/inc

[clang] d31603e - [clang][Interp] Control InitStack activity state in visitInitList

2024-07-19 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-07-19T15:00:35+02:00 New Revision: d31603eefc2d8becfd1f41327b6a8db3e0e91a27 URL: https://github.com/llvm/llvm-project/commit/d31603eefc2d8becfd1f41327b6a8db3e0e91a27 DIFF: https://github.com/llvm/llvm-project/commit/d31603eefc2d8becfd1f41327b6a8db3e0e91a27.diff LO

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-19 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 ready_for_review https://github.com/llvm/llvm-project/pull/99473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Nikolas Klauser (philnik777) Changes This implements the logic of the `common_type` base template as a builtin alias. If there should be no `type` member, an empty class is returned. Otherwise a specialization of a `type_identity`

[clang] [llvm] Reapply "Add source file name for template instantiations in -ftime-trace" (PR #99545)

2024-07-19 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/99545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good. https://github.com/llvm/llvm-project/pull/99473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Disallow applying `onwership_returns` to functions that return non-pointers (PR #99564)

2024-07-19 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Adding the static analysis code owners for input. Also, precommit CI found a valid failure: ``` FAIL: Clang :: AST/attr-print-emit.cpp (400 of 20466) TEST 'Clang :: AST/attr-print-emit.cpp' FAILED Exit Code: 1 Command Output (stdout)

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-07-19 Thread Michael Kruse via cfe-commits
@@ -5229,13 +5362,288 @@ static void emitTargetOutlinedFunction( OMPBuilder.emitTargetRegionFunction(EntryInfo, GenerateOutlinedFunction, true, OutlinedFn, OutlinedFnID); } +OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::emitTargetTask(

[clang] [clang-format] Add BreakBinaryOperations configuration (PR #95013)

2024-07-19 Thread via cfe-commits
https://github.com/mydeveloperday commented: I think the enum is clearer and leave you open to add new options as you did, thank you, https://github.com/llvm/llvm-project/pull/95013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [clang-format] Add BreakBinaryOperations configuration (PR #95013)

2024-07-19 Thread via cfe-commits
https://github.com/mydeveloperday commented: I have no major objection I'll go with whatever @owenca and @HazardyKnusperkeks agree https://github.com/llvm/llvm-project/pull/95013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-19 Thread Louis Dionne via cfe-commits
@@ -3058,6 +3058,141 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static std::optional commonTypeImpl(Sema &S, + TemplateName BaseTemplate, + SourceLocation TemplateLoc

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-19 Thread Louis Dionne via cfe-commits
@@ -3058,6 +3058,141 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static std::optional commonTypeImpl(Sema &S, + TemplateName BaseTemplate, + SourceLocation TemplateLoc

[clang] [Clang] prevent checking destructor reference with an invalid initializer (PR #97860)

2024-07-19 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @shafik could you review this PR? Thanks https://github.com/llvm/llvm-project/pull/97860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 47c08fb - [TBAA] Remove references to entry BB in check lines for tbaa-pointers.c

2024-07-19 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2024-07-19T14:51:27+01:00 New Revision: 47c08fb8d79ec1bf85cc542be6ca2591ebf2d361 URL: https://github.com/llvm/llvm-project/commit/47c08fb8d79ec1bf85cc542be6ca2591ebf2d361 DIFF: https://github.com/llvm/llvm-project/commit/47c08fb8d79ec1bf85cc542be6ca2591ebf2d361.diff

[clang] 9145ffa - [clang][Interp] Only diagnose out of bounds enum values in C++

2024-07-19 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-07-19T16:06:49+02:00 New Revision: 9145ffa134ed57c25ec62879c1aeff50595d08be URL: https://github.com/llvm/llvm-project/commit/9145ffa134ed57c25ec62879c1aeff50595d08be DIFF: https://github.com/llvm/llvm-project/commit/9145ffa134ed57c25ec62879c1aeff50595d08be.diff LO

[libunwind] [libunwind] Undefined behaviour pointer arithmetic with null pointer (PR #98648)

2024-07-19 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/98648 >From 240add341b2c0a1be3d1ebf21938e70e51669126 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Fri, 12 Jul 2024 15:56:40 +0200 Subject: [PATCH 1/2] [libunwind] Fix ubsan issue --- libunwind/src/Unwin

[libunwind] [libunwind] Undefined behaviour pointer arithmetic with null pointer (PR #98648)

2024-07-19 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss ready_for_review https://github.com/llvm/llvm-project/pull/98648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Undefined behaviour pointer arithmetic with null pointer (PR #98648)

2024-07-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Daniel Kiss (DanielKristofKiss) Changes Fixes #91144 --- Full diff: https://github.com/llvm/llvm-project/pull/98648.diff 1 Files Affected: - (modified) libunwind/src/UnwindCursor.hpp (+2-2) ``diff diff --git a/libunwind/s

[clang] [llvm] [PowerPC] Add builtin_cpu_is P11 support (PR #99550)

2024-07-19 Thread via cfe-commits
@@ -84,6 +85,7 @@ #define AIX_PPC8_VALUE 0x0001 #define AIX_PPC9_VALUE 0x0002 #define AIX_PPC10_VALUE 0x0004 +#define AIX_PPC11_VALUE 0x0008 azhan92 wrote: I don't believe there is a definition for P11 yet, this is just what I expect based off

[clang] [clang-scan-deps] Ignore import/include directives with missing filenames (PR #99520)

2024-07-19 Thread Cyndy Ishida via cfe-commits
@@ -544,7 +544,7 @@ Scanner::lexIncludeFilename(const char *&First, const char *const End) { void Scanner::lexPPDirectiveBody(const char *&First, const char *const End) { while (true) { const dependency_directives_scan::Token &Tok = lexToken(First, End); -if (Tok.is(

[clang] c719d7b - [FMV][AArch64] Do not optimize away runtime checks for implied features (#99522)

2024-07-19 Thread via cfe-commits
Author: Alexandros Lamprineas Date: 2024-07-19T15:17:06+01:00 New Revision: c719d7b390481b095c7498fe75a0bcf60a24bad9 URL: https://github.com/llvm/llvm-project/commit/c719d7b390481b095c7498fe75a0bcf60a24bad9 DIFF: https://github.com/llvm/llvm-project/commit/c719d7b390481b095c7498fe75a0bcf60a24ba

[clang] [FMV][AArch64] Do not optimize away runtime checks for implied features (PR #99522)

2024-07-19 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/99522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a14baec - [clang] Emit constraint intrinsics for arc and hyperbolic trig clang builtins (#98949)

2024-07-19 Thread via cfe-commits
Author: Farzon Lotfi Date: 2024-07-19T10:19:41-04:00 New Revision: a14baec0f33ec495e7d96e2ef99ed238f0d2069e URL: https://github.com/llvm/llvm-project/commit/a14baec0f33ec495e7d96e2ef99ed238f0d2069e DIFF: https://github.com/llvm/llvm-project/commit/a14baec0f33ec495e7d96e2ef99ed238f0d2069e.diff

[clang] [clang] Emit constraint intrinsics for arc and hyperbolic trig clang builtins (PR #98949)

2024-07-19 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed https://github.com/llvm/llvm-project/pull/98949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-19 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan created https://github.com/llvm/llvm-project/pull/99655 This allows annotating C/C++ structs declared within other structs using API Notes. rdar://132083354 >From 8ee14d729d996a9414438a64ecc789082c421bd0 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Fri, 19 Jul

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Egor Zhdan (egorzhdan) Changes This allows annotating C/C++ structs declared within other structs using API Notes. rdar://132083354 --- Full diff: https://github.com/llvm/llvm-project/pull/99655.diff 9 Files Affected: - (modified) cla

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-19 Thread Saleem Abdulrasool via cfe-commits
@@ -958,12 +961,18 @@ class YAMLConverter { ContextInfo CI; auto TagCtxID = Writer.addContext(ParentContextID, T.Name, ContextKind::Tag, CI, SwiftVersion); +Context TagCtx(TagCtxID, ContextKind::Tag); for (const auto &CX

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-19 Thread Saleem Abdulrasool via cfe-commits
@@ -421,9 +424,8 @@ struct Tag { std::optional EnumConvenienceKind; std::optional SwiftCopyable; FunctionsSeq Methods; + TagsSeq Tags; compnerd wrote: This would be confusing as the reader might expect all child tags to be here. https://github.com/llvm

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-19 Thread Saleem Abdulrasool via cfe-commits
@@ -456,6 +458,7 @@ template <> struct MappingTraits { IO.mapOptional("EnumKind", T.EnumConvenienceKind); IO.mapOptional("SwiftCopyable", T.SwiftCopyable); IO.mapOptional("Methods", T.Methods); +IO.mapOptional("Tags", T.Tags); compnerd wrote: S

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-19 Thread Saleem Abdulrasool via cfe-commits
@@ -783,51 +783,76 @@ static void ProcessVersionedAPINotes( } } +static std::optional +UnwindNamespaceContext(DeclContext *DC, api_notes::APINotesManager &APINotes) { + if (auto NamespaceContext = dyn_cast(DC)) { +for (auto Reader : APINotes.findAPINotes(NamespaceContex

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-19 Thread Saleem Abdulrasool via cfe-commits
@@ -899,6 +924,10 @@ void Sema::ProcessAPINotes(Decl *D) { } for (auto Reader : APINotes.findAPINotes(D->getLocation())) { +if (Tag->getName() == "inner_char_box") + llvm::errs(); compnerd wrote: Debugging left overs? https://git

[clang] [llvm] Reapply "Add source file name for template instantiations in -ftime-trace" (PR #99545)

2024-07-19 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/99545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-19 Thread Nikolas Klauser via cfe-commits
@@ -3058,6 +3058,141 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static std::optional commonTypeImpl(Sema &S, + TemplateName BaseTemplate, + SourceLocation TemplateLoc

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-19 Thread Nikolas Klauser via cfe-commits
@@ -3058,6 +3058,141 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static std::optional commonTypeImpl(Sema &S, + TemplateName BaseTemplate, + SourceLocation TemplateLoc

[clang] 71e2b8d - [clang] NFC, simplify the code in CheckExprLifetime.cpp (#99637)

2024-07-19 Thread via cfe-commits
Author: Haojian Wu Date: 2024-07-19T16:46:31+02:00 New Revision: 71e2b8df30ad78f5f86bf0d6729296282e061a5c URL: https://github.com/llvm/llvm-project/commit/71e2b8df30ad78f5f86bf0d6729296282e061a5c DIFF: https://github.com/llvm/llvm-project/commit/71e2b8df30ad78f5f86bf0d6729296282e061a5c.diff LO

[clang] [clang] NFC, simplify the code in CheckExprLifetime.cpp (PR #99637)

2024-07-19 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/99637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-19 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos created https://github.com/llvm/llvm-project/pull/99656 - In Sema, when encountering Decls with function effects needing verification, add them to a vector, DeclsWithEffectsToVerify. - Update AST serialization to include DeclsWithEffectsToVerify. - In AnalysisBasedW

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Doug Wyatt (dougsonos) Changes - In Sema, when encountering Decls with function effects needing verification, add them to a vector, DeclsWithEffectsToVerify. - Update AST serialization to include DeclsWithEffectsToVerify. - In AnalysisBase

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-19 Thread Doug Wyatt via cfe-commits
@@ -4699,7 +4699,7 @@ class FunctionEffect { private: LLVM_PREFERRED_TYPE(Kind) - unsigned FKind : 3; + uint8_t FKind : 3; dougsonos wrote: The size of FunctionEffect changes from 4 (sizeof(unsigned)) to 1, and saves on memory footprint in the new analys

[clang] f9f6f5a - [TBAA] Remove remaining entry BB in check lines for tbaa-pointers.c (2)

2024-07-19 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2024-07-19T15:48:50+01:00 New Revision: f9f6f5a9c7748fe485adee206748adf28a849b79 URL: https://github.com/llvm/llvm-project/commit/f9f6f5a9c7748fe485adee206748adf28a849b79 DIFF: https://github.com/llvm/llvm-project/commit/f9f6f5a9c7748fe485adee206748adf28a849b79.diff

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-19 Thread Doug Wyatt via cfe-commits
@@ -10928,6 +10928,55 @@ def warn_imp_cast_drops_unaligned : Warning< InGroup>; // Function effects +def warn_func_effect_allocates : Warning< + "'%0' function must not allocate or deallocate memory">, + InGroup; +def note_func_effect_allocates : Note< + "function cannot

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-19 Thread Alex Crichton via cfe-commits
alexcrichton wrote: ping @sbc100 would you be able to merge this for me? https://github.com/llvm/llvm-project/pull/98373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-19 Thread Doug Wyatt via cfe-commits
@@ -2551,6 +3807,9 @@ void clang::sema::AnalysisBasedWarnings::IssueWarnings( SourceLocation())) { CallableVisitor(CallAnalyzers).TraverseTranslationUnitDecl(TU); } + + if (S.Context.hasAnyFunctionEffects()) dougsonos wrote: This

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-07-19 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/97308 >From 10e20a2c5e15f9479ce0d2680a39b718a8d7f5bc Mon Sep 17 00:00:00 2001 From: yronglin Date: Mon, 1 Jul 2024 23:20:58 +0800 Subject: [PATCH] Reapply "[Clang][CWG1815] Support lifetime extension of temporary cre

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-07-19 Thread via cfe-commits
yronglin wrote: > There still has a experimental-new-constant-interpreter issue need fix. @tbaederr Thanks! it's resolved by https://github.com/llvm/llvm-project/commit/d31603eefc2d8becfd1f41327b6a8db3e0e91a27 . https://github.com/llvm/llvm-project/pull/97308

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-19 Thread Doug Wyatt via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #92527)

2024-07-19 Thread via cfe-commits
yronglin wrote: @bgra8 @alexfh Thanks report this issue, I've a new PR to fix it, and added your reproducer into the test. https://github.com/llvm/llvm-project/pull/92527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-07-19 Thread via cfe-commits
DenisGZM wrote: Sorry, haven't ever run these tests before. Ok, I got that I should add predicates for SM and PTX versions in backend. Adjust min size of cmpxchng depending on sm and ptx version. But still one test for sm_90 is failing, because expect another code... Should I just rewrite it? I

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-19 Thread Vlad Serebrennikov via cfe-commits
@@ -891,6 +898,12 @@ class Sema final : public SemaBase { SourceLocation NewLoc, SourceLocation OldLoc); + /// Potentially add a FunctionDecl or BlockDecl to DeclsWithEffectsToVerify. + void maybeA

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-19 Thread Egor Zhdan via cfe-commits
@@ -456,6 +458,7 @@ template <> struct MappingTraits { IO.mapOptional("EnumKind", T.EnumConvenienceKind); IO.mapOptional("SwiftCopyable", T.SwiftCopyable); IO.mapOptional("Methods", T.Methods); +IO.mapOptional("Tags", T.Tags); egorzhdan wrote:

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-19 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/99655 >From 824de086ec1e3208fce111a3cfacc971dc032b60 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Fri, 19 Jul 2024 15:24:10 +0100 Subject: [PATCH] [APINotes] Support nested tags This allows annotating C/C++ struc

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-19 Thread Egor Zhdan via cfe-commits
@@ -899,6 +924,10 @@ void Sema::ProcessAPINotes(Decl *D) { } for (auto Reader : APINotes.findAPINotes(D->getLocation())) { +if (Tag->getName() == "inner_char_box") + llvm::errs(); egorzhdan wrote: My bad! Removed this. https://gi

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-19 Thread Egor Zhdan via cfe-commits
@@ -958,12 +961,18 @@ class YAMLConverter { ContextInfo CI; auto TagCtxID = Writer.addContext(ParentContextID, T.Name, ContextKind::Tag, CI, SwiftVersion); +Context TagCtx(TagCtxID, ContextKind::Tag); for (const auto &CX

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-19 Thread Egor Zhdan via cfe-commits
@@ -421,9 +424,8 @@ struct Tag { std::optional EnumConvenienceKind; std::optional SwiftCopyable; FunctionsSeq Methods; + TagsSeq Tags; egorzhdan wrote: These are, in fact, child tags – I can add a comment here describing the meaning of this field. htt

[clang] [llvm] [PowerPC] Add support for -mcpu=pwr11 / -mtune=pwr11 (PR #99511)

2024-07-19 Thread via cfe-commits
https://github.com/azhan92 updated https://github.com/llvm/llvm-project/pull/99511 >From 52100e3378c86eddb9a4757f8f3e175804a6dc76 Mon Sep 17 00:00:00 2001 From: Alison Zhang Date: Thu, 18 Jul 2024 10:27:40 -0400 Subject: [PATCH 1/2] Add support for -mcpu=pwr11 / -mtune=pwr11 --- clang/lib/Bas

[clang] [llvm] [PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE tuning (PR #99629)

2024-07-19 Thread Paul T Robinson via cfe-commits
@@ -354,6 +354,9 @@ DwarfDebug::DwarfDebug(AsmPrinter *A) UseLocSection = !TT.isNVPTX(); + // Always emits .debug_aranges for SCE tuning. pogo59 wrote: ```suggestion // Always emit .debug_aranges for SCE tuning. ``` https://github.com/llvm/llvm-project

[clang] [llvm] [PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE tuning (PR #99629)

2024-07-19 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 approved this pull request. LGTM with a comment nit. https://github.com/llvm/llvm-project/pull/99629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-19 Thread Egor Zhdan via cfe-commits
@@ -783,51 +783,76 @@ static void ProcessVersionedAPINotes( } } +static std::optional +UnwindNamespaceContext(DeclContext *DC, api_notes::APINotesManager &APINotes) { + if (auto NamespaceContext = dyn_cast(DC)) { +for (auto Reader : APINotes.findAPINotes(NamespaceContex

[clang] [llvm] [PowerPC] Add support for -mcpu=pwr11 / -mtune=pwr11 (PR #99511)

2024-07-19 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 3eb666e292baf87c969be733de858b0cb7ead13f e55375b12aa1da16d27d8d888d707669041303f6 --e

[clang] [llvm] [PowerPC] Add support for -mcpu=pwr11 / -mtune=pwr11 (PR #99511)

2024-07-19 Thread via cfe-commits
https://github.com/azhan92 updated https://github.com/llvm/llvm-project/pull/99511 >From 52100e3378c86eddb9a4757f8f3e175804a6dc76 Mon Sep 17 00:00:00 2001 From: Alison Zhang Date: Thu, 18 Jul 2024 10:27:40 -0400 Subject: [PATCH 1/3] Add support for -mcpu=pwr11 / -mtune=pwr11 --- clang/lib/Bas

[clang] [clang][NFC] Move Bounds Safety Sema code to `SemaBoundsSafety.cpp` (PR #99330)

2024-07-19 Thread Kees Cook via cfe-commits
kees wrote: > @rapidsna @hnrklssn @bwendling @kees Please let me know if you have any > concerns about this refactor. Yeah, FWIW, this is fine by me. I just want to make sure that we don't hide stuff behind `-fbounds-safety` that doesn't need to be behind a flag (e.g. `counted_by`, `sized_by`

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-07-19 Thread via cfe-commits
https://github.com/DenisGZM updated https://github.com/llvm/llvm-project/pull/99646 >From 2cc142d85e706a2a4921e831fd78c8e609b70ae2 Mon Sep 17 00:00:00 2001 From: Denis Gerasimov Date: Fri, 19 Jul 2024 15:47:57 +0300 Subject: [PATCH 1/2] [NVPTX] Support __usAtomicCAS builtin --- clang/include/

[clang] cf50a84 - [PAC] Authenticate function pointers in UBSan type checks (#99590)

2024-07-19 Thread via cfe-commits
Author: Akira Hatanaka Date: 2024-07-19T08:27:16-07:00 New Revision: cf50a84dc0327c1ff732011d74d2c126a2b93af6 URL: https://github.com/llvm/llvm-project/commit/cf50a84dc0327c1ff732011d74d2c126a2b93af6 DIFF: https://github.com/llvm/llvm-project/commit/cf50a84dc0327c1ff732011d74d2c126a2b93af6.diff

[clang] [PAC] Authenticate function pointers in UBSan type checks (PR #99590)

2024-07-19 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/99590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d463617 - [PAC] Fix a crash when signing a pointer to a function with an incomplete enum parameter (#99595)

2024-07-19 Thread via cfe-commits
Author: Akira Hatanaka Date: 2024-07-19T08:28:29-07:00 New Revision: d463617d7772c5e3275cf8c4a8a21d17b3d03d86 URL: https://github.com/llvm/llvm-project/commit/d463617d7772c5e3275cf8c4a8a21d17b3d03d86 DIFF: https://github.com/llvm/llvm-project/commit/d463617d7772c5e3275cf8c4a8a21d17b3d03d86.diff

[clang] [PAC] Fix a crash when signing a pointer to a function with an incomplete enum parameter (PR #99595)

2024-07-19 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/99595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Remove 3dnow from X86TargetParser. (PR #99352)

2024-07-19 Thread James Y Knight via cfe-commits
@@ -175,8 +175,6 @@ X86_FEATURE_COMPAT(AVX512BF16, "avx512bf16", 34) X86_FEATURE_COMPAT(AVX512VP2INTERSECT, "avx512vp2intersect", 35) // Below Features has some missings comparing to gcc, it's because gcc has some // not one-to-one mapped in llvm. -X86_FEATURE_

[clang] [llvm] [PowerPC] Add support for -mcpu=pwr11 / -mtune=pwr11 (PR #99511)

2024-07-19 Thread via cfe-commits
https://github.com/azhan92 updated https://github.com/llvm/llvm-project/pull/99511 >From 52100e3378c86eddb9a4757f8f3e175804a6dc76 Mon Sep 17 00:00:00 2001 From: Alison Zhang Date: Thu, 18 Jul 2024 10:27:40 -0400 Subject: [PATCH 1/4] Add support for -mcpu=pwr11 / -mtune=pwr11 --- clang/lib/Bas

[clang] [clang-format] Fix a bug in annotating `*` in `#define`s (PR #99433)

2024-07-19 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/99433 >From ebf25d890ff47be48bd153942d943906943a247b Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 17 Jul 2024 22:30:21 -0700 Subject: [PATCH 1/2] [clang-format] Fix a bug in annotating `*` in `#define`s Fixes #99

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-07-19 Thread via cfe-commits
@@ -871,7 +871,8 @@ NVPTXTargetLowering::NVPTXTargetLowering(const NVPTXTargetMachine &TM, // actions computeRegisterProperties(STI.getRegisterInfo()); - setMinCmpXchgSizeInBits(32); + bool Allow16BitCAS = STI.getSmVersion() >= 70 && STI.getPTXVersion() >= 63; + setMin

[clang-tools-extra] [clang-tidy] Add new check bugprone-tagged-union-member-count (PR #89925)

2024-07-19 Thread via cfe-commits
=?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= Message-ID: In-Reply-To: @@ -0,0 +1,31 @@ +//===--- TaggedUnionMemberCountCheck.h - clang-tidy -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Ex

[clang] [CLANG][AArch64] Add the modal 8 bit floating-point scalar type (PR #97277)

2024-07-19 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/97277 >From fbeca5c357b1a5589757bbb2cac8208f8c9027ab Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Mon, 24 Jun 2024 09:59:24 + Subject: [PATCH 1/4] [WIP][CLANG][AArch64] Add the modal 8 bit float

[clang] [clang-format] Fix a bug in annotating `*` in `#define`s (PR #99433)

2024-07-19 Thread Owen Pan via cfe-commits
owenca wrote: > How about judging whether the FunctionLBrace exists as the opener of the > outer context? That wouldn't work as we must also handle function calls at the top level when dealing with macro definitions. https://github.com/llvm/llvm-project/pull/99433

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-07-19 Thread John Brawn via cfe-commits
https://github.com/john-brawn-arm updated https://github.com/llvm/llvm-project/pull/99335 >From e0f71863bd2f797c9208bdfc559bb69ade5a653a Mon Sep 17 00:00:00 2001 From: John Brawn Date: Wed, 17 Jul 2024 15:18:46 +0100 Subject: [PATCH 1/3] [libunwind] Add GCS support for AArch64 AArch64 GCS (Gua

[clang] [lldb] [clang] Split ObjectFilePCHContainerReader from ObjectFilePCHContainerWriter (PR #99599)

2024-07-19 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM sans the missing newline at the end of file and file headers not aligned to 80 columns. https://github.com/llvm/llvm-project/pull/99599 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-07-19 Thread via cfe-commits
https://github.com/DenisGZM updated https://github.com/llvm/llvm-project/pull/99646 >From 2cc142d85e706a2a4921e831fd78c8e609b70ae2 Mon Sep 17 00:00:00 2001 From: Denis Gerasimov Date: Fri, 19 Jul 2024 15:47:57 +0300 Subject: [PATCH 1/3] [NVPTX] Support __usAtomicCAS builtin --- clang/include/

[clang-tools-extra] [clang-tidy] Add new check bugprone-tagged-union-member-count (PR #89925)

2024-07-19 Thread via cfe-commits
=?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= Message-ID: In-Reply-To: tigbr wrote: Thank you everyone for your suggestions and observations, they were most helpful. I listed the important changes topically in the message of the latest commit, I hope it will be

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-07-19 Thread via cfe-commits
@@ -871,7 +871,8 @@ NVPTXTargetLowering::NVPTXTargetLowering(const NVPTXTargetMachine &TM, // actions computeRegisterProperties(STI.getRegisterInfo()); - setMinCmpXchgSizeInBits(32); + bool Allow16BitCAS = STI.getSmVersion() >= 70 && STI.getPTXVersion() >= 63; + setMin

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-07-19 Thread Philip Reames via cfe-commits
@@ -14266,6 +14277,71 @@ CodeGenFunction::EmitAArch64CpuSupports(ArrayRef FeaturesStrs) { return Result; } +Value *CodeGenFunction::EmitRISCVCpuSupports(ArrayRef FeaturesStrs, + unsigned &MaxGroupIDUsed) { + + const unsigned Feat

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-07-19 Thread Philip Reames via cfe-commits
@@ -14266,6 +14277,71 @@ CodeGenFunction::EmitAArch64CpuSupports(ArrayRef FeaturesStrs) { return Result; } +Value *CodeGenFunction::EmitRISCVCpuSupports(ArrayRef FeaturesStrs, + unsigned &MaxGroupIDUsed) { + + const unsigned Feat

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-07-19 Thread Philip Reames via cfe-commits
https://github.com/preames edited https://github.com/llvm/llvm-project/pull/85786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-07-19 Thread Philip Reames via cfe-commits
@@ -119,6 +119,51 @@ void getFeaturesForCPU(StringRef CPU, else EnabledFeatures.push_back(F.substr(1)); } + +namespace RISCVExtensionBitmaskTable { +#define GET_RISCVExtensionBitmaskTable_IMPL +#include "llvm/TargetParser/RISCVTargetParserDef.inc" + +} // namespace RI

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-07-19 Thread Philip Reames via cfe-commits
@@ -14266,6 +14277,71 @@ CodeGenFunction::EmitAArch64CpuSupports(ArrayRef FeaturesStrs) { return Result; } +Value *CodeGenFunction::EmitRISCVCpuSupports(ArrayRef FeaturesStrs, + unsigned &MaxGroupIDUsed) { + + const unsigned Feat

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-07-19 Thread Philip Reames via cfe-commits
@@ -2854,10 +2854,121 @@ void CodeGenFunction::EmitMultiVersionResolver( case llvm::Triple::aarch64: EmitAArch64MultiVersionResolver(Resolver, Options); return; + case llvm::Triple::riscv32: + case llvm::Triple::riscv64: +EmitRISCVMultiVersionResolver(Resolver,

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-07-19 Thread Philip Reames via cfe-commits
@@ -2854,10 +2854,121 @@ void CodeGenFunction::EmitMultiVersionResolver( case llvm::Triple::aarch64: EmitAArch64MultiVersionResolver(Resolver, Options); return; + case llvm::Triple::riscv32: + case llvm::Triple::riscv64: +EmitRISCVMultiVersionResolver(Resolver,

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-07-19 Thread Philip Reames via cfe-commits
@@ -63,9 +63,32 @@ class RISCVABIInfo : public DefaultABIInfo { CharUnits Field2Off) const; ABIArgInfo coerceVLSVector(QualType Ty) const; + + using ABIInfo::appendAttributeMangling; + void appendAttributeMangling(TargetClones

<    1   2   3   4   5   >