[clang] [llvm] [InstCombine] Infer nusw + nneg -> nuw for getelementptr (PR #111144)

2024-10-05 Thread Yingwei Zheng via cfe-commits
@@ -3096,6 +3096,15 @@ Instruction *InstCombinerImpl::visitGetElementPtrInst(GetElementPtrInst &GEP) { } } + // nusw + nneg -> nuw + if (GEP.hasNoUnsignedSignedWrap() && !GEP.hasNoUnsignedWrap() && + all_of(GEP.indices(), [&](Value *Idx) { +return isKnown

[clang-tools-extra] [clang-tidy] Avoid capturing a local variable in a static lambda in UseRangesCheck (PR #111282)

2024-10-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/111282 Fixes https://github.com/llvm/llvm-project/issues/109367 >From d7ec29dc8852c4ae8b239daff11acc42caf4d544 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 6 Oct 2024 01:45:35 -0400 Subject: [PATCH] [

[clang-tools-extra] [clang-tidy] Avoid capturing a local variable in a static lambda in UseRangesCheck (PR #111282)

2024-10-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Nathan Ridge (HighCommander4) Changes Fixes https://github.com/llvm/llvm-project/issues/109367 --- Full diff: https://github.com/llvm/llvm-project/pull/111282.diff 2 Files Affected: - (modified) clang-tools-extra/clang-tidy/boost/U

[clang-tools-extra] [clang-tidy] Avoid capturing a local variable in a static lambda in UseRangesCheck (PR #111282)

2024-10-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Nathan Ridge (HighCommander4) Changes Fixes https://github.com/llvm/llvm-project/issues/109367 --- Full diff: https://github.com/llvm/llvm-project/pull/111282.diff 2 Files Affected: - (modified) clang-tools-extra/clang-tidy/boost/UseRa

[clang-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

2024-10-05 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > It crashes most likely because a local variable is captured in the static > lambda. > > https://github.com/llvm/llvm-project/blob/bf895c714e1f8a51c1e565a75acf60bf7197be51/clang-tools-extra/clang-tidy/boost/UseRangesCheck.cpp#L208 Nice find! That does seem to be the prob

[clang] [clang] Don't lose track of explicit specializations of member functi… (PR #111267)

2024-10-05 Thread Younan Zhang via cfe-commits
@@ -4206,18 +4206,14 @@ Sema::InstantiateClassMembers(SourceLocation PointOfInstantiation, if (Function->hasAttr()) continue; -MemberSpecializationInfo *MSInfo = -Function->getMemberSpecializationInfo(); -assert(MSInfo && "No memb

[clang] [Clang] Remove the special-casing for RequiresExprBodyDecl in BuildResolvedCallExpr() after fd87d765c0 (PR #111277)

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

[clang] [Clang] Remove the special-casing for RequiresExprBodyDecl in BuildResolvedCallExpr() after fd87d765c0 (PR #111277)

2024-10-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes The special-casing for RequiresExprBodyDecl caused a regression, as reported in #110785. This also merged the test for #84020 together with that of #110785 into clang/test/SemaTemplate/instantiate-requires-e

[clang] [clang] Track function template instantiation from definition (PR #110387)

2024-10-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/110387 >From e6d3e6f1df5db1618c7302adac4b45b7aa451a34 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 28 Sep 2024 14:28:58 -0300 Subject: [PATCH] [clang] Track function template instantiation from definition

[clang] [clang] Track function template instantiation from definition (PR #110387)

2024-10-05 Thread Younan Zhang via cfe-commits
@@ -1994,8 +1995,10 @@ TemplateDeclInstantiator::VisitFunctionTemplateDecl(FunctionTemplateDecl *D) { // Link the instantiation back to the pattern *unless* this is a // non-definition friend declaration. if (!InstTemplate->getInstantiatedFromMemberTemplate() && - !

[clang] [clang] Track function template instantiation from definition (PR #110387)

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

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-10-05 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/107786 >From e9948a1004cc2b486a0422d83e88392754e9f7e9 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 23 Sep 2024 17:17:30 +0300 Subject: [PATCH 1/2] [Clang] prevent recovery call expression from proceeding w

[clang-tools-extra] [clang-tidy] Make `P +- BS / sizeof(*P)` opt-outable in `bugprone-sizeof-expression` (PR #111178)

2024-10-05 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank approved this pull request. LGTM, nits. Maybe give a bit of time for others to take a look. https://github.com/llvm/llvm-project/pull/78 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang-tools-extra] [clang-tidy] Make `P +- BS / sizeof(*P)` opt-outable in `bugprone-sizeof-expression` (PR #111178)

2024-10-05 Thread Nicolas van Kempen via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %check_clang_tidy %s bugprone-sizeof-expression %t -- \ +// RUN: -config="{CheckOptions: [{key: bugprone-sizeof-expression.WarnOnSizeOfPointerArithmeticWithDivisionScaled, value: 0}]}" nicovank wrote: ```suggestion // RUN: %check_cla

[clang-tools-extra] [clang-tidy] Make `P +- BS / sizeof(*P)` opt-outable in `bugprone-sizeof-expression` (PR #111178)

2024-10-05 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank edited https://github.com/llvm/llvm-project/pull/78 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Make `P +- BS / sizeof(*P)` opt-outable in `bugprone-sizeof-expression` (PR #111178)

2024-10-05 Thread Nicolas van Kempen via cfe-commits
@@ -306,8 +310,13 @@ void SizeofExpressionCheck::registerMatchers(MatchFinder *Finder) { unaryExprOrTypeTraitExpr(ofKind(UETT_AlignOf)), offsetOfExpr())) .bind("sizeof-in-ptr-arithmetic-scale-expr"); + const auto PtrArithmeticIntege

[clang-tools-extra] [clang-tidy] Make `P +- BS / sizeof(*P)` opt-outable in `bugprone-sizeof-expression` (PR #111178)

2024-10-05 Thread Nicolas van Kempen via cfe-commits
@@ -31,6 +31,7 @@ class SizeofExpressionCheck : public ClangTidyCheck { const bool WarnOnSizeOfCompareToConstant; const bool WarnOnSizeOfPointerToAggregate; const bool WarnOnSizeOfPointer; + const bool WarnOnSizeOfPointerArithmeticWithDivisionScaled; nic

[clang] [clang] CWG2398: improve overload resolution backwards compat (PR #107350)

2024-10-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/107350 >From 9b12c0b5a0b701984a83308273385c53ced29e41 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Thu, 5 Sep 2024 00:25:40 -0300 Subject: [PATCH] [clang] CWG2398: improve overload resolution backwards compat

[clang] [ByteCode] Avoid repeated hash lookups (NFC) (PR #111273)

2024-10-05 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/111273 None >From 48c833ccac40522a563f6c1610eef409628a45d9 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 5 Oct 2024 10:22:58 -0700 Subject: [PATCH] [ByteCode] Avoid repeated hash lookups (NFC) --- cla

[clang] [Clang] Remove the special-casing for RequiresExprBodyDecl in BuildResolvedCallExpr() after fd87d765c0 (PR #111277)

2024-10-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/111277 >From 995603864598bcb826db8477406ee5f17bbe0548 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sun, 6 Oct 2024 12:46:21 +0800 Subject: [PATCH] [Clang] Remove the special-casing for RequiresExprBodyDecl in Bui

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

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

[clang] [Clang] Remove the special-casing for RequiresExprBodyDecl in BuildResolvedCallExpr() after fd87d765c0 (PR #111277)

2024-10-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/111277 The special-casing for RequiresExprBodyDecl caused a regression, as reported in #110785. This also merged the test for #84020 together with that of #110785 into clang/test/SemaTemplate/instantiate-requires-exp

[clang] [clang] Track function template instantiation from definition (PR #110387)

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

[clang] [ByteCode] Avoid repeated hash lookups (NFC) (PR #111273)

2024-10-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/111273.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/Program.cpp (+5-7) ``diff diff --git a/clang/lib/AST/ByteCode/Pr

[clang] [StaticAnalyzer] Avoid repeated hash lookups (NFC) (PR #111272)

2024-10-05 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/111272 None >From 9a5ad987040ed16478cd119814dc99ebc3d9d177 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 5 Oct 2024 10:24:52 -0700 Subject: [PATCH] [StaticAnalyzer] Avoid repeated hash lookups (NFC) --

[clang] [StaticAnalyzer] Avoid repeated hash lookups (NFC) (PR #111272)

2024-10-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/111272.diff 1 Files Affected: - (modified) clang/lib/StaticAnalyzer/Core/CheckerManager.cpp (+11-15) ``diff diff --git a/clang/lib

[clang] [clang][bytecode] Handle UETT_OpenMPRequiredSimdAlign (PR #111259)

2024-10-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-hwasan` running on `sanitizer-buildbot12` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/55/builds/2533 Here is the rel

[clang] 73683cc - [Basic] Avoid repeated hash lookups (NFC) (#111228)

2024-10-05 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-10-05T12:11:01-07:00 New Revision: 73683cc1ab0fe79a4b02b956cf3c033250537bff URL: https://github.com/llvm/llvm-project/commit/73683cc1ab0fe79a4b02b956cf3c033250537bff DIFF: https://github.com/llvm/llvm-project/commit/73683cc1ab0fe79a4b02b956cf3c033250537bff.diff L

[clang] [Basic] Avoid repeated hash lookups (NFC) (PR #111228)

2024-10-05 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/111228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow `pragma float_control(precise, *)` to... (PR #105912)

2024-10-05 Thread Egor Chesakov via cfe-commits
https://github.com/echesakov updated https://github.com/llvm/llvm-project/pull/105912 >From 1231a5658bf7dde633e2d84967c6e540b3259e4b Mon Sep 17 00:00:00 2001 From: Egor Chesakov <5292656+echesa...@users.noreply.github.com> Date: Sat, 5 Oct 2024 12:22:27 -0700 Subject: [PATCH] [clang] Allow `Cond

[clang] [clang] Allow `ConditionalOperator` fast-math flags to be overridden by `pragma float_control` (PR #105912)

2024-10-05 Thread Egor Chesakov via cfe-commits
echesakov wrote: > Can you reword the description to have less wrapping @arsenm @zahiraam Updated the commit/PR and added more details on the issue. https://github.com/llvm/llvm-project/pull/105912 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [Basic] Avoid repeated hash lookups (NFC) (PR #111228)

2024-10-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/4980 Here is the relevant piece of the build log

[clang] [clang] Allow `ConditionalOperator` fast-math flags to be overridden by `pragma float_control` (PR #105912)

2024-10-05 Thread Egor Chesakov via cfe-commits
https://github.com/echesakov edited https://github.com/llvm/llvm-project/pull/105912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow `ConditionalOperator` fast-math flags to be overridden by `pragma float_control` (PR #105912)

2024-10-05 Thread Egor Chesakov via cfe-commits
https://github.com/echesakov edited https://github.com/llvm/llvm-project/pull/105912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Track function template instantiation from definition (PR #110387)

2024-10-05 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I pushed a new implementation for this fix. I have updated the implementation of InstantiateFunctionDefinition so that it doesn't depend anymore on having the exact function declaration instantiation which has the same template context as the definition. This avoids the more e

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-05 Thread Farzon Lotfi via cfe-commits
@@ -1874,6 +1874,26 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { return true; break; } + case Builtin::BI__builtin_hlsl_elementwise_firstbithigh: { +if (SemaRef.PrepareBuiltinElementwiseMathOneArgCall(TheCall)) + ret

[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

2024-10-05 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/110761 >From 9c69d6584d6b71554aec55f0de52abb4baa9435f Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 2 Oct 2024 02:13:51 +0300 Subject: [PATCH 1/8] [Clang] omit parentheses in fold expressions with a single

[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

2024-10-05 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/110761 >From 9c69d6584d6b71554aec55f0de52abb4baa9435f Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 2 Oct 2024 02:13:51 +0300 Subject: [PATCH 1/8] [Clang] omit parentheses in fold expressions with a single

[clang] [clang][bytecode] Save a per-Block IsWeak bit (PR #111248)

2024-10-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/111248 Checking the decl for every load is rather expensive. >From 7011cb6a67c154f2d93036dfcaa381f83e070f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 5 Oct 2024 12:56:31 +0200 Subject: [

[clang] [clang][bytecode] Save a per-Block IsWeak bit (PR #111248)

2024-10-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Checking the decl for every load is rather expensive. --- Full diff: https://github.com/llvm/llvm-project/pull/111248.diff 5 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBlock.cpp (+2-2) - (m

[clang] Effect analysis: correctly detect `(x ? a : b)` as nonblocking when a and b are (PR #111224)

2024-10-05 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos updated https://github.com/llvm/llvm-project/pull/111224 >From 02398e6398892dac5d151a6e425bf107213e12a8 Mon Sep 17 00:00:00 2001 From: Doug Wyatt Date: Fri, 4 Oct 2024 18:28:37 -0700 Subject: [PATCH 1/3] Effect analysis: correctly detect `(f ? a : b)` as nonblockin

[clang] [clang][bytecode] Handle UETT_OpenMPRequiredSimdAlign (PR #111259)

2024-10-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/7135 Here is the

[clang] [clang][bytecode] Handle UETT_OpenMPRequiredSimdAlign (PR #111259)

2024-10-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/4972 Here is the relevant piece of the build log

[clang] [clang][bytecode] Handle UETT_OpenMPRequiredSimdAlign (PR #111259)

2024-10-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-solaris11-sparcv9` running on `solaris11-sparcv9` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/13/builds/2705 Here is the relevant piece of t

[clang] 020b8e8 - [clang][test] Remove a broken bytecode test

2024-10-05 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-10-05T18:46:21+02:00 New Revision: 020b8e8f8dfef2392351e66215d11cccb573a88f URL: https://github.com/llvm/llvm-project/commit/020b8e8f8dfef2392351e66215d11cccb573a88f DIFF: https://github.com/llvm/llvm-project/commit/020b8e8f8dfef2392351e66215d11cccb573a88f.diff LO

[clang] 8aa76d3 - [Driver] Avoid repeated hash lookups (NFC) (#111225)

2024-10-05 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-10-05T09:49:49-07:00 New Revision: 8aa76d34ea95031abed32761251951c5f87492c6 URL: https://github.com/llvm/llvm-project/commit/8aa76d34ea95031abed32761251951c5f87492c6 DIFF: https://github.com/llvm/llvm-project/commit/8aa76d34ea95031abed32761251951c5f87492c6.diff L

[clang] [Driver] Avoid repeated hash lookups (NFC) (PR #111225)

2024-10-05 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/111225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Avoid repeated hash lookups (NFC) (PR #111227)

2024-10-05 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/111227 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e8f01b0 - [Sema] Avoid repeated hash lookups (NFC) (#111227)

2024-10-05 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-10-05T09:51:12-07:00 New Revision: e8f01b0557354a28d17bfe618df5e257ec3e982a URL: https://github.com/llvm/llvm-project/commit/e8f01b0557354a28d17bfe618df5e257ec3e982a DIFF: https://github.com/llvm/llvm-project/commit/e8f01b0557354a28d17bfe618df5e257ec3e982a.diff L

[clang] [Basic] Avoid repeated hash lookups (NFC) (PR #111228)

2024-10-05 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/111228 >From 2e3d116613a7441b31036cf603d581db6e0afe9b Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 4 Oct 2024 08:00:11 -0700 Subject: [PATCH 1/2] [Basic] Avoid repeated hash lookups (NFC) --- clang/li

[clang] [Basic] Avoid repeated hash lookups (NFC) (PR #111228)

2024-10-05 Thread Kazu Hirata via cfe-commits
@@ -92,11 +92,10 @@ parseTargetIDWithFormatCheckingOnly(llvm::StringRef TargetID, if (Sign != '+' && Sign != '-') return std::nullopt; bool IsOn = Sign == '+'; -auto Loc = FeatureMap->find(Feature); +auto [Loc, Inserted] = FeatureMap->try_emplace(Feature,

[clang] [Basic] Avoid repeated hash lookups (NFC) (PR #111228)

2024-10-05 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: Please take a look. Thanks! https://github.com/llvm/llvm-project/pull/111228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Basic] Avoid repeated hash lookups (NFC) (PR #111228)

2024-10-05 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/111228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow `pragma float_control(precise, *)` to... (PR #105912)

2024-10-05 Thread Egor Chesakov via cfe-commits
@@ -0,0 +1,36 @@ +// RUN: %clang_cc1 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -disable-llvm-passes -emit-llvm -menable-no-infs -fapprox-func\ +// RUN: -funsafe-math-optimizations -fno-signed-zeros -mreassociate -freciprocal-math\ +// RUN: -ffp-c

[clang] [clang][bytecode] Handle UETT_OpenMPRequiredSimdAlign (PR #111259)

2024-10-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-arm64-windows-msvc` running on `linaro-armv8-windows-msvc-04` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/161/builds/2552 Here is the relev

[clang] [clang] Allow `pragma float_control(precise, *)` to... (PR #105912)

2024-10-05 Thread Egor Chesakov via cfe-commits
@@ -0,0 +1,36 @@ +// RUN: %clang_cc1 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -disable-llvm-passes -emit-llvm -menable-no-infs -fapprox-func\ +// RUN: -funsafe-math-optimizations -fno-signed-zeros -mreassociate -freciprocal-math\ +// RUN: -ffp-c

[clang] [clang] Allow `pragma float_control(precise, *)` to... (PR #105912)

2024-10-05 Thread Egor Chesakov via cfe-commits
https://github.com/echesakov updated https://github.com/llvm/llvm-project/pull/105912 >From 124a1c4c7c102421b74eaaa1133ea58a9017e07b Mon Sep 17 00:00:00 2001 From: Egor Chesakov <5292656+echesa...@users.noreply.github.com> Date: Fri, 23 Aug 2024 18:44:14 -0700 Subject: [PATCH 1/2] [clang] Allow

[clang] [clang] Allow `pragma float_control(precise, *)` to... (PR #105912)

2024-10-05 Thread Egor Chesakov via cfe-commits
echesakov wrote: > Not very clear to me what the issue is. Can you please explain this in the > description. I think here the `#pragma float_control(precise, on)` should be > taking precedence over the `-ffast-math` flag and it's not. Right? @zahiraam Correct, this is not happening right now a

[clang] [NFC][rtsan] Update docs to include [[clang::blocking]] (PR #111249)

2024-10-05 Thread Chris Apple via cfe-commits
https://github.com/cjappl approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/111249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][rtsan] Update docs to include [[clang::blocking]] (PR #111249)

2024-10-05 Thread Chris Apple via cfe-commits
@@ -58,31 +58,71 @@ code. return 0; } # Compile and link - % clang++ -fsanitize=realtime -g example_realtime_violation.cpp + % clang++ -fsanitize=realtime example_realtime_violation.cpp If a real-time safety violation is detected in a ``[[clang::nonblocking]]`

[clang] [NFC][rtsan] Update docs to include [[clang::blocking]] (PR #111249)

2024-10-05 Thread Chris Apple via cfe-commits
https://github.com/cjappl edited https://github.com/llvm/llvm-project/pull/111249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][rtsan] Update docs to include [[clang::blocking]] (PR #111249)

2024-10-05 Thread via cfe-commits
https://github.com/davidtrevelyan updated https://github.com/llvm/llvm-project/pull/111249 >From cb9d14bf2341f8570f29124ec26460811aa9eba9 Mon Sep 17 00:00:00 2001 From: David Trevelyan Date: Sat, 5 Oct 2024 12:34:23 +0100 Subject: [PATCH 1/2] [NFC][rtsan] Update docs to include [[clang::blockin

[clang] [NFC][rtsan] Update docs to include [[clang::blocking]] (PR #111249)

2024-10-05 Thread via cfe-commits
@@ -58,31 +58,71 @@ code. return 0; } # Compile and link - % clang++ -fsanitize=realtime -g example_realtime_violation.cpp + % clang++ -fsanitize=realtime example_realtime_violation.cpp If a real-time safety violation is detected in a ``[[clang::nonblocking]]`

[clang] [clang] Don't lose track of explicit specializations of member functi… (PR #111267)

2024-10-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/111267 …on templates When instantiating a class template, we would lose track of function template explicit specializations, marking them with the wrong specialization kind. This would lead to improperly using the e

[clang] [clang] Don't lose track of explicit specializations of member functi… (PR #111267)

2024-10-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes …on templates When instantiating a class template, we would lose track of function template explicit specializations, marking them with the wrong specialization kind. This would lead to improperly using

[clang] 47e6d18 - [NFC][rtsan] Update docs to include [[clang::blocking]] (#111249)

2024-10-05 Thread via cfe-commits
Author: davidtrevelyan Date: 2024-10-05T13:46:32-07:00 New Revision: 47e6d1816251e90b3d589710c5203a92c6015a7c URL: https://github.com/llvm/llvm-project/commit/47e6d1816251e90b3d589710c5203a92c6015a7c DIFF: https://github.com/llvm/llvm-project/commit/47e6d1816251e90b3d589710c5203a92c6015a7c.diff

[clang] [NFC][rtsan] Update docs to include [[clang::blocking]] (PR #111249)

2024-10-05 Thread Chris Apple via cfe-commits
https://github.com/cjappl closed https://github.com/llvm/llvm-project/pull/111249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][rtsan] Update docs to include [[clang::blocking]] (PR #111249)

2024-10-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang` at step 10 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/6650 Here is the r

[clang] [clang] Track function template instantiation from definition (PR #110387)

2024-10-05 Thread Matheus Izvekov via cfe-commits
@@ -5185,9 +5189,24 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, RebuildTypeSourceInfoForDefaultSpecialMembers(); SetDeclDefaulted(Function, PatternDecl->getLocation()); } else { +NamedDecl *ND = Function; +std::optional> I

[clang] [clang] Track function template instantiation from definition (PR #110387)

2024-10-05 Thread Matheus Izvekov via cfe-commits
@@ -492,8 +489,10 @@ MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs( // has a depth of 0. if (const auto *TTP = dyn_cast(CurDecl)) HandleDefaultTempArgIntoTempTempParam(TTP, Result); -CurDecl = Response::UseNextDecl(CurDecl).NextDecl; - }

[clang] [clang] Don't lose track of explicit specializations of member functi… (PR #111267)

2024-10-05 Thread Younan Zhang via cfe-commits
@@ -4206,18 +4206,14 @@ Sema::InstantiateClassMembers(SourceLocation PointOfInstantiation, if (Function->hasAttr()) continue; -MemberSpecializationInfo *MSInfo = -Function->getMemberSpecializationInfo(); -assert(MSInfo && "No memb

[clang] [clang] Don't lose track of explicit specializations of member functi… (PR #111267)

2024-10-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Makes sense to me, but I'd like to @erichkeane to have a look as well. https://github.com/llvm/llvm-project/pull/111267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [clang] Don't lose track of explicit specializations of member functi… (PR #111267)

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

[clang] [clang] Don't lose track of explicit specializations of member functi… (PR #111267)

2024-10-05 Thread Younan Zhang via cfe-commits
@@ -156,7 +156,13 @@ namespace UsesThis { auto h() -> decltype(this); // expected-error {{'this' cannot be used in a static member function declaration}} }; - template struct A; // expected-note 3{{in instantiation of}} + template struct A; // expected-note {{in insta

[clang] [clang] Track function template instantiation from definition (PR #110387)

2024-10-05 Thread Younan Zhang via cfe-commits
@@ -5185,9 +5189,24 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, RebuildTypeSourceInfoForDefaultSpecialMembers(); SetDeclDefaulted(Function, PatternDecl->getLocation()); } else { +NamedDecl *ND = Function; +std::optional> I

[clang] clang-format: Add AlignFunctionDeclarations attribute to AlignConsecutiveDeclarations (PR #108241)

2024-10-05 Thread Brad House via cfe-commits
bradh352 wrote: ping https://github.com/llvm/llvm-project/pull/108241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Track function template instantiation from definition (PR #110387)

2024-10-05 Thread Matheus Izvekov via cfe-commits
@@ -1994,8 +1995,10 @@ TemplateDeclInstantiator::VisitFunctionTemplateDecl(FunctionTemplateDecl *D) { // Link the instantiation back to the pattern *unless* this is a // non-definition friend declaration. if (!InstTemplate->getInstantiatedFromMemberTemplate() && - !

[clang] [clang] Don't lose track of explicit specializations of member functi… (PR #111267)

2024-10-05 Thread Matheus Izvekov via cfe-commits
@@ -156,7 +156,13 @@ namespace UsesThis { auto h() -> decltype(this); // expected-error {{'this' cannot be used in a static member function declaration}} }; - template struct A; // expected-note 3{{in instantiation of}} + template struct A; // expected-note {{in insta

[clang] [clang] Don't lose track of explicit specializations of member functi… (PR #111267)

2024-10-05 Thread Matheus Izvekov via cfe-commits
@@ -4206,18 +4206,14 @@ Sema::InstantiateClassMembers(SourceLocation PointOfInstantiation, if (Function->hasAttr()) continue; -MemberSpecializationInfo *MSInfo = -Function->getMemberSpecializationInfo(); -assert(MSInfo && "No memb

[clang] [Driver] Avoid repeated hash lookups (NFC) (PR #111225)

2024-10-05 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/111225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Avoid repeated hash lookups (NFC) (PR #111227)

2024-10-05 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/111227 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Basic] Avoid repeated hash lookups (NFC) (PR #111228)

2024-10-05 Thread Nikita Popov via cfe-commits
@@ -92,11 +92,10 @@ parseTargetIDWithFormatCheckingOnly(llvm::StringRef TargetID, if (Sign != '+' && Sign != '-') return std::nullopt; bool IsOn = Sign == '+'; -auto Loc = FeatureMap->find(Feature); +auto [Loc, Inserted] = FeatureMap->try_emplace(Feature,

[clang] [NFC][rtsan] Update docs to include [[clang::blocking]] (PR #111249)

2024-10-05 Thread via cfe-commits
https://github.com/davidtrevelyan created https://github.com/llvm/llvm-project/pull/111249 Updates the RealtimeSanitizer documentation to: - include information about how to use `[[clang::blocking]]`, and - update the displayed error messages to the latest style @cjappl for review >From cb9d

[clang] [NFC][rtsan] Update docs to include [[clang::blocking]] (PR #111249)

2024-10-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (davidtrevelyan) Changes Updates the RealtimeSanitizer documentation to: - include information about how to use `[[clang::blocking]]`, and - update the displayed error messages to the latest style @cjappl for review --- Full diff:

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-05 Thread Sarah Spall via cfe-commits
spall wrote: > It is not correct to limit firstbithigh to 32 bit integers. There are a > couple of reasons that might make one think that it is, but we do in fact > want/need to support int16 and int64 here. > > 1. The [HLSL > docs](https://learn.microsoft.com/en-us/windows/win32/direct3d

[clang] WIP Add suppress weak loop assumptions visitor (PR #111258)

2024-10-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/111258 This is an alternative implementation of the idea present in #109804. In this implementation, the suppression is purely implemented by a `BugReportVisitor`, to avoid coupling the suppression with the engine it

[clang] WIP Add suppress weak loop assumptions visitor (PR #111258)

2024-10-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes This is an alternative implementation of the idea present in #109804. In this implementation, the suppression is purely implemented by a `BugReportVisitor`, to avoid coupling the suppress

[clang] [analyzer] Suppress out of bounds reports after weak loop assumptions (PR #109804)

2024-10-05 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: steakhal wrote: I implemented my idea of doing this suppression sole within a BugReport visitor in PR #111258. Let me kn

[clang] [analyzer] Fix wrong `builtin_*_overflow` return type (PR #111253)

2024-10-05 Thread Pavel Skripkin via cfe-commits
pskrgag wrote: CI looks unrelated ``` bk;t=1728134304433Failed Tests (1): _bk;t=1728134304433 LLVM :: Transforms/InstCombine/and-or-icmps.ll ``` Should I re-trigger it just in case? https://github.com/llvm/llvm-project/pull/111253 ___ cfe-commi

[clang] fba6c88 - [analyzer] Fix wrong `builtin_*_overflow` return type (#111253)

2024-10-05 Thread via cfe-commits
Author: Pavel Skripkin Date: 2024-10-05T17:21:31+02:00 New Revision: fba6c887c110a501b311f6b01721eaf3a5dd994e URL: https://github.com/llvm/llvm-project/commit/fba6c887c110a501b311f6b01721eaf3a5dd994e DIFF: https://github.com/llvm/llvm-project/commit/fba6c887c110a501b311f6b01721eaf3a5dd994e.diff

[clang] [analyzer] Fix wrong `builtin_*_overflow` return type (PR #111253)

2024-10-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/111253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix wrong `builtin_*_overflow` return type (PR #111253)

2024-10-05 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag created https://github.com/llvm/llvm-project/pull/111253 `builtin_*_overflow` functions return `_Bool` according to [1]. `BuiltinFunctionChecker` was using `makeTruthVal` for return type, which creates an `int` value, since it's the type of any compassion according t

[clang] [analyzer] Fix wrong `builtin_*_overflow` return type (PR #111253)

2024-10-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Pavel Skripkin (pskrgag) Changes `builtin_*_overflow` functions return `_Bool` according to [1]. `BuiltinFunctionChecker` was using `makeTruthVal` for return type, which creates an `int` value, since it's the type of any

[clang] [analyzer] Fix wrong `builtin_*_overflow` return type (PR #111253)

2024-10-05 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag updated https://github.com/llvm/llvm-project/pull/111253 >From 4f5fc3e12747064b35c490e510c63702afc8a800 Mon Sep 17 00:00:00 2001 From: Pavel Skripkin Date: Sat, 5 Oct 2024 15:58:15 +0300 Subject: [PATCH 1/2] clang/csa: fix wrong __builtin_*_overflow return type ---

[clang] [analyzer] Fix wrong `builtin_*_overflow` return type (PR #111253)

2024-10-05 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 91fdfec263ff2b8e88433c4294a550cabb0f2314 4f5fc3e12747064b35c490e510c63702afc8a800 --e

[clang] WIP Add suppress weak loop assumptions visitor (PR #111258)

2024-10-05 Thread Balazs Benics via cfe-commits
steakhal wrote: Ideally, I should use a location context and expr pairs a map keys, to make sure these numbers are kept separate for different stack frames. I leave it for the reader this time, to not complicate things further. Once we settle, I'll do that too. https://github.com/llvm/llvm-pr

[clang] [analyzer] Fix wrong `builtin_*_overflow` return type (PR #111253)

2024-10-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM, thanks. https://github.com/llvm/llvm-project/pull/111253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix wrong `builtin_*_overflow` return type (PR #111253)

2024-10-05 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag edited https://github.com/llvm/llvm-project/pull/111253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4e5f8a8 - [clang][bytecode] Save a per-Block IsWeak bit (#111248)

2024-10-05 Thread via cfe-commits
Author: Timm Baeder Date: 2024-10-05T17:35:52+02:00 New Revision: 4e5f8a8f0bf855fdac93fa09b4b82b69339235b9 URL: https://github.com/llvm/llvm-project/commit/4e5f8a8f0bf855fdac93fa09b4b82b69339235b9 DIFF: https://github.com/llvm/llvm-project/commit/4e5f8a8f0bf855fdac93fa09b4b82b69339235b9.diff L

[clang] [clang][bytecode] Save a per-Block IsWeak bit (PR #111248)

2024-10-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/111248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >