[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-05-01 Thread Jacob Lambert via cfe-commits
lamb-j wrote: > @lamb-j I appreciate your carrying out these performance tests! > > Would you be open to providing an option to enable post-link optimization > that could be off by default for now? Currently if a user doesn't supply the new "-link-builtin-bitcodes-postopt" option, linking bui

[clang] [HLSL] Shore up floating point conversions (PR #90222)

2024-05-01 Thread Farzon Lotfi via cfe-commits
farzonl wrote: Are there test cases in `OverloadResolutionBugs.hlsl` that have been fixed by this change and would need to be removed from that file? https://github.com/llvm/llvm-project/pull/90222 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti requested changes to this pull request. Thanks for looking into this. Because this is touching a lot of checks, there was bound to be some conversation about which matchers need the `ignoringParenImpCasts` and which don't. I think we should check that now instead of

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/89553 ___ 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 ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -93,7 +94,8 @@ rewriteInverseTimeCall(const MatchFinder::MatchResult &Result, llvm::StringRef InverseFunction = getTimeInverseForScale(Scale); if (const auto *MaybeCallArg = selectFirst( "e", match(callExpr(callee(functionDecl(hasName(InverseFunction))), -

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -20,7 +20,7 @@ namespace clang::tidy::abseil { void DurationConversionCastCheck::registerMatchers(MatchFinder *Finder) { auto CallMatcher = ignoringImpCasts(callExpr( callee(functionDecl(DurationConversionFunction()).bind("func_decl")), - hasArgument(0, expr().b

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -75,10 +75,11 @@ rewriteInverseDurationCall(const MatchFinder::MatchResult &Result, getDurationInverseForScale(Scale); if (const auto *MaybeCallArg = selectFirst( "e", - match(callExpr(callee(functionDecl(hasAnyName( -

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -21,9 +21,10 @@ void DurationSubtractionCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher( binaryOperator( hasOperatorName("-"), - hasLHS(callExpr(callee(functionDecl(DurationConversionFunction()) -

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -62,9 +63,9 @@ void StringFindStartswithCheck::registerMatchers(MatchFinder *Finder) { callee(cxxMethodDecl(hasName("rfind")).bind("findfun")), on(hasType(StringType)), // ... with some search expression ... - hasArgument(0, expr().bind("needle")), +

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -49,7 +49,8 @@ void UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) { hasParent(functionTemplateDecl()), unless(hasTemplateArgument(0, refersToType(builtinType(, hasAnyName("operator*=", "operator/="))), -

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -54,9 +54,10 @@ makeRewriteRule(ArrayRef StringLikeClassNames, hasParameter( 0, parmVarDecl(anyOf(hasType(StringType), hasType(CharStarType), hasType(CharType)), - on(hasType(StringType)), hasArgument(0, ex

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -74,7 +74,7 @@ RewriteRuleWith StringviewNullptrCheckImpl() { auto BasicStringViewConstructingFromNullExpr = cxxConstructExpr( HasBasicStringViewType, argumentCountIs(1), - hasAnyArgument(/* `hasArgument` would skip over parens */ anyOf( +

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -98,16 +100,18 @@ void UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) { // `absl::Hours(x)` // where `x` is not of a built-in type. Finder->addMatcher( - traverse(TK_AsIs, implicitCastExpr( -anyOf(hasCastKind(

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -36,19 +36,21 @@ void DurationUnnecessaryConversionCheck::registerMatchers(MatchFinder *Finder) { // e.g. `absl::ToDoubleSeconds(dur)`. auto InverseFunctionMatcher = callExpr( callee(functionDecl(hasAnyName(FloatConversion, IntegerConversion))), -has

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -41,14 +41,17 @@ void StringLiteralWithEmbeddedNulCheck::registerMatchers(MatchFinder *Finder) { hasDeclaration(cxxMethodDecl(hasName("basic_string", // If present, the second argument is the alloc object which must not // be present e

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -22,9 +22,10 @@ void DurationDivisionCheck::registerMatchers(MatchFinder *Finder) { traverse(TK_AsIs, implicitCastExpr( hasSourceExpression(ignoringParenCasts( - cxxOperatorCallExpr(hasOverloadedOperatorName("/")

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -62,9 +63,9 @@ void UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) { unless(hasTemplateArgument(0, refersToType(builtinType(, hasAnyName("::absl::operator*", "::absl::operator/"))), argumentCou

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Please remove the formatting changes https://github.com/llvm/llvm-project/pull/89553 ___ 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 ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -75,9 +76,10 @@ void UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) { hasParent(functionTemplateDecl()), unless(hasTemplateArgument(0, refersToType(builtinType(, hasName("::absl::operator*"

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -102,8 +103,8 @@ void StringConstructorCheck::registerMatchers(MatchFinder *Finder) { cxxConstructExpr( hasDeclaration(cxxConstructorDecl(ofClass( cxxRecordDecl(hasAnyName(removeNamespaces(StringNames)), - hasArgument(0, hasType(Ch

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -82,8 +82,8 @@ void StringConstructorCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher( cxxConstructExpr( hasDeclaration(cxxMethodDecl(hasName("basic_string"))), - hasArgument(0, hasType(qualType(isInteger(, - hasArgum

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -30,9 +30,9 @@ void UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher( cxxOperatorCallExpr( argumentCountIs(2), - hasArgument( - 0, expr(hasType(cxxRecordDecl(hasName("::absl::Duration"),

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -46,20 +46,20 @@ void SlicingCheck::registerMatchers(MatchFinder *Finder) { isBaseInitializer(), withInitializer(equalsBoundNode("Call")); // Assignment slicing: "a = b;" and "a = std::move(b);" variants. - const auto SlicesObjectInAssignment = - callE

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -97,11 +97,12 @@ AST_MATCHER_FUNCTION_P(StatementMatcher, isConstRefReturningMethodCall, hasCanonicalType(recordType(hasDeclaration(namedDecl( unless(matchers::matchesAnyListedName(ExcludedContainerTypes)); - return expr( - anyOf(cxxMemberCallExpr

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -44,9 +44,10 @@ void StringFindStartswithCheck::registerMatchers(MatchFinder *Finder) { callee(cxxMethodDecl(hasName("find")).bind("findfun")), on(hasType(StringType)), // ... with some search expression ... - hasArgument(0, expr().bind("needle")), +

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -164,26 +164,32 @@ TEST_P(ASTMatchersTest, AllOf) { "void g(int x) { struct T t; f(x, &t, 3, 4); }"; EXPECT_TRUE(matches( Program, callExpr(allOf(callee(functionDecl(hasName("f"))), - hasArgument(0, declRefExpr(to

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/89553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Shore up floating point conversions (PR #90222)

2024-05-01 Thread Chris B via cfe-commits
@@ -4393,6 +4401,24 @@ getFixedEnumPromtion(Sema &S, const StandardConversionSequence &SCS) { return FixedEnumPromotion::ToPromotedUnderlyingType; } +static ImplicitConversionSequence::CompareKind +HLSLCompareFloatingRank(QualType LHS, QualType RHS) { + assert(LHS->isVecto

[clang] [HLSL] Shore up floating point conversions (PR #90222)

2024-05-01 Thread Chris B via cfe-commits
@@ -0,0 +1,229 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type -finclude-default-header -Wconversion -verify -o - %s +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type -finclude-default-header -ast-dump %s | FileCheck %

[clang] [HLSL] Shore up floating point conversions (PR #90222)

2024-05-01 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/90222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang][modules] stdarg.h and stddef.h shouldn't directly declare anything (PR #90676)

2024-05-01 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/90676 >From 54652504cb9e56c3972270c43cc4ee8d613979b4 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 30 Apr 2024 15:16:38 -0700 Subject: [PATCH] [clang][modules] stdarg.h and stddef.h shouldn't directl

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

2024-05-01 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/90625 >From 0a1598d0e00cbbfd0320ea72491500957ddb6b52 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Tue, 30 Apr 2024 11:18:15 -0500 Subject: [PATCH 1/2] [clang][Sema] Re-use existing BinaryOperator if possible Firs

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

2024-05-01 Thread Chris Apple via cfe-commits
@@ -27,6 +27,8 @@ #include "clang/AST/StmtObjC.h" #include "clang/AST/StmtVisitor.h" #include "clang/AST/Type.h" +#include "clang/ASTMatchers/ASTMatchFinder.h" cjappl wrote: FYI, these two headers require a cmake change: ``` diff --git a/clang/lib/Sema/CMakeL

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

2024-05-01 Thread via cfe-commits
@@ -27,6 +27,8 @@ #include "clang/AST/StmtObjC.h" #include "clang/AST/StmtVisitor.h" #include "clang/AST/Type.h" +#include "clang/ASTMatchers/ASTMatchFinder.h" Sirraide wrote: Er, Sema depending on ASTMatchers is *probably* fine, but I’d like someone more fam

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-05-01 Thread via cfe-commits
b-sumner wrote: > Currently if a user doesn't supply the new "-link-builtin-bitcodes-postopt" > option, linking builtin bitcodes happens first, then the optimization > pipeline follows. Does that cover the case you're talking about? I'm thinking of an option that developers can use. If -link

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-05-01 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > Currently if a user doesn't supply the new "-link-builtin-bitcodes-postopt" > > option, linking builtin bitcodes happens first, then the optimization > > pipeline follows. Does that cover the case you're talking about? > > I'm thinking of an option that developers can use. I

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-05-01 Thread via cfe-commits
b-sumner wrote: > > I'm thinking of an option that developers can use. If > > -link-builtin-bitcodes-postopt, becomes the default, how can developers > > disable it? > > Presumably you'd add `--no-link-builtin-bitcodes-postopt` and then use > `Args.hasFlag(PosFlag, NegFlag, Default)`. I assu

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-05-01 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp requested changes to this pull request. Apologies, it looks like I forgot to submit this review! Hopefully the comments aren't too out of date. https://github.com/llvm/llvm-project/pull/89836 ___ cfe-commits mailing list cf

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-05-01 Thread Damyan Pepper via cfe-commits
@@ -7398,6 +7398,26 @@ The full documentation is available here: https://docs.microsoft.com/en-us/windo }]; } +def HLSLPackOffsetDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The packoffset attribute is used to change the layout of a cbuffer.

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-05-01 Thread Damyan Pepper via cfe-commits
@@ -1745,5 +1745,7 @@ def err_hlsl_separate_attr_arg_and_number : Error<"wrong argument format for hls def ext_hlsl_access_specifiers : ExtWarn< "access specifiers are a clang HLSL extension">, InGroup; +def err_hlsl_unsupported_component : Error<"invalid component '%0' us

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-05-01 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp edited https://github.com/llvm/llvm-project/pull/89836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Ignore unevaluated context in bugprone-optional-value-conversion (PR #90410)

2024-05-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti commented: Do we maybe want to explicitly match `decltype`, `sizeof`, `static_cast` etc. instead of `typeLoc`? Because I don't think we would want to ignore https://godbolt.org/z/r3bK961do ```c++ #include constexpr std::optional foo() { return 42; } constexpr int

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-05-01 Thread Xiang Li via cfe-commits
@@ -1745,5 +1745,7 @@ def err_hlsl_separate_attr_arg_and_number : Error<"wrong argument format for hls def ext_hlsl_access_specifiers : ExtWarn< "access specifiers are a clang HLSL extension">, InGroup; +def err_hlsl_unsupported_component : Error<"invalid component '%0' us

[clang] [HLSL] Shore up floating point conversions (PR #90222)

2024-05-01 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/90222 >From a173605b6043739e69f89d3a559a4f6a68d5fc0a Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Thu, 25 Apr 2024 15:47:22 -0500 Subject: [PATCH 1/2] [HLSL] Shore up floating point conversions This PR fixes

[clang-tools-extra] [clang-tidy] Ignore casts from void to void in bugprone-casting-through-void (PR #90566)

2024-05-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/90566 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Relax readability-const-return-type (PR #90560)

2024-05-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/90560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-01 Thread Chris Apple via cfe-commits
@@ -27,6 +27,8 @@ #include "clang/AST/StmtObjC.h" #include "clang/AST/StmtVisitor.h" #include "clang/AST/Type.h" +#include "clang/ASTMatchers/ASTMatchFinder.h" cjappl wrote: To be less prescriptive with the solution: I was getting linker errors saying that th

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

2024-05-01 Thread via cfe-commits
@@ -27,6 +27,8 @@ #include "clang/AST/StmtObjC.h" #include "clang/AST/StmtVisitor.h" #include "clang/AST/Type.h" +#include "clang/ASTMatchers/ASTMatchFinder.h" Sirraide wrote: No yeah, that part makes sense; I’d assume that you need to link to clangASTMatcher

[clang] [HLSL] Shore up floating point conversions (PR #90222)

2024-05-01 Thread Tex Riddell via cfe-commits
https://github.com/tex3d approved this pull request. https://github.com/llvm/llvm-project/pull/90222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-01 Thread Vadim D. via cfe-commits
vvd170501 wrote: Ping. Can anyone review this, please? https://github.com/llvm/llvm-project/pull/87208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Handle expr with side-effects in readability-static-accessed-through-instance (PR #90736)

2024-05-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/90736 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Handle expr with side-effects in readability-static-accessed-through-instance (PR #90736)

2024-05-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/90736 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Handle expr with side-effects in readability-static-accessed-through-instance (PR #90736)

2024-05-01 Thread Julian Schmidt via cfe-commits
@@ -380,3 +387,20 @@ namespace PR51861 { // CHECK-FIXES: {{^}}PR51861::Foo::getBar();{{$}} } } + +namespace PR75163 { 5chmidti wrote: Nit: `GH` instead of `PR`? https://github.com/llvm/llvm-project/pull/90736

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-05-01 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/87596 >From 4e6130ea07e655081df3f2ca9c89fd1be035a68d Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Wed, 1 May 2024 13:56:52 -0700 Subject: [PATCH] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs i

[clang] [llvm] [clang backend] In AArch64's DataLayout, specify a minimum function alignment of 4. (PR #90702)

2024-05-01 Thread Doug Wyatt via cfe-commits
@@ -86,7 +86,7 @@ TEST(DataLayoutUpgradeTest, NoDataLayoutUpgrade) { "-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64" "-f80:128:128-n8:16:32:64-S128"); EXPECT_EQ(DL2, "e-m:e-i64:64-n32:64"); - EXPECT_EQ(DL3, "e-m:o-i64:64-i128:128-n32:64-S128"); +

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

2024-05-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/90621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Sort target features (NFC) (PR #90777)

2024-05-01 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/90777 None >From b9fd03c2740fe924c0ea49bb78c9898412364105 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Mon, 29 Apr 2024 22:16:46 + Subject: [PATCH] [WebAssembly] Sort target features (NFC) --- clang/include/c

[clang] [llvm] [WebAssembly] Sort target features (NFC) (PR #90777)

2024-05-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-webassembly Author: Heejin Ahn (aheejin) Changes --- Patch is 33.79 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/90777.diff 7 Files Affected: - (modified) clang/include/clang/Driver/Options.td

[clang] [llvm] [WebAssembly] Sort target features (NFC) (PR #90777)

2024-05-01 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 a1c12794226ffde0a84c96b9188a266eafd85fb3 b9fd03c2740fe924c0ea49bb78c9898412364105 --

[clang] [llvm] [WebAssembly] Sort target features (NFC) (PR #90777)

2024-05-01 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/90777 >From b9fd03c2740fe924c0ea49bb78c9898412364105 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Mon, 29 Apr 2024 22:16:46 + Subject: [PATCH 1/2] [WebAssembly] Sort target features (NFC) --- clang/include/cla

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-05-01 Thread Xiang Li via cfe-commits
https://github.com/python3kgae updated https://github.com/llvm/llvm-project/pull/89836 >From 4d8c72688656fe3b2ce8817087d8cf7352b5876b Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Tue, 23 Apr 2024 17:49:02 -0400 Subject: [PATCH 1/6] [HLSL] Support packoffset attribute in AST Add HLSLPackOffset

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-05-01 Thread Xiang Li via cfe-commits
@@ -7398,6 +7398,26 @@ The full documentation is available here: https://docs.microsoft.com/en-us/windo }]; } +def HLSLPackOffsetDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The packoffset attribute is used to change the layout of a cbuffer.

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-05-01 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/87596 >From 50e628d2d6fb496c1cb2fa188b653529508e383c Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Wed, 1 May 2024 13:56:52 -0700 Subject: [PATCH] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs i

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

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

[clang-tools-extra] [clangd] Remove potential prefix from enum value names (PR #83412)

2024-05-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti commented: When the enumerators start with the enum name, but the names contain a `_` as a separator, then applying this tweak will result in `_`-prefixed enumerators. Can you please handle that case as well and remove the `_`? Otherwise, this looks good to me http

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-05-01 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: @dwblaikie if you have no further comments, I'll merge this approved change some time soon (in a day or two). https://github.com/llvm/llvm-project/pull/90298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [llvm] [WebAssembly] Sort target features (NFC) (PR #90777)

2024-05-01 Thread Thomas Lively via cfe-commits
https://github.com/tlively approved this pull request. https://github.com/llvm/llvm-project/pull/90777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-05-01 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/87596 >From a89cca7fecae5ef5130cd9c8da834a186e99dbb5 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Wed, 1 May 2024 13:56:52 -0700 Subject: [PATCH] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs i

[clang] [compiler-rt] [asan][windows] Eliminate the static asan runtime on windows (PR #81677)

2024-05-01 Thread Charlie Barto via cfe-commits
@@ -35,6 +35,9 @@ // RUN: %p/../../../../lib/sanitizer_common/sanitizer_coverage_interface.inc \ // RUN: | grep -e "INTERFACE_\(WEAK_\)\?FUNCTION" \ // RUN: | grep -v "__sanitizer_weak_hook" \ +// R

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-05-01 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/87596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-05-01 Thread Chris B via cfe-commits
@@ -4372,6 +4372,13 @@ def HLSLResourceBinding: InheritableAttr { let Documentation = [HLSLResourceBindingDocs]; } +def HLSLPackOffset: HLSLAnnotationAttr { + let Spellings = [HLSLAnnotation<"packoffset">]; + let LangOpts = [HLSL]; + let Args = [IntArgument<"Offset">]; --

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-01 Thread Dan Liew via cfe-commits
https://github.com/delcypher created https://github.com/llvm/llvm-project/pull/90786 Previously the attribute was only allowed on flexible array members. This patch patch changes this to also allow the attribute on pointer fields in structs and also allows late parsing of the attribute in some

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dan Liew (delcypher) Changes Previously the attribute was only allowed on flexible array members. This patch patch changes this to also allow the attribute on pointer fields in structs and also allows late parsing of the attribute in some

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-05-01 Thread Chris B via cfe-commits
@@ -108,3 +108,18 @@ behavior between Clang and DXC. Some examples include: diagnostic notifying the user of the conversion rather than silently altering precision relative to the other overloads (as FXC does) or generating code that will fail validation (as DXC does). +

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-05-01 Thread Dan Liew via cfe-commits
delcypher wrote: @rapidsna I've put my version of this PR in my own pull request because when I edit the PR summary here it looks like you wrote it which is weird: https://github.com/llvm/llvm-project/pull/90786 https://github.com/llvm/llvm-project/pull/87596 __

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-05-01 Thread Chris B via cfe-commits
https://github.com/llvm-beanz requested changes to this pull request. I'm marking this as requesting changes because I don't think we should land this as-is. https://github.com/llvm/llvm-project/pull/89836 ___ cfe-commits mailing list cfe-commits@list

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-05-01 Thread Dan Liew via cfe-commits
delcypher wrote: @rapidsna You may want to close this PR but I'll leave this up to you. https://github.com/llvm/llvm-project/pull/87596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-05-01 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna closed https://github.com/llvm/llvm-project/pull/87596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedCallArgsChecker] Ignore methods of WTF String classes. (PR #90704)

2024-05-01 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ approved this pull request. LGTM! The revert was caused entirely by something in the mock headers in tests right? https://github.com/llvm/llvm-project/pull/90704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [alpha.webkit.UncountedCallArgsChecker] Ignore methods of WTF String classes. (PR #90704)

2024-05-01 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: > LGTM! The revert was caused entirely by something in the mock headers in > tests right? Yeah, there were some typos in mock-types. Not sure why checks didn't catch it. https://github.com/llvm/llvm-project/pull/90704 ___ cfe-commits mai

[clang] [llvm] [AMDGPU] Extend __builtin_amdgcn_sched_group_barrier to support rules. (PR #85304)

2024-05-01 Thread Jeffrey Byrnes via cfe-commits
https://github.com/jrbyrnes updated https://github.com/llvm/llvm-project/pull/85304 >From 04dc59ff7757dea18e2202d1cbff1d675885fdae Mon Sep 17 00:00:00 2001 From: Jeffrey Byrnes Date: Tue, 12 Mar 2024 10:22:24 -0700 Subject: [PATCH 1/4] [AMDGPU] Extend __builtin_amdgcn_sched_group_barrier to su

[clang] [llvm] [AMDGPU] Extend __builtin_amdgcn_sched_group_barrier to support rules. (PR #85304)

2024-05-01 Thread Jeffrey Byrnes via cfe-commits
@@ -437,16 +437,18 @@ void test_sched_group_barrier() } // CHECK-LABEL: @test_sched_group_barrier_rule -// CHECK: call void @llvm.amdgcn.sched.group.barrier.rule(i32 0, i32 1, i32 2, i32 0) -// CHECK: call void @llvm.amdgcn.sched.group.barrier.rule(i32 1, i32 2, i32 4, i32 0

[clang] [clang][SPARC] Treat empty structs as if it's a one-bit type in the CC (PR #90338)

2024-05-01 Thread via cfe-commits
@@ -263,7 +263,10 @@ SparcV9ABIInfo::classifyType(QualType Ty, unsigned SizeLimit) const { CoerceBuilder CB(getVMContext(), getDataLayout()); CB.addStruct(0, StrTy); - CB.pad(llvm::alignTo(CB.DL.getTypeSizeInBits(StrTy), 64)); + // All structs, even empty ones, should t

[clang] [llvm] Implement resource binding type prefix mismatch errors (PR #87578)

2024-05-01 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/87578 >From 3960050439964fe3c0536696490b284a6c470cd1 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 3 Apr 2024 13:15:59 -0700 Subject: [PATCH 01/12] implement binding type error for t/cbuffers and rwbuffers

[clang] [WebAssembly] Disable reference types in generic CPU (PR #90792)

2024-05-01 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/90792 #80923 newly enabled multivalue and reference-types in the generic CPU. But enabling reference-types ended up breaking up Wasm's Chromium CI (https://chromium-review.googlesource.com/c/emscripten-releases/+/5500

[clang] [WebAssembly] Disable reference types in generic CPU (PR #90792)

2024-05-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-webassembly @llvm/pr-subscribers-clang Author: Heejin Ahn (aheejin) Changes #80923 newly enabled multivalue and reference-types in the generic CPU. But enabling reference-types ended up breaking up Wasm's Chromium CI (https://chromium-review.go

[clang] [clang][SPARC] Treat empty structs as if it's a one-bit type in the CC (PR #90338)

2024-05-01 Thread via cfe-commits
@@ -21,6 +21,12 @@ char f_int_4(char x) { return x; } // CHECK-LABEL: define{{.*}} fp128 @f_ld(fp128 noundef %x) long double f_ld(long double x) { return x; } +// Empty struct is lowered as a placeholder word parameter. +struct empty {}; + +// CHECK-LABEL: define{{.*}} i64 @f_

[clang] [clang][SPARC] Treat empty structs as if it's a one-bit type in the CC (PR #90338)

2024-05-01 Thread via cfe-commits
https://github.com/koachan updated https://github.com/llvm/llvm-project/pull/90338 >From 5935e661941fd681b2bf6b3d915e97fe0d73fcd8 Mon Sep 17 00:00:00 2001 From: Koakuma Date: Thu, 25 Apr 2024 22:37:03 +0700 Subject: [PATCH 1/2] [clang][SPARC] Treat empty structs as if it's a one-bit type in th

[clang] [llvm] [Libomptarget] Statically link all plugin runtimes (PR #87009)

2024-05-01 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/87009 >From 473a4b9bad09bd9af8186932984be7696711692e Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 28 Mar 2024 16:18:19 -0500 Subject: [PATCH] [Libomptarget] Statically link all plugin runtimes Summary: This

[clang] [WebAssembly] Disable reference types in generic CPU (PR #90792)

2024-05-01 Thread Derek Schuff via cfe-commits
https://github.com/dschuff approved this pull request. https://github.com/llvm/llvm-project/pull/90792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC} Implement SubArray Parsing/Sema (PR #90796)

2024-05-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/90796 This implementation takes quite a bit from the OMP implementation of array sections, but only has to enforce the rules as applicable to OpenACC. Additionally, it does its best to create an AST node (with the

[clang] [OpenACC} Implement SubArray Parsing/Sema (PR #90796)

2024-05-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes This implementation takes quite a bit from the OMP implementation of array sections, but only has to enforce the rules as applicable to OpenACC. Additionally, it does its best to create an AST node (with

[clang] [WebAssembly] Disable reference types in generic CPU (PR #90792)

2024-05-01 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin edited https://github.com/llvm/llvm-project/pull/90792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Libomptarget] Statically link all plugin runtimes (PR #87009)

2024-05-01 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/87009 >From 8c4b7ffb49c8f91768af3bec00669bac5433ec0f Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 28 Mar 2024 16:18:19 -0500 Subject: [PATCH] [Libomptarget] Statically link all plugin runtimes Summary: This

[clang] Fix sanitize problem. (PR #90800)

2024-05-01 Thread via cfe-commits
https://github.com/jyu2-git created https://github.com/llvm/llvm-project/pull/90800 Currently isMapType could return OpenMPMapModifierKind. The change is to return OpenMPMapTypeKind only, if it is not MapType Kind OMPC_MAP_unknown is returned. >From ef84e989066318f0f7652080b471c91f8cb1360e Mo

[clang] Fix sanitize problem. (PR #90800)

2024-05-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (jyu2-git) Changes Currently isMapType could return OpenMPMapModifierKind. The change is to return OpenMPMapTypeKind only, if it is not MapType Kind OMPC_MAP_unknown is returned. --- Full diff: https://github.com/llvm/llvm-project/p

[clang] [WebAssembly] Disable reference types in generic CPU (PR #90792)

2024-05-01 Thread Heejin Ahn via cfe-commits
aheejin wrote: Will land this given that this is necessary to unblock the rolls and the full CI will take more than a full day. https://github.com/llvm/llvm-project/pull/90792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] 8c64a30 - [WebAssembly] Disable reference types in generic CPU (#90792)

2024-05-01 Thread via cfe-commits
Author: Heejin Ahn Date: 2024-05-01T16:50:58-07:00 New Revision: 8c64a304123b77d598eda73a14cf3ff0ec7970dc URL: https://github.com/llvm/llvm-project/commit/8c64a304123b77d598eda73a14cf3ff0ec7970dc DIFF: https://github.com/llvm/llvm-project/commit/8c64a304123b77d598eda73a14cf3ff0ec7970dc.diff LO

[clang] [WebAssembly] Disable reference types in generic CPU (PR #90792)

2024-05-01 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin closed https://github.com/llvm/llvm-project/pull/90792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4b75fcf - Triple::normalize: Use none as OS for XX-none-ABI (#89638)

2024-05-01 Thread via cfe-commits
Author: YunQiang Su Date: 2024-05-02T08:04:53+08:00 New Revision: 4b75fcf0a50f4be955b611e8e20d84d90ea133c8 URL: https://github.com/llvm/llvm-project/commit/4b75fcf0a50f4be955b611e8e20d84d90ea133c8 DIFF: https://github.com/llvm/llvm-project/commit/4b75fcf0a50f4be955b611e8e20d84d90ea133c8.diff L

<    1   2   3   4   >