[clang] [clang][dataflow] Fix inaccuracies in `buildStmtToBasicBlockMap()`. (PR #82496)

2024-02-22 Thread via cfe-commits
martinboehme wrote: > This is horrifying. It makes me think that we might want to revamp the > CfgBlock interface at some point. Yes, there a quite a few surprises in the structure of the CFG that I've only discovered gradually over time. I'd also like to eliminate the sharp edges in the API,

[clang] e899641 - [clang][dataflow] Fix inaccuracies in `buildStmtToBasicBlockMap()`. (#82496)

2024-02-22 Thread via cfe-commits
Author: martinboehme Date: 2024-02-22T09:00:20+01:00 New Revision: e899641df2391179e8ec29ca14c53b09ae7ce85c URL: https://github.com/llvm/llvm-project/commit/e899641df2391179e8ec29ca14c53b09ae7ce85c DIFF: https://github.com/llvm/llvm-project/commit/e899641df2391179e8ec29ca14c53b09ae7ce85c.diff

[clang] [clang][dataflow] Fix inaccuracies in `buildStmtToBasicBlockMap()`. (PR #82496)

2024-02-22 Thread via cfe-commits
https://github.com/martinboehme closed https://github.com/llvm/llvm-project/pull/82496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Allow unaligned access on ARMv7 and higher by default (PR #82400)

2024-02-22 Thread David Green via cfe-commits
https://github.com/davemgreen commented: > Unaligned accesses require that SCTLR.A is 0, SCTLR.U is 1, and that the > memory in question is configured as "normal" memory. Almost all operating > systems do in fact configure their registers/memory this way, but on > baremetal it's not really a s

[clang] [clang][driver] Allow unaligned access on ARMv7 and higher by default (PR #82400)

2024-02-22 Thread David Green via cfe-commits
https://github.com/davemgreen edited https://github.com/llvm/llvm-project/pull/82400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Allow unaligned access on ARMv7 and higher by default (PR #82400)

2024-02-22 Thread David Green via cfe-commits
@@ -22,6 +22,12 @@ // RUN: %clang -target armv7-windows -### %s 2> %t // RUN: FileCheck --check-prefix=CHECK-UNALIGNED-ARM < %t %s +// RUN: %clang --target=armv6 -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-ALIGNED-ARM < %t %s + +// RUN: %clang --target=armv7 -### %s

[clang] [clang][driver] Allow unaligned access on ARMv7 and higher by default (PR #82400)

2024-02-22 Thread David Green via cfe-commits
@@ -305,6 +305,17 @@ X86 Support Arm and AArch64 Support ^^^ +- ARMv7+ targets now default to allowing unaligned access, except Armv6-M, and + Armv8-M without the Main Extension. Baremetal targets should check that the + new default will work with their s

[clang] [clang][driver] Allow unaligned access on ARMv7 and higher by default (PR #82400)

2024-02-22 Thread David Green via cfe-commits
davemgreen wrote: I would also personally add Armv6 too for consistency, but don't have a strong opinion. https://github.com/llvm/llvm-project/pull/82400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf updated https://github.com/llvm/llvm-project/pull/80636 >From b131b0971d5c38a29c954b37c0da8fb3177e5c92 Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Mon, 5 Feb 2024 14:07:29 +0800 Subject: [PATCH 1/4] [X86] Support APXF to enable __builtin_cpu_supports. --- clan

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes I figured I could reformat all (cpp,h) files of CSA to see if anything would need special formatting. Let me know if you find debatable hunks. clang-format version 19.0.0git (bc1c86b810e5

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Freddy Ye via cfe-commits
FreddyLeaf wrote: After [fa42b33](https://github.com/llvm/llvm-project/pull/80636/commits/fa42b33d62227bd88cc5d63431244d0caac1e286) 1. An error will be thrown out if compiling `__builtin_cpu_supports("egpr")` 2. __attribute__((__target__("apxf"))) is not supported in this patch, no matter amend

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 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 bc1c86b810e518a8e3fa90d5c26908c43788873d c21867a39c74b23897158989081293558feb698c --

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Phoebe Wang via cfe-commits
@@ -1845,6 +1845,12 @@ bool sys::getHostCPUFeatures(StringMap &Features) { Features["prefetchi"] = HasLeaf7Subleaf1 && ((EDX >> 14) & 1); Features["usermsr"] = HasLeaf7Subleaf1 && ((EDX >> 15) & 1); Features["avx10.1-256"] = HasLeaf7Subleaf1 && ((EDX >> 19) & 1); + Fea

[clang] [clang][NFC] Regroup declarations in `Sema` (PR #82217)

2024-02-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/82217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Phoebe Wang via cfe-commits
phoebewang wrote: You may also need to transfer "apxf" feature into subfeatures here https://github.com/llvm/llvm-project/blob/main/clang/lib/Basic/Targets/X86.cpp#L106 https://github.com/llvm/llvm-project/pull/80636 ___ cfe-commits mailing list cfe-c

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Freddy Ye via cfe-commits
FreddyLeaf wrote: > You may also need to transfer "apxf" feature into subfeatures here > https://github.com/llvm/llvm-project/blob/main/clang/lib/Basic/Targets/X86.cpp#L106 Thanks for pointing out! This looks like the change required by supporting attribute((target("apxf"))). While that suppor

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf updated https://github.com/llvm/llvm-project/pull/80636 >From b131b0971d5c38a29c954b37c0da8fb3177e5c92 Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Mon, 5 Feb 2024 14:07:29 +0800 Subject: [PATCH 1/5] [X86] Support APXF to enable __builtin_cpu_supports. --- clan

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Freddy Ye via cfe-commits
@@ -1845,6 +1845,12 @@ bool sys::getHostCPUFeatures(StringMap &Features) { Features["prefetchi"] = HasLeaf7Subleaf1 && ((EDX >> 14) & 1); Features["usermsr"] = HasLeaf7Subleaf1 && ((EDX >> 15) & 1); Features["avx10.1-256"] = HasLeaf7Subleaf1 && ((EDX >> 19) & 1); + Fea

[clang] [clang][dataflow] Remove deprecated `ValueModel::merge()` function. (PR #82602)

2024-02-22 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/82602 I'm not aware of any remaining overrides of this function. While I'm here, change an outdated comment in DataflowAnalysis.h that still referred to `merge()`. I've made the comment more general, referring sim

[clang] [clang][dataflow] Remove deprecated `ValueModel::merge()` function. (PR #82602)

2024-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-analysis Author: None (martinboehme) Changes I'm not aware of any remaining overrides of this function. While I'm here, change an outdated comment in DataflowAnalysis.h that still referred to `merge()`. I've made the com

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-02-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > If we add a `bool GuessObjC` parameter to `guessLanguage()`, would that solve > the problem? I assume you mean making it so that when clangd calls into `guessLanguage()`, the ObjC guessing algorithm is skipped entirely. I had a similar idea originally (discussed around

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Shengchen Kan via cfe-commits
@@ -983,6 +983,8 @@ static void getAvailableFeatures(unsigned ECX, unsigned EDX, unsigned MaxLeaf, setFeature(FEATURE_USERMSR); if (HasLeaf7Subleaf1 && ((EDX >> 19) & 1)) setFeature(FEATURE_AVX10_1_256); + if (HasLeaf7Subleaf1 && ((EDX >> 21) & 1))

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Shengchen Kan via cfe-commits
@@ -265,6 +265,7 @@ X86_MICROARCH_LEVEL(X86_64_BASELINE,"x86-64", 95) X86_MICROARCH_LEVEL(X86_64_V2, "x86-64-v2",96) X86_MICROARCH_LEVEL(X86_64_V3, "x86-64-v3",97) X86_MICROARCH_LEVEL(X86_64_V4, "x86-64-v4",98) +

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Shengchen Kan via cfe-commits
@@ -219,6 +219,7 @@ #define bit_PREFETCHI 0x4000 #define bit_USERMSR 0x8000 #define bit_AVX10 0x0008 +#define bit_APXF 0x0020 KanRobert wrote: Where is the number from? Add the link in your description of the PR. htt

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Freddy Ye via cfe-commits
@@ -265,6 +265,7 @@ X86_MICROARCH_LEVEL(X86_64_BASELINE,"x86-64", 95) X86_MICROARCH_LEVEL(X86_64_V2, "x86-64-v2",96) X86_MICROARCH_LEVEL(X86_64_V3, "x86-64-v3",97) X86_MICROARCH_LEVEL(X86_64_V4, "x86-64-v4",98) +

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf edited https://github.com/llvm/llvm-project/pull/80636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Fix argument invalidations in StreamChecker. (PR #79470)

2024-02-22 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/79470 From 70eeae8170a782b93b546b81ac913e1b8eacd28e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Thu, 22 Feb 2024 10:18:06 +0100 Subject: [PATCH] [clang][analyzer] Fix argument invalidation

[clang] [clang][analyzer] Fix argument invalidations in StreamChecker. (PR #79470)

2024-02-22 Thread Balázs Kéri via cfe-commits
balazske wrote: I have rebased the branch to latest version of `StreamChecker`, no other changes were made to the patch. https://github.com/llvm/llvm-project/pull/79470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [Clang] fix static operator()/[] call not evaluating object (PR #78356)

2024-02-22 Thread via cfe-commits
cor3ntin wrote: @MitalAshok Can we close this? https://github.com/llvm/llvm-project/pull/78356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix: constexpr bit_cast with empty base classes (PR #82383)

2024-02-22 Thread via cfe-commits
cor3ntin wrote: This will need a release note. I'm curious why the removed code was there in the first place. Any idea @tbaederr ? https://github.com/llvm/llvm-project/pull/82383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [Clang][Sema] Remove invalid ctor (NFC) (PR #82161)

2024-02-22 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/82161 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf edited https://github.com/llvm/llvm-project/pull/80636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Freddy Ye via cfe-commits
@@ -219,6 +219,7 @@ #define bit_PREFETCHI 0x4000 #define bit_USERMSR 0x8000 #define bit_AVX10 0x0008 +#define bit_APXF 0x0020 FreddyLeaf wrote: Done. https://github.com/llvm/llvm-project/pull/80636 __

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Freddy Ye via cfe-commits
@@ -983,6 +983,8 @@ static void getAvailableFeatures(unsigned ECX, unsigned EDX, unsigned MaxLeaf, setFeature(FEATURE_USERMSR); if (HasLeaf7Subleaf1 && ((EDX >> 19) & 1)) setFeature(FEATURE_AVX10_1_256); + if (HasLeaf7Subleaf1 && ((EDX >> 21) & 1))

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-22 Thread via cfe-commits
@@ -3899,7 +3899,9 @@ ExprResult Parser::ParseTypeTrait() { SmallVector Args; do { // Parse the next type. -TypeResult Ty = ParseTypeName(); +TypeResult Ty = ParseTypeName(nullptr, getLangOpts().CPlusPlus cor3ntin wrote: ```suggestion TypeR

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-22 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @cor3ntin would you mind taking a look? thanks! https://github.com/llvm/llvm-project/pull/80656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-22 Thread via cfe-commits
@@ -3941,7 +3943,7 @@ ExprResult Parser::ParseArrayTypeTrait() { if (T.expectAndConsume()) return ExprError(); - TypeResult Ty = ParseTypeName(); + TypeResult Ty = ParseTypeName(nullptr, DeclaratorContext::TemplateArg); cor3ntin wrote: ```suggestion

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-22 Thread via cfe-commits
https://github.com/cor3ntin commented: This is going to need additional tests (ie a test for `__is_trivially_copyable(int()&)` would be a good start!) https://github.com/llvm/llvm-project/pull/81298 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-22 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/81298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][Clang] Enable inscan modifier for generic datatypes (PR #82220)

2024-02-22 Thread Animesh Kumar via cfe-commits
https://github.com/animeshk-amd updated https://github.com/llvm/llvm-project/pull/82220 >From 53a7d681198006460a6e2b38d1a89146b3d26b03 Mon Sep 17 00:00:00 2001 From: Animesh Kumar Date: Mon, 19 Feb 2024 00:28:39 -0600 Subject: [PATCH] [OpenMP][Clang] Enable inscan modifier for generic datatypes

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Shengchen Kan via cfe-commits
@@ -265,6 +265,7 @@ X86_MICROARCH_LEVEL(X86_64_BASELINE,"x86-64", 95) X86_MICROARCH_LEVEL(X86_64_V2, "x86-64-v2",96) X86_MICROARCH_LEVEL(X86_64_V3, "x86-64-v3",97) X86_MICROARCH_LEVEL(X86_64_V4, "x86-64-v4",98) +

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf updated https://github.com/llvm/llvm-project/pull/80636 >From b131b0971d5c38a29c954b37c0da8fb3177e5c92 Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Mon, 5 Feb 2024 14:07:29 +0800 Subject: [PATCH 1/6] [X86] Support APXF to enable __builtin_cpu_supports. --- clan

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf edited https://github.com/llvm/llvm-project/pull/80636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-22 Thread Freddy Ye via cfe-commits
@@ -265,6 +265,7 @@ X86_MICROARCH_LEVEL(X86_64_BASELINE,"x86-64", 95) X86_MICROARCH_LEVEL(X86_64_V2, "x86-64-v2",96) X86_MICROARCH_LEVEL(X86_64_V3, "x86-64-v3",97) X86_MICROARCH_LEVEL(X86_64_V4, "x86-64-v4",98) +

[clang] [clang-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-02-22 Thread Owen Pan via cfe-commits
@@ -3123,6 +3123,7 @@ static void sortCppIncludes(const FormatStyle &Style, } std::string result; + unsigned NewCursor = UINT_MAX; owenca wrote: ```suggestion const auto OldCursor = Cursor ? *Cursor : 0; ``` https://github.com/llvm/llvm-project/pull/7

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: Right now I don't have more time for this. I reached this part: https://github.com/llvm/llvm-project/pull/82599/files#diff-e06d50a75016837f80877b3aae594298eeead1f2260da82167e74289beca116dL2563 So far I haven't found anything critical. Only a handful of lic

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 Thread Balazs Benics via cfe-commits
@@ -1,15 +1,16 @@ -//ProgramStateTrait.h - Partial implementations of ProgramStateTrait -*- C++ -*- +// ProgramStateTrait.h - Partial implementations of ProgramStateTrait -*- C++ +// -*- // -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// Se

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 Thread Balazs Benics via cfe-commits
@@ -107,7 +107,8 @@ class CallDescription { return CD1.matches(Call); } - /// \copydoc clang::ento::CallDescription::matchesAny(const CallEvent &, const CallDescription &) + /// \copydoc clang::ento::CallDescription::matchesAny(const CallEvent &, const + /// CallDes

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 Thread Balazs Benics via cfe-commits
@@ -188,88 +187,79 @@ struct ValueType { inline ValueType::SizeType ValueType::getSizeType(unsigned nbytes) { switch (nbytes) { -case 1: return ST_8; -case 2: return ST_16; -case 4: return ST_32; -case 8: return ST_64; -case 16: return ST_128; -defaul

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 Thread Balazs Benics via cfe-commits
@@ -441,48 +419,79 @@ class PrettyPrinter { // Return the precedence of a given node, for use in pretty printing. unsigned precedence(const SExpr *E) { switch (E->opcode()) { - case COP_Future: return Prec_Atom; - case COP_Undefined: return Prec_Atom; -

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 Thread Balazs Benics via cfe-commits
@@ -1481,22 +1449,24 @@ class Return : public Terminator { return Vs.reduceReturn(*this, Ne); } - template - typename C::CType compare(const Return *E, C &Cmp) const { + template typename C::CType compare(const Return *E, C &Cmp) const { return Cmp.compare(Retv

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/82599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 Thread Balazs Benics via cfe-commits
@@ -898,18 +867,18 @@ class CFGBlock { size_t getIndexInCFG() const; - CFGElement front() const { return Elements.front(); } - CFGElement back()const { return Elements.back();} + CFGElement front() const { return Elemen

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 Thread Balazs Benics via cfe-commits
@@ -145,7 +146,8 @@ class CallDescription { return CD1.matchesAsWritten(CE); } - /// \copydoc clang::ento::CallDescription::matchesAnyAsWritten(const CallExpr &, const CallDescription &) + /// \copydoc clang::ento::CallDescription::matchesAnyAsWritten(const CallExpr +

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 Thread Balazs Benics via cfe-commits
@@ -48,17 +48,26 @@ class ConstructionContextItem { LLVM_DUMP_METHOD static StringRef getKindAsString(ItemKind K) { switch (K) { - case VariableKind:return "construct into local variable"; - case NewAllocatorKind:return "construct into new-a

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 Thread Balazs Benics via cfe-commits
@@ -393,20 +385,19 @@ class ExprEngine { ProgramStateRef processAssume(ProgramStateRef state, SVal cond, bool assumption); - /// processRegionChanges - Called by ProgramStateManager whenever a change is made + /// processRegionChanges - Cal

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 Thread Balazs Benics via cfe-commits
@@ -28,29 +28,29 @@ namespace clang { //===--===// namespace dataflow { - struct forward_analysis_tag {}; - struct backward_analysis_tag {}; +struct forward_analysis_tag {}; +struct backward_analysis_tag {}

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 Thread Balazs Benics via cfe-commits
@@ -1,4 +1,5 @@ -//===--- PathDiagnosticConsumers.h - Path Diagnostic Clients --*- C++ -*-===// +//===--- PathDiagnosticConsumers.h - Path Diagnostic Clients --*- C++ +//-*-===// steakhal wrote: ```suggestion //===--- PathDiagnosticConsumers.h - Path Dia

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 Thread Balazs Benics via cfe-commits
@@ -128,14 +128,14 @@ enum TIL_CastOpcode : unsigned char { CAST_objToPtr }; -const TIL_Opcode COP_Min = COP_Future; -const TIL_Opcode COP_Max = COP_Branch; -const TIL_UnaryOpcode UOP_Min = UOP_Minus; -const TIL_UnaryOpcode UOP_Max = UOP_LogicNot; -const TI

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 Thread Balazs Benics via cfe-commits
@@ -520,18 +518,19 @@ class TypedRegion : public SubRegion { bool isBoundable() const override { return true; } - static bool classof(const MemRegion* R) { + static bool classof(const MemRegion *R) { unsigned k = R->getKind(); return k >= BEGIN_TYPED_REGIONS &&

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/82599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Clang Codegen Interop : Accept multiple init (PR #82604)

2024-02-22 Thread via cfe-commits
https://github.com/SunilKuravinakop created https://github.com/llvm/llvm-project/pull/82604 Modifying clang/lib/CodeGen/CGStmtOpenMP.cpp to accept multiple `init` clauses with `interop` directive. >From 6444ef3f60a9f8ed8b3f413997259fe5006396b7 Mon Sep 17 00:00:00 2001 From: Sunil Kuravinakop

[clang] [clang-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-02-22 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/77456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-02-22 Thread Owen Pan via cfe-commits
@@ -3134,20 +3135,24 @@ static void sortCppIncludes(const FormatStyle &Style, } result += Includes[Index].Text; if (Cursor && CursorIndex == Index) - *Cursor = IncludesBeginOffset + result.size() - CursorToEOLOffset; + NewCursor = IncludesBeginOffset + res

[clang] [clang-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-02-22 Thread Owen Pan via cfe-commits
@@ -3134,20 +3135,24 @@ static void sortCppIncludes(const FormatStyle &Style, } result += Includes[Index].Text; if (Cursor && CursorIndex == Index) - *Cursor = IncludesBeginOffset + result.size() - CursorToEOLOffset; + NewCursor = IncludesBeginOffset + res

[clang] [clang-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-02-22 Thread Owen Pan via cfe-commits
https://github.com/owenca commented: `git diff Format.cpp` output: ``` --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -3116,6 +3116,7 @@ static void sortCppIncludes(const FormatStyle &Style, return; } + const auto OldCursor = Cursor ? *Cursor : 0; std::string

[clang] [clang-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-02-22 Thread Owen Pan via cfe-commits
@@ -3134,20 +3135,24 @@ static void sortCppIncludes(const FormatStyle &Style, } result += Includes[Index].Text; if (Cursor && CursorIndex == Index) - *Cursor = IncludesBeginOffset + result.size() - CursorToEOLOffset; + NewCursor = IncludesBeginOffset + res

[clang] [OpenMP] Clang Codegen Interop : Accept multiple init (PR #82604)

2024-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (SunilKuravinakop) Changes Modifying clang/lib/CodeGen/CGStmtOpenMP.cpp to accept multiple `init` clauses with `interop` directive. --- Full diff: https://github.com/llvm/llvm-project/pull/82604.diff 1 Files Affected: - (modified)

[clang] [clang-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-02-22 Thread Owen Pan via cfe-commits
owenca wrote: > As a side note, I tried adding these two tests but they fail, meaning the > cursor is still incorrectly computed with CRLF when replacing lines. > > This is due to adding lines between the include groups (with Regroup option), > as this new line is added with only the character

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-02-22 Thread Paschalis Mpeis via cfe-commits
https://github.com/paschalis-mpeis updated https://github.com/llvm/llvm-project/pull/78432 >From 869079fa57b3a8da9b9f9ea541f7d542be1bb8bc Mon Sep 17 00:00:00 2001 From: Paschalis Mpeis Date: Tue, 16 Jan 2024 10:53:09 + Subject: [PATCH 1/5] LAA cannot vectorize lib calls like modf/modff Fun

[clang] [clang] Implement CWG2759 "`[[no_unique_address]` and common initial sequence" (PR #82607)

2024-02-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/82607 This patch implements said defect report resolution by adding additional check to common initial sequence evaluation. Consequently, this fixes CWG2759. No special handling of `[[msvc::no_unique_address]]` is per

[clang] [clang] Implement CWG2759 "`[[no_unique_address]` and common initial sequence" (PR #82607)

2024-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch implements said defect report resolution by adding additional check to common initial sequence evaluation. Consequently, this fixes CWG2759. No special handling of `[[msvc::no_unique_address

[clang] [clang] Implement CWG2759 "`[[no_unique_address]` and common initial sequence" (PR #82607)

2024-02-22 Thread via cfe-commits
cor3ntin wrote: > No special handling of [[msvc::no_unique_address]] is performed, so it should > follow [[no_unique_address]] behavior. I do not think the code does that. And we should test what it does. At the very least, a type with msvc::no_unique_address should not be layout compatible w

[clang] [clang-tools-extra] [flang] [lld] [llvm] [flang][clang] Add Visibility specific help text for options (PR #81869)

2024-02-22 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/81869 >From 72bbd9d38cb6e292d92391fcf04154cfbc336192 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Thu, 15 Feb 2024 09:52:22 + Subject: [PATCH 1/3] [flang][clang] Add Visibility specific help text for

[clang] [Clang] Fixes to immediate-escalating functions (PR #82281)

2024-02-22 Thread Balazs Benics via cfe-commits
steakhal wrote: I've submitted a PR #82609 to backport this commit to release/18.x as it fixes a crash and would be also important for us downstream. https://github.com/llvm/llvm-project/pull/82281 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [clang][analyzer] Fix argument invalidations in StreamChecker. (PR #79470)

2024-02-22 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -763,6 +779,11 @@ void StreamChecker::evalFreadFwrite(const FnDescription *Desc, return; } + // At read, invalidate the buffer in any case of error or success, + // except if EOF was already present. + if (IsFread && (OldSS->ErrorState != ErrorFEof)) +State =

[clang] [clang] Implement CWG2759 "`[[no_unique_address]` and common initial sequence" (PR #82607)

2024-02-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/82607 >From 22facf44ec3f97fcdc40f2431ec26ca7ef441c67 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 22 Feb 2024 13:28:04 +0300 Subject: [PATCH 1/2] [clang] Implement CWG2759 "`[[no_unique_address]` and c

[clang] [OpenMP][Clang] Enable inscan modifier for generic datatypes (PR #82220)

2024-02-22 Thread Animesh Kumar via cfe-commits
https://github.com/animeshk-amd updated https://github.com/llvm/llvm-project/pull/82220 >From ccf9823e7349435af2311a1ea15b4457ecb65107 Mon Sep 17 00:00:00 2001 From: Animesh Kumar Date: Mon, 19 Feb 2024 00:28:39 -0600 Subject: [PATCH] [OpenMP][Clang] Enable inscan modifier for generic datatypes

[clang] [clang] Implement CWG2759 "`[[no_unique_address]` and common initial sequence" (PR #82607)

2024-02-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/82607 >From 22facf44ec3f97fcdc40f2431ec26ca7ef441c67 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 22 Feb 2024 13:28:04 +0300 Subject: [PATCH 1/3] [clang] Implement CWG2759 "`[[no_unique_address]` and c

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-02-22 Thread Paschalis Mpeis via cfe-commits
paschalis-mpeis wrote: Rebased to main after a couple of weeks of inactivity. Note: windows x64 build failure seems unrelated; more likely a wide problem, failing at cmake configure. https://github.com/llvm/llvm-project/pull/78432 ___ cfe-commits mai

[clang] [clang] Implement CWG2759 "`[[no_unique_address]` and common initial sequence" (PR #82607)

2024-02-22 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM, Thanks! https://github.com/llvm/llvm-project/pull/82607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][nullability] Don't discard expression state before end of full-expression. (PR #82611)

2024-02-22 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/82611 In https://github.com/llvm/llvm-project/pull/72985, I made a change to discard expression state (`ExprToLoc` and `ExprToVal`) at the beginning of each basic block. I did so with the claim that "we never need

[clang] [clang][nullability] Don't discard expression state before end of full-expression. (PR #82611)

2024-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: None (martinboehme) Changes In https://github.com/llvm/llvm-project/pull/72985, I made a change to discard expression state (`ExprToLoc` and `ExprToVal`) at the beginning of each basic block. I did so with the claim that "we never

[clang] [clang][nullability] Don't discard expression state before end of full-expression. (PR #82611)

2024-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (martinboehme) Changes In https://github.com/llvm/llvm-project/pull/72985, I made a change to discard expression state (`ExprToLoc` and `ExprToVal`) at the beginning of each basic block. I did so with the claim that "we never need to a

[clang] fix: constexpr bit_cast with empty base classes (PR #82383)

2024-02-22 Thread Timm Baeder via cfe-commits
tbaederr wrote: > This will need a release note. I'm curious why the removed code was there in > the first place. Any idea @tbaederr ? No idea, it's been there since the original commit introducing `__builtin_bit_cast`. Maybe just an optimization, or maybe something else in that loop used to

[clang] [clang] Implement CWG2759 "`[[no_unique_address]` and common initial sequence" (PR #82607)

2024-02-22 Thread Timm Baeder via cfe-commits
@@ -19033,6 +19033,11 @@ static bool isLayoutCompatible(ASTContext &C, FieldDecl *Field1, return false; } + if (Field1->hasAttr() || + Field2->hasAttr()) { +return false; + } + tbaederr wrote: ```suggestion if (Field1->hasAttr() ||

[clang] Multilib support for libraries with exceptions (PR #75031)

2024-02-22 Thread via cfe-commits
https://github.com/pwprzybyla updated https://github.com/llvm/llvm-project/pull/75031 >From 78acc1685def3efa6e5af212f4edee7842de28a6 Mon Sep 17 00:00:00 2001 From: Piotr Przybyla Date: Wed, 29 Nov 2023 14:05:00 + Subject: [PATCH] Multilib support for libraries with exceptions and rtti ---

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-22 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/77936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-22 Thread Sander de Smalen via cfe-commits
@@ -814,6 +820,43 @@ Address AArch64ABIInfo::EmitMSVAArg(CodeGenFunction &CGF, Address VAListAddr, /*allowHigherAlign*/ false); } +static bool isStreaming(const FunctionDecl *F) { + if (F->hasAttr()) +return true; + if (const auto *T = F->getTy

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-22 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. https://github.com/llvm/llvm-project/pull/77936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-22 Thread via cfe-commits
@@ -1385,6 +1385,16 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer( Diag(RAngleLoc, diag::err_lambda_template_parameter_list_empty); } else { + // We increase the template depth before recursing into a requires-clause. + // + //

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-22 Thread via cfe-commits
@@ -193,6 +193,10 @@ Bug Fixes to C++ Support - Fixed an out-of-bounds error caused by building a recovery expression for ill-formed function calls while substituting into constraints. (`#58548 `_) +- Fixed an issue where

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-22 Thread via cfe-commits
@@ -1385,6 +1385,16 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer( Diag(RAngleLoc, diag::err_lambda_template_parameter_list_empty); } else { + // We increase the template depth before recursing into a requires-clause. + // + //

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-22 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/80656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-22 Thread via cfe-commits
@@ -1385,6 +1385,16 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer( Diag(RAngleLoc, diag::err_lambda_template_parameter_list_empty); } else { + // We increase the template depth before recursing into a requires-clause. + // + //

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-22 Thread via cfe-commits
@@ -193,6 +193,10 @@ Bug Fixes to C++ Support - Fixed an out-of-bounds error caused by building a recovery expression for ill-formed function calls while substituting into constraints. (`#58548 `_) +- Fixed an issue where

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-22 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. I have some suggestion to improve the (very useful) comments. Otherwise, LGTM https://github.com/llvm/llvm-project/pull/80656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-22 Thread via cfe-commits
@@ -1385,6 +1385,16 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer( Diag(RAngleLoc, diag::err_lambda_template_parameter_list_empty); } else { + // We increase the template depth before recursing into a requires-clause. + // + //

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-02-22 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,52 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --filter "call.*(frexp|modf)" --version 4 +// RUN: %clang --target=aarch64-linux-gnu -march=armv8-a+sve -O3 -isystem %S/../Headers/Inputs/include -mllvm -vector-library=ArmP

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-22 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov approved this pull request. https://github.com/llvm/llvm-project/pull/77936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >