[PATCH] D151145: Add disabled unittest reproducing TextProto formatting issue.

2023-05-22 Thread Ben J via Phabricator via cfe-commits
Icantjuddle created this revision. Icantjuddle added a reviewer: clang-format. Herald added a project: All. Icantjuddle requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Github Issue Basica

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D151087#4361237 , @ebevhan wrote: > What is now a reinterpret_cast? An address space conversion, or a bitcast? > It's not as straightforward as it might seem. This is the most straightforward part. It's a bitcast. Repository

[PATCH] D151148: [clang][ExprConstant] fix __builtin_object_size for compound literal

2023-05-22 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added reviewers: efriedma, erichkeane. Herald added a project: All. nickdesaulniers requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixup to D150892 .

[PATCH] D150892: [clang][ExprConstant] fix __builtin_object_size for flexible array members

2023-05-22 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:11740 + LVal.getLValueBase().dyn_cast()); + Result += VD->getFlexibleArrayInitChars(Info.Ctx); +} efriedma wrote: > nickdesaulniers wrote: > > efriedma wrote: > >

[PATCH] D123649: Allow flexible array initialization in C++.

2023-05-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. We found another case where the assertion fails. $ cat test.cpp struct S { int len; int i[]; }; S value{0, 0}; $ clang++ -std=c++11 -c test.cpp `CstSize` is only 4 while `VarSize` is 8. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. We should at least be able to `reinterpret_cast` between cases we know are compatible, as the OpenCL check does. One of the problems with the numerical address space is it doesn't have any information to know if that's strictly legal or not. I'm not sure if casting away

[PATCH] D150913: [Clang][Bfloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-22 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 524467. codemzs marked 12 inline comments as done. codemzs added a comment. @pengfei, @zahiraam, I appreciate your feedback. @pengfei, the `HasFullBFloat16` flag is primarily for identifying hardware with native `bfloat16` support to facilitate automatic exc

[PATCH] D150913: [Clang][Bfloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-22 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:362-363 HasX87 = true; +} else if (Feature == "+fullbf16") { + HasFullBFloat16 = true; } pengfei wrote: > Maybe not need it. Clarified on the other thread but if you h

[PATCH] D150913: [Clang][Bfloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added inline comments. Comment at: clang/test/CodeGen/X86/bfloat16.cpp:2-3 +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +fullbf16 -S -emit-llvm

[PATCH] D123649: Allow flexible array initialization in C++.

2023-05-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. The assertion also fails when the following code is compiled: struct S { int i[]; }; S value{0}; According to C99, flexible array members have to belong to structs that have more than one named member. But clang allows that as a GNU extension although gcc seems to

[PATCH] D123649: Allow flexible array initialization in C++.

2023-05-22 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. The assertion is correct; without it, your code is getting miscompiled. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123649/new/ https://reviews.llvm.org/D123649 ___ cfe-commit

[PATCH] D150403: [clang-format] Adjust braced list detection (try 2)

2023-05-22 Thread Galen Elias via Phabricator via cfe-commits
galenelias updated this revision to Diff 524484. galenelias edited the summary of this revision. galenelias added a comment. Thanks for the additional review comments. Hopefully everything if fixed. In D150403#4358845 , @owenpan wrote: > Can you put you

[PATCH] D149516: [Sema] `setInvalidDecl` for error deduction declaration

2023-05-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from a request for a comment. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:11196 if (D.isFunctionDefinition()) Diag(D.getIdentifierLoc(), diag:

[PATCH] D123649: Allow flexible array initialization in C++.

2023-05-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D123649#4362402 , @efriedma wrote: > The assertion is correct; without it, your code is getting miscompiled. The assertion may be correct in its intent, but we still should not be asserting in practice: https://godbolt.

[PATCH] D150875: Make dereferencing a void* a hard-error instead of warn-as-error

2023-05-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Precommit CI found various failures that need to be addressed. Also, have you tested to see what breaks in llvm-test-suite? Comment at: clang/docs/ReleaseNotes.rst:58 Clang will only search for std::coroutine_traits for coroutines then. +- Cla

[PATCH] D151094: [clang] Implement P2564 "consteval must propagate up"

2023-05-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 524491. cor3ntin added a comment. In FunctionScopeInfo, only track that an immediate-escalating expression has been found rather than which one - as that is recorded on the expression itself. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D150875: Make dereferencing a void* a hard-error instead of warn-as-error

2023-05-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked an inline comment as done. erichkeane added a comment. In D150875#4362434 , @aaron.ballman wrote: > Precommit CI found various failures that need to be addressed. Also, have you > tested to see what breaks in llvm-test-suite? Woops!

[PATCH] D123649: Allow flexible array initialization in C++.

2023-05-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Looks like `Init`'s type is wrong. It should be `{ i32, [1 x i32] }` instead of `{ i32, [0 x i32] }` in the case where `S` has two members. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123649/new/ https://reviews.llvm.or

[clang] b5b6896 - [test] Add more ext_vector_type tests for C

2023-05-22 Thread Cassie Jones via cfe-commits
Author: Cassie Jones Date: 2023-05-22T15:08:14-07:00 New Revision: b5b689679e1e435b5c82832f468ed939c7b72021 URL: https://github.com/llvm/llvm-project/commit/b5b689679e1e435b5c82832f468ed939c7b72021 DIFF: https://github.com/llvm/llvm-project/commit/b5b689679e1e435b5c82832f468ed939c7b72021.diff

[PATCH] D151061: [test] Add ext_vector_type tests for C

2023-05-22 Thread Cassie Jones via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb5b689679e1e: [test] Add more ext_vector_type tests for C (authored by porglezomp). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151061/new/ https://review

[PATCH] D151162: Add -Wpacked-non-pod to -Wall

2023-05-22 Thread Zenong Zhang via Phabricator via cfe-commits
SlaterLatiao created this revision. Herald added a project: All. SlaterLatiao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D151162 Files: clang/include/clang/Basic/Diagno

[PATCH] D150841: [IR] Make stack protector symbol dso_local according to -f[no-]direct-access-external-data

2023-05-22 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. This also resolves https://github.com/llvm/llvm-project/issues/62482; was that intentional? If so, consider adding a link to https://github.com/llvm/llvm-project/issues/62482

[PATCH] D151166: [clangd] Interactive AST matchers with #pragma clang query

2023-05-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. The idea: you can type in AST matchers,

[PATCH] D151168: [CUDA] plumb through new sm_90-specific builtins.

2023-05-22 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. Herald added subscribers: mattd, gchakrabarti, asavonic, bixia, yaxunl. Herald added a project: All. tra added a reviewer: jlebar. tra published this revision for review. Herald added subscribers: cfe-commits, jholewinski. Herald added a project: clang. Repository: rG

[PATCH] D151166: [clangd] Interactive AST matchers with #pragma clang query

2023-05-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 524519. sammccall edited the summary of this revision. sammccall added a comment. Add demo link Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151166/new/ https://reviews.llvm.org/D151166 Files: clang-tools

[PATCH] D151166: [clangd] Interactive AST matchers with #pragma clang query

2023-05-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. @kadircet this is a slightly silly feature that I put together on vacation I'd like your call on whether this is something we should have. If so, feel free to hand off the review. It's definitely a power-user feature and nigh undiscoverable. I'd plan to write some do

[PATCH] D151148: [clang][ExprConstant] fix __builtin_object_size for compound literal

2023-05-22 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:11737 bool Ret = HandleSizeof(Info, ExprLoc, Ty, Result); if (Ty->isStructureType() && Ty->getAsStructureType()->getDecl()->hasFlexibleArrayMember()) { For the second ca

[PATCH] D123649: Allow flexible array initialization in C++.

2023-05-22 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. In D123649#4362418 , @aaron.ballman wrote: > In D123649#4362402 , @efriedma > wrote: > >> The assertion is correct; without it, your code is getting miscompiled. > > The assertion may b

[clang] 590eb76 - [test] Add C++ ext_vector_type tests

2023-05-22 Thread Cassie Jones via cfe-commits
Author: Cassie Jones Date: 2023-05-22T15:58:01-07:00 New Revision: 590eb76ba3cd668baee7d06940ad820e89f830c4 URL: https://github.com/llvm/llvm-project/commit/590eb76ba3cd668baee7d06940ad820e89f830c4 DIFF: https://github.com/llvm/llvm-project/commit/590eb76ba3cd668baee7d06940ad820e89f830c4.diff

[PATCH] D151059: [test] Add C++ ext_vector_type tests

2023-05-22 Thread Cassie Jones via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG590eb76ba3cd: [test] Add C++ ext_vector_type tests (authored by porglezomp). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151059/new/ https://reviews.llvm.

[PATCH] D148461: [clang-tidy] Support C++17/20 in bugprone-exception-escape

2023-05-22 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. Please cover the changes in as much test cases as possible. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:151 +bool isFunctionTypeEqual(const FunctionType *From, const FunctionType *To) { + if (From == To) Th

[PATCH] D151148: [clang][ExprConstant] fix __builtin_object_size for compound literal

2023-05-22 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 524532. nickdesaulniers marked an inline comment as done. nickdesaulniers added a comment. - more dyn_cast Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151148/new/ https://reviews.llvm.org/D151148 Fil

[PATCH] D151148: [clang][ExprConstant] fix __builtin_object_size for compound literal

2023-05-22 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:11737 bool Ret = HandleSizeof(Info, ExprLoc, Ty, Result); if (Ty->isStructureType() && Ty->getAsStructureType()->getDecl()->hasFlexibleArrayMember()) { efriedma w

[PATCH] D151148: [clang][ExprConstant] fix __builtin_object_size for compound literal

2023-05-22 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:11737 bool Ret = HandleSizeof(Info, ExprLoc, Ty, Result); if (Ty->isStructureType() && Ty->getAsStructureType()->getDecl()->hasFlexibleArrayMember()) { nickdesaulniers w

[PATCH] D151172: [CodeGen] Fix the type of the constant that is used to zero-initialize a flexible array member

2023-05-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: efriedma, aaron.ballman, rjmccall. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. `EmitArrayConstant` was incorrectly returning a zeroinitializer of zero-element array type when th

[PATCH] D151162: Add -Wpacked-non-pod to -Wall

2023-05-22 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Yeah, looks consistent with GCC ( https://godbolt.org/z/EGc3Ec9YT ), as you say - so I'm OK with it. But wouldn't mind a second opinion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151162/new/ https://reviews.llvm.org/D

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-05-22 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 524541. void added a comment. Herald added a subscriber: ormris. Add bounds checking for the "ArrayBounds" saniziter kind. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381

[PATCH] D151172: [CodeGen] Fix the type of the constant that is used to zero-initialize a flexible array member

2023-05-22 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:964 + if (NonzeroLength == 0 && + (DesiredType->getNumElements() != 0 || Elements.empty())) return llvm::ConstantAggregateZero::get(DesiredType); Not sure I like this fix.

[PATCH] D143984: [DebugMetadata] Simplify handling subprogram's retainedNodes field. NFCI (1/7)

2023-05-22 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D143984#4358115 , @dzhidzhoev wrote: > In D143984#4357517 , @dblaikie > wrote: > >> Looks like this series got approved - is it waiting on any particular >> feedback, or do you need

[PATCH] D148489: [clangd] Implement configs to stop clangd produce a certain semantic tokens

2023-05-22 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. (Do you plan to address the last comment before I merge?) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148489/new/ https://reviews.llvm.org/D148489 ___ cfe-commits mailing list c

[PATCH] D148489: [clangd] Implement configs to stop clangd produce a certain semantic tokens

2023-05-22 Thread Qingyuan Zheng via Phabricator via cfe-commits
daiyousei-qz added a comment. In D148489#4362990 , @nridge wrote: > (Do you plan to address the last comment before I merge?) Oh, okay. Let me address that. Didn't see that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D150411: [NFC][Clang][Coverity] Fix Static Code Analysis Concerns with copy without assign

2023-05-22 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. (& I realize I'm a bit late to the party, but: > In several cases it's not completely obvious to me whether a copy assignment > operator should or can be defined. But perhaps this doesn't need to be > addressed right now: we seem to compile with -Wextra, which contains

[PATCH] D150892: [clang][ExprConstant] fix __builtin_object_size for flexible array members

2023-05-22 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine added a comment. This change causes an assertion failure on the following test case. The memset is important for some reason. saugustine@saugustine-desktop:~/llvm/build $ cat t.c struct foo { unsigned char x; unsigned char data[]; }; extern void *memset (void

[clang] 52bc4b1 - [NFC] [C++20] [Modules] Refactor Sema::isModuleUnitOfCurrentTU into

2023-05-22 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-05-23T10:52:22+08:00 New Revision: 52bc4b16cb68d6d64c0d9499b2e6c1d719e78085 URL: https://github.com/llvm/llvm-project/commit/52bc4b16cb68d6d64c0d9499b2e6c1d719e78085 DIFF: https://github.com/llvm/llvm-project/commit/52bc4b16cb68d6d64c0d9499b2e6c1d719e78085.diff LO

[PATCH] D150403: [clang-format] Adjust braced list detection (try 2)

2023-05-22 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added a comment. In D150403#4362403 , @galenelias wrote: > Galen Elias > > I'm not sure if there is somewhere I should be putting that in the summary or > diff itself, or just here in the comments? Just here in

[clang] 6dcde65 - This is a retry of https://reviews.llvm.org/D114583, which was backed

2023-05-22 Thread Owen Pan via cfe-commits
Author: Galen Elias Date: 2023-05-22T20:25:55-07:00 New Revision: 6dcde658b2380d7ca1451ea5d1099af3e294ea16 URL: https://github.com/llvm/llvm-project/commit/6dcde658b2380d7ca1451ea5d1099af3e294ea16 DIFF: https://github.com/llvm/llvm-project/commit/6dcde658b2380d7ca1451ea5d1099af3e294ea16.diff L

[PATCH] D150403: [clang-format] Adjust braced list detection (try 2)

2023-05-22 Thread Owen Pan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6dcde658b238: This is a retry of https://reviews.llvm.org/D114583, which was backed (authored by galenelias, committed by owenpan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D151047: [clang-format] Fix indentation for selective formatting.

2023-05-22 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added a comment. In D151047#4361205 , @Sedeniono wrote: > Regarding name and mail: If you use "Sedenion" as name and > "39583823+sedeni...@users.noreply.github.com" as mail, I guess github will > attribute the com

[PATCH] D151042: [clang] Add tests for CWG issues 977, 1482, 2516

2023-05-22 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik accepted this revision. shafik added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151042/new/ https://reviews.llvm.org/D151042 ___

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-05-22 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds added inline comments. Comment at: llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp:184 // specify a string, i.e, the "%s" specifier with optional '*' characters. -static void locateCStrings(SparseBitVector<8> &BV, Value *Fmt) { - StringRef Str; - if (!getConstantString

[clang] 807aa26 - [C++20] [Modules] Don't ignore -fmodule-file when we compile pcm files

2023-05-22 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-05-23T14:22:01+08:00 New Revision: 807aa261361f4cd9153dda43c9cadbd3fcc659c5 URL: https://github.com/llvm/llvm-project/commit/807aa261361f4cd9153dda43c9cadbd3fcc659c5 DIFF: https://github.com/llvm/llvm-project/commit/807aa261361f4cd9153dda43c9cadbd3fcc659c5.diff LO

[PATCH] D150761: [NFC][Py Reformat] Reformat python files in clang and clang-tools-extra

2023-05-22 Thread Tobias Hieta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdd3c26a045c0: [NFC][Py Reformat] Reformat python files in clang and clang-tools-extra (authored by thieta). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150

[clang] e74a4fe - [NFC] [C++20] [Modules] Add a test

2023-05-22 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-05-23T14:40:17+08:00 New Revision: e74a4fe317385ce2ca4045d3a0fac00e64ca3ee4 URL: https://github.com/llvm/llvm-project/commit/e74a4fe317385ce2ca4045d3a0fac00e64ca3ee4 DIFF: https://github.com/llvm/llvm-project/commit/e74a4fe317385ce2ca4045d3a0fac00e64ca3ee4.diff LO

<    1   2   3