[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-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] [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 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] [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] 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] 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 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] [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] [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] [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] [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 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] [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] [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] [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] 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] 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 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] 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] [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] 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] 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] 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
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
@@ -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
@@ -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 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] 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 commented: Thanks for taking another look at it. My main concern is that changes in `getTemplateInstantiationArgs()` would conflict with @sdkrystian's recent work, so if these changes are necessary, I suggest we merge this one after the refactoring patch lands, WDYT?

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

2024-10-05 Thread Younan Zhang via cfe-commits
@@ -1829,7 +1831,7 @@ class DeclContext { /// exactly 64 bits and thus the width of NumCtorInitializers /// will need to be shrunk if some bit is added to NumDeclContextBitfields, /// NumFunctionDeclBitfields or CXXConstructorDeclBitfields. -uint64_t NumCtorInit

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

2024-10-05 Thread Younan Zhang 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] Track function template instantiation from definition (PR #110387)

2024-10-05 Thread Younan Zhang 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] 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] 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-tools-extra] [clang-tidy] Make `P +- BS / sizeof(*P)` opt-outable in `bugprone-sizeof-expression` (PR #111178)

2024-10-05 Thread Daniel Pouzzner via cfe-commits
douzzer wrote: The first draft solution worked perfectly for me, tested via cherry pick. Will keep an eye on this PR in case the key name changes. Thanks @whisperity! https://github.com/llvm/llvm-project/pull/78 ___ cfe-commits mailing list cfe

[compiler-rt] [libunwind] [AArch64] Fix nofp regressions in compiler-rt and libunwind (PR #111235)

2024-10-05 Thread Keith Packard via cfe-commits
https://github.com/keith-packard updated https://github.com/llvm/llvm-project/pull/111235 >From 048cb1b0ea65fb758e104376c0bff345eab67623 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 4 Oct 2024 21:06:37 -0700 Subject: [PATCH 1/2] [libunwind] Support aarch64 without FPU ldp and stp in

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

2024-10-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes With this change, we discriminate if the primary template and which partial specializations would have participated in overload resolution prior to P0522 changes. We collect those in an initial set. If

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

2024-10-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov ready_for_review https://github.com/llvm/llvm-project/pull/107350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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-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-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
@@ -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 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] [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] [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] [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] 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] [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] [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] [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] [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 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 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] [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] [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] 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] [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] [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] [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 `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] [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] 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] [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-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-10-05 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe updated https://github.com/llvm/llvm-project/pull/97911 >From 2dd0902d5f79a2b18f53649169bd011ccfbfb46b Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Wed, 12 Jun 2024 21:06:26 +0100 Subject: [PATCH] [clang-tidy] Only expand macros in modernize-use-std-format/prin

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

2024-10-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov 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] Track function template instantiation from definition (PR #110387)

2024-10-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov 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] Redeclare function templates instances per primary template (PR #110387)

2024-10-05 Thread Matheus Izvekov via cfe-commits
@@ -0,0 +1,84 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++26 %s mizvekov wrote: Yeah I think this is big enough to be on its own file. https://github.com/llvm/llvm-project/pull/110387 ___ cfe-commits mailing l

[clang] [clang] Redeclare function templates instances per primary template (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 0ac3d1a93bbfcf50ed932ff149a48755819d4da0 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][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-aarch64-sve-vla-2stage` running on `linaro-g3-01` while building `clang` at step 12 "ninja check 2". Full details are available at: https://lab.llvm.org/buildbot/#/builders/41/builds/2557 Here is the relevant piece of

[clang-tools-extra] [clang-tidy] support string::contains (PR #110351)

2024-10-05 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: Thanks! Is there still an issue with type stuff? If so, what would be a test case that fails that shouldn't? https://github.com/llvm/llvm-project/pull/110351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang-tools-extra] [clang-tidy] support string::contains (PR #110351)

2024-10-05 Thread Nicolas van Kempen via cfe-commits
@@ -29,6 +29,43 @@ struct multimap { bool contains(const Key &K) const; }; +using size_t = decltype(sizeof(int)); + +// Lightweight standin for std::string_view. +template +class basic_string_view { +public: + basic_string_view(); + basic_string_view(const basic_string_vi

[clang-tools-extra] [clang-tidy] support string::contains (PR #110351)

2024-10-05 Thread Nicolas van Kempen via cfe-commits
@@ -32,7 +33,8 @@ void ContainerContainsCheck::registerMatchers(MatchFinder *Finder) { const auto FindCall = cxxMemberCallExpr( - argumentCountIs(1), + anyOf(argumentCountIs(1), +allOf(argumentCountIs(2), hasArgument(1, cxxDefaultArg

[clang-tools-extra] [clang-tidy] support string::contains (PR #110351)

2024-10-05 Thread Nicolas van Kempen via cfe-commits
@@ -453,3 +458,29 @@ void testOperandPermutations(std::map& Map) { // CHECK-MESSAGES: :[[@LINE-1]]:{{[0-9]+}}: warning: use 'contains' to check for membership [readability-container-contains] // CHECK-FIXES: if (!Map.contains(0)) {}; } + +void testStringNops(std::string St

[clang-tools-extra] [clang-tidy] support string::contains (PR #110351)

2024-10-05 Thread Nicolas van Kempen via cfe-commits
@@ -50,12 +50,16 @@ struct basic_string { size_type find(const _Type& str, size_type pos = 0) const; size_type find(const C* s, size_type pos = 0) const; size_type find(const C* s, size_type pos, size_type n) const; + size_type find(C ch, size_type pos = 0) const; s

[clang] [llvm] [sanitizer] Document AddressSanitizer security considerations (PR #100937)

2024-10-05 Thread via cfe-commits
bigb4ng wrote: @vitalybuka Unfortunately I cannot re-request since previous review is still pending. Anyway I've included trap mode too. https://github.com/llvm/llvm-project/pull/100937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang-tools-extra] [clang-tidy] support string::contains (PR #110351)

2024-10-05 Thread Nicolas van Kempen via cfe-commits
@@ -30,9 +32,15 @@ void ContainerContainsCheck::registerMatchers(MatchFinder *Finder) { ofClass(cxxRecordDecl(HasContainsMatchingParamType) .bind("call"); + const auto Literal0 = integerLiteral(equals(0)); + const auto Literal1 = integerLiteral(e

[clang-tools-extra] [clang-tidy] support string::contains (PR #110351)

2024-10-05 Thread Nicolas van Kempen via cfe-commits
@@ -50,12 +50,16 @@ struct basic_string { size_type find(const _Type& str, size_type pos = 0) const; size_type find(const C* s, size_type pos = 0) const; size_type find(const C* s, size_type pos, size_type n) const; + size_type find(C ch, size_type pos = 0) const; --

[clang-tools-extra] [clang-tidy] support string::contains (PR #110351)

2024-10-05 Thread Nicolas van Kempen via cfe-commits
@@ -104,6 +108,9 @@ struct basic_string_view { size_type rfind(const C* s, size_type pos, size_type count) const; size_type rfind(const C* s, size_type pos = npos) const; + bool contains(const C *s) const; + bool contains(C s) const; nicovank wrote: ```

[clang] [llvm] [sanitizer] Document AddressSanitizer security considerations (PR #100937)

2024-10-05 Thread via cfe-commits
https://github.com/bigb4ng updated https://github.com/llvm/llvm-project/pull/100937 >From 6e2b5abc123261439489ee38a55111d9b6e7e6f0 Mon Sep 17 00:00:00 2001 From: bigb4ng Date: Sun, 28 Jul 2024 18:26:38 +0300 Subject: [PATCH] [sanitizer] Document sanitizers security considerations Follow-up to

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

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/4975 Here is the relevant piece of the build log

[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] [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
@@ -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] [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] [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 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
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] [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] [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] 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

  1   2   >