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

2024-10-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/111259 None >From f1313fbe249a8375aba9d5ead9440aef8b3fa9a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 5 Oct 2024 17:45:27 +0200 Subject: [PATCH] [clang][bytecode] Handle UETT_OpenMPRequir

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

2024-10-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/111259.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+7) - (modified) clang/test/AST/ByteCode/builtins.cpp (+2)

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2024-10-05 Thread via cfe-commits
YexuanXiao wrote: This patch is useful. This is a simple way to get rid of the huge Visual Studio installation. I use the following command line to configure my project with cmake and use libc++ as the standard library on Windows: ```powershell cmake -G Ninja -D "CMAKE_C_COMPILER=D:\Projects\cl

[clang] c574180 - [clang][bytecode] Handle UETT_OpenMPRequiredSimdAlign (#111259)

2024-10-05 Thread via cfe-commits
Author: Timm Baeder Date: 2024-10-05T18:04:06+02:00 New Revision: c57418037a002f4c5f19339837cc37e3a8f4ecb8 URL: https://github.com/llvm/llvm-project/commit/c57418037a002f4c5f19339837cc37e3a8f4ecb8 DIFF: https://github.com/llvm/llvm-project/commit/c57418037a002f4c5f19339837cc37e3a8f4ecb8.diff L

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

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

[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-quick` running on `linaro-clang-aarch64-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/5725 Here is the relevant piec

[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-armv8-quick` running on `linaro-clang-armv8-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/154/builds/5531 Here is the relevant piece of

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

<    1   2