r339581 - [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-13 Thread Nick Desaulniers via cfe-commits
Author: nickdesaulniers Date: Mon Aug 13 09:38:07 2018 New Revision: 339581 URL: http://llvm.org/viewvc/llvm-project?rev=339581&view=rev Log: [SEMA] add more -Wfloat-conversion to compound assigment analysis Summary: Fixes Bug: https://bugs.llvm.org/show_bug.cgi?id=27061 Reviewers: aaron.ballman

r339593 - [Sema] fix -Wfloat-conversion test case.

2018-08-13 Thread Nick Desaulniers via cfe-commits
Author: nickdesaulniers Date: Mon Aug 13 11:07:50 2018 New Revision: 339593 URL: http://llvm.org/viewvc/llvm-project?rev=339593&view=rev Log: [Sema] fix -Wfloat-conversion test case. Summary: Fixes r339581 ("[SEMA] add more -Wfloat-conversion to compound assigment analysis"). This test case was

Re: r339581 - [SEMA] add more -Wfloat-conversion to compound assigment analysis

2018-08-13 Thread Nick Desaulniers via cfe-commits
home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/tools/clang/test/Sema/conversion.c > Line 362: implicit conversion turns floating-point number into integer: > 'char' to 'float' > 1 error generated. > > -- > > > On Mon, Aug 13, 2018 at 9:46 AM Nick

r340987 - [AttrDocs]: document gnu_inline function attribute

2018-08-29 Thread Nick Desaulniers via cfe-commits
Author: nickdesaulniers Date: Wed Aug 29 15:50:47 2018 New Revision: 340987 URL: http://llvm.org/viewvc/llvm-project?rev=340987&view=rev Log: [AttrDocs]: document gnu_inline function attribute Summary: This wasn't documented https://clang.llvm.org/docs/AttributeReference.html, and briefly mentio

r337944 - [clang:sema] de-duplicate getDepthAndIndex helpers

2018-07-25 Thread Nick Desaulniers via cfe-commits
Author: nickdesaulniers Date: Wed Jul 25 11:11:01 2018 New Revision: 337944 URL: http://llvm.org/viewvc/llvm-project?rev=337944&view=rev Log: [clang:sema] de-duplicate getDepthAndIndex helpers Summary: Continuing off of: https://reviews.llvm.org/D38382 Fixes: https://bugs.llvm.org/show_bug.cgi?i

r344375 - [Driver] check for exit code from SIGPIPE

2018-10-12 Thread Nick Desaulniers via cfe-commits
Author: nickdesaulniers Date: Fri Oct 12 10:22:46 2018 New Revision: 344375 URL: http://llvm.org/viewvc/llvm-project?rev=344375&view=rev Log: [Driver] check for exit code from SIGPIPE Summary: D53000 adds a special exit code for SIGPIPE (writing to a closed reader), and rather than print a fatal

Re: r344375 - [Driver] check for exit code from SIGPIPE

2018-10-12 Thread Nick Desaulniers via cfe-commits
on Windows. I reverted this to fix the build, but you might want to > reconsider how this is designed. > > On Fri, Oct 12, 2018 at 10:24 AM Nick Desaulniers via cfe-commits > wrote: >> >> Author: nickdesaulniers >> Date: Fri Oct 12 10:22:46 2018 >> New Revis

r344536 - Revert 344389 "Revert r344375 "[Driver] check for exit code from SIGPIPE""

2018-10-15 Thread Nick Desaulniers via cfe-commits
Author: nickdesaulniers Date: Mon Oct 15 10:39:00 2018 New Revision: 344536 URL: http://llvm.org/viewvc/llvm-project?rev=344536&view=rev Log: Revert 344389 "Revert r344375 "[Driver] check for exit code from SIGPIPE"" Summary: Add preprocessor guards for UNIX. This reverts commit r344389. Review

r344941 - [Driver] allow Android triples to alias for non Android targets

2018-10-22 Thread Nick Desaulniers via cfe-commits
Author: nickdesaulniers Date: Mon Oct 22 12:48:08 2018 New Revision: 344941 URL: http://llvm.org/viewvc/llvm-project?rev=344941&view=rev Log: [Driver] allow Android triples to alias for non Android targets Summary: Partial revert of r330873 ('[Driver] Reland "Android triples are not aliases for o

r344958 - [Driver] fix broken test

2018-10-22 Thread Nick Desaulniers via cfe-commits
Author: nickdesaulniers Date: Mon Oct 22 14:25:53 2018 New Revision: 344958 URL: http://llvm.org/viewvc/llvm-project?rev=344958&view=rev Log: [Driver] fix broken test Summary: Fixes test from r344941 which was broken on Windows. We want to check the selected toolchain rather than the found toolch

Re: [PATCH] D56571: [RFC prototype] Implementation of asm-goto support in LLVM

2019-01-11 Thread Nick Desaulniers via cfe-commits
On Thu, Jan 10, 2019 at 6:11 PM Yu, Jennifer wrote: > > Syntax for asm goto: > Syntax: > asm [volatile] goto ( AssemblerTemplate > : > : InputOperands > : Clobbers > : GotoLabels) > > Only input is allowed.

r343740 - [SEMA] split ExtWarn dupl-decl-spec's into Extension and ExtWarn

2018-10-03 Thread Nick Desaulniers via cfe-commits
Author: nickdesaulniers Date: Wed Oct 3 16:09:29 2018 New Revision: 343740 URL: http://llvm.org/viewvc/llvm-project?rev=343740&view=rev Log: [SEMA] split ExtWarn dupl-decl-spec's into Extension and ExtWarn Summary: For types deduced from typedef's and typeof's, don't warn for duplicate declarati

Re: [PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-05 Thread Nick Desaulniers via cfe-commits
Note that kernel developers are requesting output support with ASM goto. Doesn't need to be in V1 of ASM go-to support, but we should expect it to be implemented in the future. We should help users with diagnostics that this is not supported, and add asserts that will help us implement such a featu

Re: [PATCH] D59963: [clang-tidy] Add a module for the Linux kernel.

2019-06-20 Thread Nick Desaulniers via cfe-commits
Sounds like a good start. On Thu, Jun 20, 2019 at 11:55 AM Tom Roeder via Phabricator wrote: > > tmroeder marked an inline comment as done. > tmroeder added inline comments. > > > > Comment at: clang-tools-extra/test/clang-tidy/linuxkernel-must-check-errs.c:6 > +// Prototypes of

Re: [PATCH] D64527: driver: Don't warn about assembler flags being unused when not assembling

2019-07-11 Thread Nick Desaulniers via cfe-commits
Yes, the current behavior is erroring for assembler flags clang does not recognize, which is irrelevant when compiling with `-no-integrated-as`, which is breaking our assembler flag feature detection in building the Linux kernel. On Thu, Jul 11, 2019, 6:09 PM Reid Kleckner via Phabricator < revi..

Re: r366076 - fix unnamed fiefield issue and add tests for __builtin_preserve_access_index intrinsic

2019-07-16 Thread Nick Desaulniers via cfe-commits
On Mon, Jul 15, 2019 at 5:13 PM Eric Christopher wrote: > > I'm going to cheat and make Nick do it :) I suspect that Eric still compiles LLVM by specifying all object files in order on the command line and doesn't want to talk about it on cfe-commits. :) Though, even I'm behind the times as I thi

Re: r366076 - fix unnamed fiefield issue and add tests for __builtin_preserve_access_index intrinsic

2019-07-16 Thread Nick Desaulniers via cfe-commits
On Tue, Jul 16, 2019 at 11:02 AM Nick Desaulniers wrote: > > On Mon, Jul 15, 2019 at 5:13 PM Eric Christopher wrote: > > > > I'm going to cheat and make Nick do it :) > > I suspect that Eric still compiles LLVM by specifying all object files > in order on the command line and doesn't want to talk

r361314 - [Driver] Verify GCCInstallation is valid

2019-05-21 Thread Nick Desaulniers via cfe-commits
Author: nickdesaulniers Date: Tue May 21 14:21:35 2019 New Revision: 361314 URL: http://llvm.org/viewvc/llvm-project?rev=361314&view=rev Log: [Driver] Verify GCCInstallation is valid Summary: Values returned by GCCInstallation.getParentLibPath() and GCCInstallation.getTriple() are not valid unles

r350776 - [Sema] Mark target of __attribute__((alias("target"))) used for C

2019-01-09 Thread Nick Desaulniers via cfe-commits
Author: nickdesaulniers Date: Wed Jan 9 15:54:55 2019 New Revision: 350776 URL: http://llvm.org/viewvc/llvm-project?rev=350776&view=rev Log: [Sema] Mark target of __attribute__((alias("target"))) used for C Summary: Prevents -Wunneeded-internal-delcaration warnings when the target has no other r

Re: r350776 - [Sema] Mark target of __attribute__((alias("target"))) used for C

2019-01-10 Thread Nick Desaulniers via cfe-commits
cks for unused variables, this quickly cuts down on tens of false negatives when building the Linux kernel with various driver configurations enabled. The code review points out this is suboptimal. > > On Wed, Jan 9, 2019 at 6:58 PM Nick Desaulniers via cfe-commits > wrote: >> >>

r350877 - [SemaCXX] add -Woverride-init alias to -Winitializer-overrides

2019-01-10 Thread Nick Desaulniers via cfe-commits
Author: nickdesaulniers Date: Thu Jan 10 11:12:39 2019 New Revision: 350877 URL: http://llvm.org/viewvc/llvm-project?rev=350877&view=rev Log: [SemaCXX] add -Woverride-init alias to -Winitializer-overrides Summary: https://bugs.llvm.org/show_bug.cgi?id=40251 https://github.com/ClangBuiltLinux/linu

r350878 - fixup: sphinx warning

2019-01-10 Thread Nick Desaulniers via cfe-commits
Author: nickdesaulniers Date: Thu Jan 10 11:26:35 2019 New Revision: 350878 URL: http://llvm.org/viewvc/llvm-project?rev=350878&view=rev Log: fixup: sphinx warning Fixes the sphinx warning: tools/clang/docs/DiagnosticsReference.rst:7889: WARNING: Title underline too short. That I just introduced

r371766 - [Clang][CodeGen] support alias attribute w/ gnu_inline

2019-09-12 Thread Nick Desaulniers via cfe-commits
Author: nickdesaulniers Date: Thu Sep 12 12:53:35 2019 New Revision: 371766 URL: http://llvm.org/viewvc/llvm-project?rev=371766&view=rev Log: [Clang][CodeGen] support alias attribute w/ gnu_inline Summary: r369705 did not consider the addition of gnu_inline on function declarations of alias attri

[clang] ef1d4be - [Clang][CGM] style cleanups NFC

2020-06-01 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2020-06-01T09:33:08-07:00 New Revision: ef1d4bec891b2121fffa68675e3792b2527a75ee URL: https://github.com/llvm/llvm-project/commit/ef1d4bec891b2121fffa68675e3792b2527a75ee DIFF: https://github.com/llvm/llvm-project/commit/ef1d4bec891b2121fffa68675e3792b2527a75ee.di

[clang] 8eda716 - [Clang][A32/T32][Linux] -O1 implies -fomit-frame-pointer

2020-06-02 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2020-06-02T15:54:14-07:00 New Revision: 8eda71616fecd098cbd7d2447859c8ac1315966f URL: https://github.com/llvm/llvm-project/commit/8eda71616fecd098cbd7d2447859c8ac1315966f DIFF: https://github.com/llvm/llvm-project/commit/8eda71616fecd098cbd7d2447859c8ac1315966f.di

Re: [clang] 246398e - [clang][Parse] properly parse asm-qualifiers, asm inline

2020-04-13 Thread Nick Desaulniers via cfe-commits
On Sun, Apr 12, 2020 at 3:45 PM Joerg Sonnenberger wrote: > > On Thu, Mar 12, 2020 at 03:25:49PM -0700, Nick Desaulniers via cfe-commits > wrote: > > > > Author: Nick Desaulniers > > Date: 2020-03-12T15:13:59-07:00 > > New Revision: 246398ece7115b57a02

[clang] 408efff - [Clang][SourceManager] optimize getFileIDLocal()

2020-06-25 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2020-06-25T09:59:41-07:00 New Revision: 408efffbe4a52bae05f1677a47eb3ccfd5cdc1d3 URL: https://github.com/llvm/llvm-project/commit/408efffbe4a52bae05f1677a47eb3ccfd5cdc1d3 DIFF: https://github.com/llvm/llvm-project/commit/408efffbe4a52bae05f1677a47eb3ccfd5cdc1d3.di

[clang] 8cce7af - [SourceManager] don't check invalid param of getLocalSLocEntry()

2020-06-26 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2020-06-26T10:22:26-07:00 New Revision: 8cce7af090bd011f6371dec34dfcab494cc74c46 URL: https://github.com/llvm/llvm-project/commit/8cce7af090bd011f6371dec34dfcab494cc74c46 DIFF: https://github.com/llvm/llvm-project/commit/8cce7af090bd011f6371dec34dfcab494cc74c46.di

[clang] dffc142 - [clang][SourceManager] cache Macro Expansions

2020-06-26 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2020-06-26T12:52:43-07:00 New Revision: dffc1420451f674731cb36799c8ae084104ff0b5 URL: https://github.com/llvm/llvm-project/commit/dffc1420451f674731cb36799c8ae084104ff0b5 DIFF: https://github.com/llvm/llvm-project/commit/dffc1420451f674731cb36799c8ae084104ff0b5.di

[clang] 7c2cb14 - Revert "[clang][SourceManager] cache Macro Expansions"

2020-06-29 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2020-06-29T12:54:32-07:00 New Revision: 7c2cb1448ad2d20e251db5e3ae4a0c84c12aa970 URL: https://github.com/llvm/llvm-project/commit/7c2cb1448ad2d20e251db5e3ae4a0c84c12aa970 DIFF: https://github.com/llvm/llvm-project/commit/7c2cb1448ad2d20e251db5e3ae4a0c84c12aa970.di

[clang] 7b8cf98 - Reland "[clang][SourceManager] cache Macro Expansions""

2020-06-29 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2020-06-29T12:54:32-07:00 New Revision: 7b8cf98b4a9a2f5ea3667fdbf913a4f8952ed36a URL: https://github.com/llvm/llvm-project/commit/7b8cf98b4a9a2f5ea3667fdbf913a4f8952ed36a DIFF: https://github.com/llvm/llvm-project/commit/7b8cf98b4a9a2f5ea3667fdbf913a4f8952ed36a.di

[clang] e486921 - [Clang] implement -fno-eliminate-unused-debug-types

2020-08-07 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2020-08-07T14:13:48-07:00 New Revision: e486921fd6cf96ae9114adac455f7c0b5c1088a7 URL: https://github.com/llvm/llvm-project/commit/e486921fd6cf96ae9114adac455f7c0b5c1088a7 DIFF: https://github.com/llvm/llvm-project/commit/e486921fd6cf96ae9114adac455f7c0b5c1088a7.di

[clang] cbd8ec9 - fix windows build for D80242

2020-08-07 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2020-08-07T14:59:35-07:00 New Revision: cbd8ec93709376fbf404c99f4eee399790e26db7 URL: https://github.com/llvm/llvm-project/commit/cbd8ec93709376fbf404c99f4eee399790e26db7 DIFF: https://github.com/llvm/llvm-project/commit/cbd8ec93709376fbf404c99f4eee399790e26db7.di

[clang] 73413d2 - Revert "fix windows build for D80242"

2020-08-07 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2020-08-07T16:11:26-07:00 New Revision: 73413d266abc2436bd1993a4e21a9151bd102f17 URL: https://github.com/llvm/llvm-project/commit/73413d266abc2436bd1993a4e21a9151bd102f17 DIFF: https://github.com/llvm/llvm-project/commit/73413d266abc2436bd1993a4e21a9151bd102f17.di

[clang] abb9bf4 - Revert "[Clang] implement -fno-eliminate-unused-debug-types"

2020-08-07 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2020-08-07T16:11:41-07:00 New Revision: abb9bf4bcf98a226d9350448e31411eb55e9efb0 URL: https://github.com/llvm/llvm-project/commit/abb9bf4bcf98a226d9350448e31411eb55e9efb0 DIFF: https://github.com/llvm/llvm-project/commit/abb9bf4bcf98a226d9350448e31411eb55e9efb0.di

[clang] 4f2ad15 - [Clang] implement -fno-eliminate-unused-debug-types

2020-08-10 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2020-08-10T15:08:48-07:00 New Revision: 4f2ad15db535873dda9bfe248a2771023b64a43c URL: https://github.com/llvm/llvm-project/commit/4f2ad15db535873dda9bfe248a2771023b64a43c DIFF: https://github.com/llvm/llvm-project/commit/4f2ad15db535873dda9bfe248a2771023b64a43c.di

[clang] 05d74db - python bindings: fix DeprecationWarning

2020-08-10 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2020-08-10T15:25:23-07:00 New Revision: 05d74dbc3bb1d943a029e4abea211288c920f559 URL: https://github.com/llvm/llvm-project/commit/05d74dbc3bb1d943a029e4abea211288c920f559 DIFF: https://github.com/llvm/llvm-project/commit/05d74dbc3bb1d943a029e4abea211288c920f559.di

Re: [PATCH] D133109: [LLVM][ARM] Remove options for armv2, 2A, 3 and 3M

2022-09-02 Thread Nick Desaulniers via cfe-commits
Arnd mentions on IRC: 1:38 AM ndesaulniers: I just looked at the patch and found that the list of supported targets still includes armv5 and armve (both without t), which never existed in hardware and were removed from gcc a while ago 1:38 AM might be good to take them out here as well 1:38 AM

[clang-tools-extra] [clang] [llvm] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-11-06 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. maybe @rapidsna has parting thoughts? https://github.com/llvm/llvm-project/pull/70606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers commented: linter is complaining about formatting https://github.com/llvm/llvm-project/pull/73730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Nick Desaulniers via cfe-commits
@@ -994,31 +1010,55 @@ class MemberExprBaseVisitor // } Expr *Visit(Expr *E) { -return StmtVisitor::Visit(E); +return StmtVisitor::Visit(E); } - Expr *VisitCastExpr(CastExpr *E) { -return IsExpectedRecordDecl(E) ? E : Visit(E->getSubExpr()); - } - E

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/73730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Nick Desaulniers via cfe-commits
@@ -1411,6 +1411,8 @@ class CodeGenFunction : public CodeGenTypeCache { /// decls. DeclMapTy LocalDeclMap; + llvm::SmallDenseMap ExprLValueMap; nickdesaulniers wrote: Perhaps a comment as to what this map is used for? https://github.com/llvm/llvm-projec

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Nick Desaulniers via cfe-commits
@@ -1411,6 +1411,8 @@ class CodeGenFunction : public CodeGenTypeCache { /// decls. DeclMapTy LocalDeclMap; + llvm::SmallDenseMap ExprLValueMap; nickdesaulniers wrote: Wont this store all kinds of unrelated Exprs? Is there any way we can minimize the siz

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-07 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/73730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-07 Thread Nick Desaulniers via cfe-commits
@@ -4022,8 +4168,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-07 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers commented: This is looking good! We're close! https://github.com/llvm/llvm-project/pull/73730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-07 Thread Nick Desaulniers via cfe-commits
@@ -3022,18 +3022,24 @@ class CodeGenFunction : public CodeGenTypeCache { void EmitBoundsCheck(const Expr *E, const Expr *Base, llvm::Value *Index, QualType IndexType, bool Accessed); + void EmitBoundsCheck(const Expr *E, llvm::Value *Bound, llvm::Val

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-07 Thread Nick Desaulniers via cfe-commits
@@ -994,31 +1010,55 @@ class MemberExprBaseVisitor // } Expr *Visit(Expr *E) { -return StmtVisitor::Visit(E); +return StmtVisitor::Visit(E); } - Expr *VisitCastExpr(CastExpr *E) { -return IsExpectedRecordDecl(E) ? E : Visit(E->getSubExpr()); - } - E

[clang] [clang-tools-extra] [llvm] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-11 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: LGTM; but perhaps @efriedma-quic should finish off the review. https://github.com/llvm/llvm-project/pull/73730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correct handling of negative and out-of-bounds indices (PR #71877)

2023-11-17 Thread Nick Desaulniers via cfe-commits
@@ -827,6 +827,165 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } +llvm::Value * +CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, +

[clang] [Clang] Correct handling of negative and out-of-bounds indices (PR #71877)

2023-11-17 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/71877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [Clang] Correct handling of negative and out-of-bounds indices (PR #71877)

2023-11-20 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. https://github.com/llvm/llvm-project/pull/71877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CGExprConstant] stop evaluating StringLiterals for non-ConstantArrayTypes (PR #70366)

2023-10-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers updated https://github.com/llvm/llvm-project/pull/70366 >From 52e5c1083f82c045dc0af26badf159e8b1593bd1 Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Thu, 26 Oct 2023 11:11:29 -0700 Subject: [PATCH 1/2] [CGExprConstant] stop evaluating StringLiterals fo

[clang] [CGExprConstant] stop calling into ConstExprEmitter for Reference type destinations (PR #70366)

2023-10-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/70366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CGExprConstant] stop calling into ConstExprEmitter for Reference type destinations (PR #70366)

2023-10-27 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: > I think I'd prefer to avoid calling into ConstExprEmitter at all for cases > involving reference binding. I think we've sort of discussed this before. > Maybe add a check to tryEmitPrivate()? (We already have a check in > tryEmitPrivateForVarInit().) Done in https://

[clang] [CGExprConstant] stop calling into ConstExprEmitter for Reference type destinations (PR #70366)

2023-10-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers updated https://github.com/llvm/llvm-project/pull/70366 >From 52e5c1083f82c045dc0af26badf159e8b1593bd1 Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Thu, 26 Oct 2023 11:11:29 -0700 Subject: [PATCH 1/3] [CGExprConstant] stop evaluating StringLiterals fo

[clang] [CGExprConstant] stop calling into ConstExprEmitter for Reference type destinations (PR #70366)

2023-10-30 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers closed https://github.com/llvm/llvm-project/pull/70366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-10-30 Thread Nick Desaulniers via cfe-commits
@@ -966,9 +962,68 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -FieldDecl *CodeGenFunction::FindCountedByField( -const Expr *Base, -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel) { +Expr *CodeGenFunction::BuildC

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-10-30 Thread Nick Desaulniers via cfe-commits
@@ -966,9 +962,68 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -FieldDecl *CodeGenFunction::FindCountedByField( -const Expr *Base, -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel) { +Expr *CodeGenFunction::BuildC

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-10-30 Thread Nick Desaulniers via cfe-commits
@@ -966,9 +962,68 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -FieldDecl *CodeGenFunction::FindCountedByField( -const Expr *Base, -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel) { +Expr *CodeGenFunction::BuildC

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-10-30 Thread Nick Desaulniers via cfe-commits
@@ -966,9 +962,68 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -FieldDecl *CodeGenFunction::FindCountedByField( -const Expr *Base, -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel) { +Expr *CodeGenFunction::BuildC

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-10-30 Thread Nick Desaulniers via cfe-commits
@@ -859,53 +859,60 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E, unsigned Type, } if (IsDynamic) { -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel = -getLangOpts().getStrictFlexArraysLevel(); -const Expr *Base = E->IgnoreParenImpCa

[clang] [CGExprConstant] stop calling into ConstExprEmitter for Reference type destinations (PR #70366)

2023-10-31 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: > Might be good to backport this to 17.x, given the regression was introduced > on the 17 branch after 17.0.0 https://github.com/llvm/llvm-project-release-prs/pull/765 https://github.com/llvm/llvm-project/pull/70366 ___ cfe-com

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-31 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang -c %s -### 2>&1 | FileCheck -check-prefix T0 %s nickdesaulniers wrote: I would have expected a test like this to be added to clang/test/Driver/clang_f_opts.c --- why are the new tests in clang/test/BoundsSafety/ rather than the

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-31 Thread Nick Desaulniers via cfe-commits
@@ -330,6 +330,14 @@ def warn_alias_with_section : Warning< "as the %select{aliasee|resolver}2">, InGroup; +let CategoryName = "Bounds Safety Issue" in { +def err_bounds_safety_lang_not_supported : Error< + "bounds safety is only supported for C">; +def warn_bounds_safety

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-31 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: not %clang -fbounds-safety-experimental -x c++ %s 2>&1 | FileCheck -check-prefix ERR %s + +// RUN: not %clang -fbounds-safety-experimental -x objective-c %s 2>&1 | FileCheck -check-prefix ERR %s + +// RUN: not %clang -fbounds-safety-experimental -x obje

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-31 Thread Nick Desaulniers via cfe-commits
@@ -3618,6 +3618,30 @@ void CompilerInvocationBase::GenerateLangArgs(const LangOptions &Opts, GenerateArg(Consumer, OPT_frandomize_layout_seed_EQ, Opts.RandstructSeed); } +static void CheckBoundsSafetyLang(InputKind IK, DiagnosticsEngine &Diags) { + // Currently, bounds

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-01 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang -c %s -### 2>&1 | FileCheck -check-prefix T0 %s nickdesaulniers wrote: > And make it easier to run bounds safety related tests only. > Provides a very convenient way to run only -fbounds-safety tests. Then give each test a simil

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-01 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: not %clang -fbounds-safety-experimental -x c++ %s 2>&1 | FileCheck -check-prefix ERR %s + +// RUN: not %clang -fbounds-safety-experimental -x objective-c %s 2>&1 | FileCheck -check-prefix ERR %s + +// RUN: not %clang -fbounds-safety-experimental -x obje

[clang] [llvm] [PowerPC] Add an alias for -mregnames so that full register names used in assembly. (PR #70255)

2023-11-01 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. LGTM; might be nice if it's possible to set this for `opt`/`llc` invocations, but for now I'm just happy to have this in clang. https://github.com/llvm/llvm-project/pull/70255 ___ cfe-comm

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-03 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. If you make all of the newly added tests share a similar filename prefix, it will be easier to test via `llvm-lit -vv clang/test/Driver/bounds-safety*`. `fbounds-safety.c` seems to break that convention. https://github.com/llvm/ll

[flang] [llvm] [clang] [libc] [libcxx] [clang-tools-extra] [compiler-rt] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-18 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: > > Can we please come to some consensus so that issue can be resolved? > > This supposed bug fix snowballed out of control. I'd be happy to revert to a > previous version and then submit the newer work as a improvements. Linux kernel builds have been broken since the in

[clang] Revert counted_by attribute feature (PR #75857)

2023-12-18 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: @nathanchance can you test this please to verify it's unbreaking the linux kernel builds? https://github.com/llvm/llvm-project/pull/75857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] Revert counted_by attribute feature (PR #75857)

2023-12-18 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. https://github.com/llvm/llvm-project/pull/75857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers created https://github.com/llvm/llvm-project/pull/73552 Due to inlining, descovering which specific call site to a function with the attribute "warning" or "error" is painful. In the IR record inlining decisions in metadata when inlining a callee that itself c

[llvm] [clang] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers converted_to_draft https://github.com/llvm/llvm-project/pull/73552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: (Initial import from https://reviews.llvm.org/D141451) https://github.com/llvm/llvm-project/pull/73552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers updated https://github.com/llvm/llvm-project/pull/73552 >From cea177222b421c67dabbe9e267f8b9a4ead4d51e Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Tue, 10 Jan 2023 17:42:18 -0800 Subject: [PATCH 01/10] [clang] report inlining decisions with -Wattrib

[clang] [llvm] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/73552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers ready_for_review https://github.com/llvm/llvm-project/pull/73552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: Note to reviewers, I imported this to a GH PR from https://reviews.llvm.org/D141451, and addressed comments from https://reviews.llvm.org/D141451#4311399 down. I did have a related RFC, but the [proposal](https://discourse.llvm.org/t/rfc-improving-clangs-middle-and-back

[clang] [llvm] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers updated https://github.com/llvm/llvm-project/pull/73552 >From cea177222b421c67dabbe9e267f8b9a4ead4d51e Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Tue, 10 Jan 2023 17:42:18 -0800 Subject: [PATCH 01/12] [clang] report inlining decisions with -Wattrib

[clang] [llvm] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
@@ -794,6 +796,13 @@ void BackendConsumer::DontCallDiagHandler(const DiagnosticInfoDontCall &D) { ? diag::err_fe_backend_error_attr : diag::warn_fe_backend_warning_attr) << llvm::demangle(D.getFunctionName()) <<

[clang] [llvm] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
@@ -93,6 +93,8 @@ def err_fe_backend_error_attr : def warn_fe_backend_warning_attr : Warning<"call to '%0' declared with 'warning' attribute: %1">, BackendInfo, InGroup; +def note_fe_backend_in : Note<"called by function '%0'">; nickdesaulniers wrote: Wher

[llvm] [clang] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
@@ -794,6 +796,13 @@ void BackendConsumer::DontCallDiagHandler(const DiagnosticInfoDontCall &D) { ? diag::err_fe_backend_error_attr : diag::warn_fe_backend_warning_attr) << llvm::demangle(D.getFunctionName()) <<

[clang] [llvm] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers updated https://github.com/llvm/llvm-project/pull/73552 >From cea177222b421c67dabbe9e267f8b9a4ead4d51e Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Tue, 10 Jan 2023 17:42:18 -0800 Subject: [PATCH 01/13] [clang] report inlining decisions with -Wattrib

[llvm] [clang] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
@@ -93,6 +93,8 @@ def err_fe_backend_error_attr : def warn_fe_backend_warning_attr : Warning<"call to '%0' declared with 'warning' attribute: %1">, BackendInfo, InGroup; +def note_fe_backend_in : Note<"called by function '%0'">; nickdesaulniers wrote: All

[clang] [llvm] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
@@ -794,6 +795,13 @@ void BackendConsumer::DontCallDiagHandler(const DiagnosticInfoDontCall &D) { ? diag::err_fe_backend_error_attr : diag::warn_fe_backend_warning_attr) << llvm::demangle(D.getFunctionName()) <<

[clang] [llvm] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/73552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
@@ -455,18 +455,11 @@ void DiagnosticInfoDontCall::print(DiagnosticPrinter &DP) const { SmallVector DiagnosticInfoDontCall::getInliningDecisions() const { SmallVector InliningDecisions; - if (MDN) { -const MDOperand &MO = MDN->getOperand(0); -if (auto *MDT = dyn_ca

[flang] [compiler-rt] [libc] [clang] [llvm] [libcxx] [Clang] Use correct base expression for counted_by field (#73168) (PR #73465)

2023-11-27 Thread Nick Desaulniers via cfe-commits
@@ -916,7 +916,7 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, // Build a load of the counted_by field. bool IsSigned = CountedByFD->getType()->isSignedIntegerType(); - const Expr *CountedByExpr = BuildCountedByFieldExpr(Base, CountedByFD)

[llvm] [clang] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers converted_to_draft https://github.com/llvm/llvm-project/pull/73552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [flang] [clang] [llvm] [compiler-rt] [libc] [Clang] Use correct base expression for counted_by field (#73168) (PR #73465)

2023-11-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/73465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [compiler-rt] [clang] [libcxx] [libc] [flang] [Clang] Use correct base expression for counted_by field (#73168) (PR #73465)

2023-11-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/73465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
@@ -455,18 +455,11 @@ void DiagnosticInfoDontCall::print(DiagnosticPrinter &DP) const { SmallVector DiagnosticInfoDontCall::getInliningDecisions() const { SmallVector InliningDecisions; - if (MDN) { -const MDOperand &MO = MDN->getOperand(0); -if (auto *MDT = dyn_ca

[llvm] [clang] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
@@ -449,3 +451,22 @@ void DiagnosticInfoDontCall::print(DiagnosticPrinter &DP) const { if (!getNote().empty()) DP << ": " << getNote(); } + +SmallVector DiagnosticInfoDontCall::getInliningDecisions() const { + SmallVector InliningDecisions; + + if (MDN) { +const MD

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Nick Desaulniers via cfe-commits
@@ -956,42 +956,70 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -const Expr * +namespace { + +struct MemberExprBaseVisitor +: public StmtVisitor { + MemberExprBaseVisitor() = default; + + //===--

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/73730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers commented: Hey, that looks pretty good! I'm surprised it wasn't too much more work to convert to generating the GEP directly. Nice job! Does this change result in codegen differences in IR? (was expecting test changes that used "fork" loads and "bork" GEPs)

  1   2   3   4   5   >