[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-17 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147175/new/ https://reviews.llvm.org/D147175

[PATCH] D147626: [clang] Do not crash when initializing union with flexible array member

2023-04-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:808 unsigned NumElems = numStructUnionElements(ILE->getType()); - if (RDecl->hasFlexibleArrayMember()) + if (!RDecl->isUnion() && RDecl->hasFlexibleArrayMember()) ++NumElems;

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148206/new/ https://reviews.llvm.org/D148206 ___ cfe-commits mailing list

[PATCH] D145088: [RISCV] Add attribute(riscv_rvv_vector_bits(N)) based on AArch64 arm_sve_vector_bits.

2023-04-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/attr-riscv-rvv-vector-bits.cpp:12 + +template struct S { T var; }; + craig.topper wrote: > erichkeane wrote: > > craig.topper wrote: > > > aaron.ballman wrote: > > > > craig.topper wrote: > > >

[PATCH] D148245: Model list initialization more directly; fixes an assert with coverage mapping

2023-04-14 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb0e61de70759: Model list initialization more directly; fixes an assert with coverage mapping (authored by aaron.ballman). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D148245: Model list initialization more directly; fixes an assert with coverage mapping

2023-04-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: erichkeane, rsmith, zequanwu. Herald added a subscriber: martong. Herald added a reviewer: shafik. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. Instead of using the

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Sema/Sema.h:12855 +!Condition.get()->isValueDependent() && +Condition.get()->isIntegerConstantExpr(S.Context)), KnownValue(HasKnownValue &&

[PATCH] D147073: [Coverage] Handle invalid end location of an expression/statement.

2023-04-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147073/new/ https://reviews.llvm.org/D147073 ___ cfe-commits mailing list

[PATCH] D148189: [NFC][Clang] Fix static analyzer tool remark about missing user-defined assignment operator

2023-04-13 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! It's not strictly needed (the move constructor causes the implicit assignment operator to be deleted: https://eel.is/c++draft/class.copy.assign#2.sentence-2), but I think

[PATCH] D147745: Make 'static assertion failed' diagnostics point to the static assertion expression

2023-04-13 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG66202d83b5d4: Make static assertion failed diagnostics point to the static assertion… (authored by sousajo, committed by aaron.ballman). Herald

[PATCH] D147073: [Coverage] Handle invalid end location of an expression/statement.

2023-04-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you! I think there's only a few small things left then: - Add a release note about the fact that we worked around this issue in non-asserts builds but that assert builds may see new assertions triggered from this and to file an issue with a reproducer if

[PATCH] D145088: [RISCV] Add attribute(riscv_rvv_vector_bits(N)) based on AArch64 arm_sve_vector_bits.

2023-04-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/attr-riscv-rvv-vector-bits.cpp:12 + +template struct S { T var; }; + craig.topper wrote: > aaron.ballman wrote: > > erichkeane wrote: > > > craig.topper wrote: > > > > erichkeane wrote: > > > >

[PATCH] D142401: [Clang] Fix a crash when recursively callig a default member initializer.

2023-04-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Aside from the commenting issue pointed out by @shafik, I think we should move the test case into its own test file in SemaCXX and that `RUN` line should *not* use `-verify`. This way, we can test that we don't crash but we don't have to worry about spurious test

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I've not done a complete review yet, but I got started on it and have a handful of comments. Comment at: clang/include/clang/Basic/TokenKinds.def:945 +// Annotation for end of input in clang-repl. +ANNOTATION(input_end) + Should

[PATCH] D145088: [RISCV] Add attribute(riscv_rvv_vector_bits(N)) based on AArch64 arm_sve_vector_bits.

2023-04-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/attr-riscv-rvv-vector-bits.cpp:12 + +template struct S { T var; }; + erichkeane wrote: > craig.topper wrote: > > erichkeane wrote: > > > craig.topper wrote: > > > > @erichkeane does this cover

[PATCH] D147073: [Coverage] Handle invalid end location of an expression/statement.

2023-04-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D147073#4261633 , @zequanwu wrote: > In D147073#4258981 , @aaron.ballman > wrote: > >> Perhaps a way to split the middle would be to assert that the source >> locations are

[PATCH] D147989: [clang] Fix Attribute Placement

2023-04-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Precommit CI has several failures introduced by this patch -- some test cases need to be fixed up (in addition to the new test coverage). Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3424 "attribute %0 is ignored, place it

[PATCH] D147909: [clang] Implement CWG 2397

2023-04-12 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! Comment at: clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p1-cxx0x.cpp:5 int b[5]; - auto a[5] = b; // expected-error{{'a' declared as array of

[PATCH] D147969: Add InsertBraces to ChromiumStyle

2023-04-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Format/Format.cpp:1699 ChromiumStyle.DerivePointerAlignment = false; +ChromiumStyle.InsertBraces = true; if (Language == FormatStyle::LK_ObjC) MyDeveloperDay wrote: > owenpan wrote: > >

[PATCH] D148029: [Clang] Fix crash caused by line splicing in doc comment

2023-04-11 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. The changes seem reasonable to me. Comment at: clang/include/clang/AST/RawCommentList.h:122 +StringRef Text = getRawText(SourceMgr); +if (Text.size() <

[PATCH] D147969: Add InsertBraces to ChromiumStyle

2023-04-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Format/Format.cpp:1699 ChromiumStyle.DerivePointerAlignment = false; +ChromiumStyle.InsertBraces = true; if (Language == FormatStyle::LK_ObjC) HazardyKnusperkeks wrote: > MyDeveloperDay

[PATCH] D148029: [Clang] Fix crash caused by line splicing in doc comment

2023-04-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/RawCommentList.h:122 +StringRef Text = getRawText(SourceMgr); +if (Text.size() < 6 || Text[0] != '/') + return false; Just to double-check, we don't have to worry about there

[PATCH] D147073: [Coverage] Handle invalid end location of an expression/statement.

2023-04-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D147073#4258664 , @zequanwu wrote: > In D147073#4258529 , @aaron.ballman > wrote: > >> In D147073#4258426 , @zequanwu >> wrote: >> >>>

[PATCH] D147073: [Coverage] Handle invalid end location of an expression/statement.

2023-04-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D147073#4258426 , @zequanwu wrote: > In D147073#4258396 , @aaron.ballman > wrote: > >> In D147073#4258384 , @hans wrote: >> >>> Again

[PATCH] D147073: [Coverage] Handle invalid end location of an expression/statement.

2023-04-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D147073#4258384 , @hans wrote: > Again not an expert here, but lgtm. > > (Nit: the > https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaExprCXX.cpp#L1528-L1530 > link in the description seems to point to

[PATCH] D147909: [clang] Implement CWG 2397

2023-04-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: clang-language-wg. aaron.ballman added a comment. The changes need a release note, but also this should have changes to `clang/test/CXX/drs/dr23xx.cpp` with the proper dr markings and update `clang/www/cxx_dr_status.html`. Comment at:

[PATCH] D141451: [clang] report inlining decisions with -Wattribute-{warning|error}

2023-04-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This is right on the line of what I think is reasonable in terms of diagnostics from the backend. It provides useful information to users about inlining decisions, so that's awesome when that information is helpful. But those inlining decisions can be arbitrarily

[PATCH] D147962: [RFC][clang] Pull experimental targets' info out of TargetInfo.cpp (NFC)

2023-04-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: rjmccall, efriedma. aaron.ballman added a comment. Adding the codegen code owners for their approval, but in general I think this is a good idea. Comment at: clang/lib/CodeGen/ABIInfoImpl.h:33-52 +bool isAggregateTypeForABI(QualType T); +

[PATCH] D147989: [clang] Fix Attribute Placement

2023-04-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this! The changes are missing test coverage; please be sure to add that, along with a release note about the fix. I think there's likely more work to be done here as well, considering this behavior: https://godbolt.org/z/sdK3Gef75 (notice

[PATCH] D146595: [clang] Add "debug_trampoline" attribute

2023-04-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The Clang attribute bits generally LG, but I don't know enough on the debug info bits to say. In terms of behavior in PDB files, I'd still like for this attribute to be supported across all debug info formats. If we know this attribute is going to be ignored for

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D147175#4251852 , @philnik wrote: > In D147175#4251076 , @aaron.ballman > wrote: > >> One thing I can't quite determine is whether we expect to call this type >> trait often or

[PATCH] D146986: Downgrade reserved module identifier error into a warning

2023-04-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ReleaseNotes.rst:92 + `_ and allows easier + building of precompiled modules. This diagnostic may be strengthened into an + error again in the future once there is a

[PATCH] D147875: [clang][Diagnostics] WIP: Show line numbers when printing code snippets

2023-04-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. GCC emits line numbers by default these days, so it seems reasonable for Clang to do so as well. Having a way to disable the feature is important though as some folks have scripts that scrap diagnostic results and changing the format may break those scripts in

[PATCH] D144218: [Clang] [AVR] Fix USHRT_MAX for 16-bit int.

2023-04-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D144218#4254021 , @barannikov88 wrote: > There is something wrong with the `#if`s in the test, isn't it? They all look > no-op. Those are verifying that the macro expands to a value that can be used by the

[PATCH] D147901: [NFC][CLANG][API] Fix coverity remarks about large copies by values

2023-04-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ExtractAPI/API.h:138 APIRecord(RecordKind Kind, StringRef USR, StringRef Name, -PresumedLoc Location, AvailabilitySet Availabilities, +PresumedLoc Location, const AvailabilitySet ,

[PATCH] D145803: [clang][DebugInfo] Emit DW_AT_type of preferred name if available

2023-04-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The changes in this patch seem to have caused https://lab.llvm.org/buildbot/#/builders/clang-ppc64-aix to go down for the past 4 days -- can you revert and investigate? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D147661: [Sema] Tweak merging of availability attributes

2023-04-10 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG636dd1e8a178: Make explicit the single-argument constructors of

[PATCH] D147661: [Sema] Tweak merging of availability attributes

2023-04-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman commandeered this revision. aaron.ballman edited reviewers, added: rsandifo-arm; removed: aaron.ballman. aaron.ballman added a comment. In D147661#4255043 , @rsandifo-arm wrote: >> I threw together a patch to make the constructors

[PATCH] D147845: [clang][Interp] Fix a crash when calling invalid constexpr functions

2023-04-08 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 Comment at: clang/test/AST/Interp/functions.cpp:210-212 + return 1 / 0; // expected-note 2{{division by zero}} \ +//

[PATCH] D147534: [clang][Interp] Make sure we have a variable scope for initializers

2023-04-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/records.cpp:315 + auto T = Test(Arr, Pos); + // End of scope, should destroy Test. +} tbaeder wrote: > aaron.ballman wrote: > > Would it make sense to give `Test` a constexpr

[PATCH] D147534: [clang][Interp] Make sure we have a variable scope for initializers

2023-04-07 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. Generally LGTM but had an additional test request. Comment at: clang/test/AST/Interp/records.cpp:315 + auto T = Test(Arr, Pos); + // End of scope,

[PATCH] D147535: [clang][Interp] Don't create global variables more than once

2023-04-07 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. I keep trying to find some way to test this change... and instead, I've filed several new crashing issues in the issue tracker. The changes look correct to me despite the lack

[PATCH] D147714: [Attr] Introduce [[clang::nonportable_musttail]] as less strict version of [[clang::musttail]]

2023-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: erichkeane. aaron.ballman added a comment. In D147714#4249531 , @xbolva00 wrote: > Added location when emiting diagnostic about failed TCO in the backend. Will the diagnostic behavior change based on optimization level?

[PATCH] D146376: Update static_assert message for redundant cases

2023-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG06c6fac696e4: Update static_assert message for redundant cases (authored by Krishna-13-cyber, committed by aaron.ballman). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146376: Update static_assert message for redundant cases

2023-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D146376#4250814 , @xbolva00 wrote: > The patch description mixes "or" and "and" in examples, please fix it. > > SO probably you meant > > :4:1: error: static assertion failed due to requirement 'is_gitlab' >

[PATCH] D147762: [Clang] Fix filtering of inline namespaces for friend functions

2023-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Good catch! Let's skip the release note for this for now, because I think we should cherry-pick this to the 16.0.2 milestone -- but you should add the release note when landing on that branch so users know about the fix. CHANGES SINCE LAST ACTION

[PATCH] D147717: [C++20][NFC] Claim full support for consteval again

2023-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D147717#4249929 , @cjdb wrote: > In D147717#4248989 , @erichkeane > wrote: > >> @cjdb has been running some GDB test suites against our compiler: I am >> wondering if we could

[PATCH] D147673: [Clang] Improve designated inits diagnostic location

2023-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/cxx2b-designated-initializers.cpp:13 + const S result { // expected-error {{field designator (null) does not refer to any field in type 'const S'}} +.a = x + }; rsmith wrote: > Why are we

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D147175#4249212 , @philnik wrote: > In D147175#4246513 , @aaron.ballman > wrote: > >> Ah, I like this approach -- it keeps things roughly in sync with checking >> for unique

[PATCH] D147655: Implement mangling rules for C++20 concepts and requires-expressions.

2023-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D147655#4250922 , @royjacobson wrote: > In D147655#4250056 , @rsmith wrote: > >> There has not been any stable ABI from any compiler targeting the Itanium >> C++ ABI for

[PATCH] D147564: [clang] Mark CWG536 as N/A

2023-04-06 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! This doesn't seem plausible to write a test for (it's basically a clarification rather than a change, as best I can tell). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D147661: [Sema] Tweak merging of availability attributes

2023-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D147661#4249696 , @aaron.ballman wrote: > I don't think there's a way to test this change, unfortunately. However, I > think this exposed a bigger concern, which is that `AttributeCommonInfo` has > some

[PATCH] D147661: [Sema] Tweak merging of availability attributes

2023-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I don't think there's a way to test this change, unfortunately. However, I think this exposed a bigger concern, which is that `AttributeCommonInfo` has some single-argument constructors that are not `explicit` so that we don't run into this issue again. However,

[PATCH] D146376: Update static_assert message for redundant cases

2023-04-06 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 small nit with the release notes. Do you need someone to land this on your behalf? If so, please rebase the patch so it applies cleanly to trunk and upload it

[PATCH] D146897: [clang:diagnostics] Turning off warn_self_assignment_overloaded for user-defined compound assignments

2023-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:14134 return; - + Sema.Diag(Loc, diag::warn_identity_field_assign) << 0; Spurious whitespace change. Comment at:

[PATCH] D147626: [clang] Do not crash when initializing union with flexible array member

2023-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:808 unsigned NumElems = numStructUnionElements(ILE->getType()); - if (RDecl->hasFlexibleArrayMember()) + if (!RDecl->isUnion() && RDecl->hasFlexibleArrayMember()) ++NumElems;

[PATCH] D147615: [clang][Sema][NFC] Save token name instead of the full token

2023-04-06 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! There shouldn't be any lifetime issues from this, as @shafik pointed out, the pointer originates in a static array defined in `TokenKinds.cpp`. Repository: rG LLVM

[PATCH] D147569: [Coverage] Fix crash when visiting PseudoObjectExpr.

2023-04-05 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. Thank you, this looks much better to me! LGTM, but please add a release note about the fix when landing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ah, I like this approach -- it keeps things roughly in sync with checking for unique object representations, which is great. I spotted a few questions, but in general this is heading in the right direction. You should also add a release note to

[PATCH] D147623: [MSVC] Allow declaration of multi-dim 'property' array fields

2023-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. Changes LGTM but please add a release note about the new functionality when landing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147623/new/ https://reviews.llvm.org/D147623

[PATCH] D146376: Update static_assert message for redundant cases

2023-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D146376#4244355 , @Krishna-13-cyber wrote: > - Updated with release note > - I had tried adding more text to the `expected-error` but it already gives a > diagnostic of `static assertion failed due to requirement`

[PATCH] D146090: [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2

2023-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ReleaseNotes.rst:91-92 expressions and how their types are deduced therein, in all C++ language versions. +- Implemented partial support for `P2448R2: Relaxing some constexpr restrictions

[PATCH] D147574: [NFC][clang] Fix Coverity static analyzer tool concerns about auto_causes_copy

2023-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147574/new/ https://reviews.llvm.org/D147574 ___ cfe-commits mailing list

[PATCH] D147531: [clang] Reset track of immediate function context when entering new function

2023-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM, thank you for the fix! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147531/new/ https://reviews.llvm.org/D147531 ___

[PATCH] D147531: [clang] Reset track of immediate function context when entering new function

2023-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ReleaseNotes.rst:273-274 - Fix incorrect merging of lambdas across modules. (`#60985 `_) +- Fix assertion hit when template consteval function appears in nested +

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:2357-2361 +if (SubobjectDecl) { + Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) << SubobjectDecl; + Info.Note(SubobjectDecl->getLocation(), +

[PATCH] D147414: [python] Expose clang_Location_isInSystemHeader

2023-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc7161e73ca0a: [python] Expose clang_Location_isInSystemHeader (authored by R2RT, committed by aaron.ballman). Changed prior to commit: https://reviews.llvm.org/D147414?vs=510542=510771#toc Repository:

[PATCH] D147073: [Coverage] Handle invalid end location of an expression/statement.

2023-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D147073#4242566 , @hans wrote: > In D147073#4240793 , @zequanwu > wrote: > >> In D147073#4240017 , @hans wrote: >> >>> I'm not familiar

[PATCH] D147495: [Clang][Attributes] Add MeaningfulToClassTemplateDefinition to unavailable attribute

2023-04-04 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, though please add a release note about the fix. I don't *think* this qualifies as a potentially breaking change, though it does theoretically have the ability to cause

[PATCH] D147349: [C2x] Implement support for empty brace initialization (WG14 N2900 and WG14 N3011)

2023-04-03 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5d8aaad4452f: [C2x] Implement support for empty brace initialization (WG14 N2900 and WG14… (authored by aaron.ballman). Repository: rG LLVM

[PATCH] D147349: [C2x] Implement support for empty brace initialization (WG14 N2900 and WG14 N3011)

2023-04-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 510574. aaron.ballman marked 4 inline comments as done. aaron.ballman added a comment. Update based on review feedback: - Added an assertion to codegen that a VLA with an initializer is an empty initializer - Updated the codegen tests to use better

[PATCH] D147349: [C2x] Implement support for empty brace initialization (WG14 N2900 and WG14 N3011)

2023-04-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 4 inline comments as done. aaron.ballman added a comment. In D147349#4240847 , @erichkeane wrote: > So not necessary to this patch, but I suspect the non-trivially constructible > types could just be solved the same way we do for

[PATCH] D145088: [RISCV] Add attribute(riscv_rvv_vector_bits(N)) based on AArch64 arm_sve_vector_bits.

2023-04-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: erichkeane, rjmccall, efriedma. aaron.ballman added a comment. Adding Erich as attributes code owner and John/Eli as ABI code owners. Comment at: clang/lib/Sema/SemaType.cpp:8265 + // The attribute vector size must match -mrvv-vector-bits. + //

[PATCH] D146595: [clang] Add "transparent_stepping" attribute

2023-04-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D146595#4237228 , @aprantl wrote: > I think `debug_trampoline` both captures the semantics and makes it clear > that this is related to debugging. I'd be fine with this, or `transparent_debug_stepping`, etc. Just

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Hmmm, is this effectively `std::has_unique_object_representations` (ensuring that all bits of the object representation contribute to the value)? Comment at: clang/lib/AST/Type.cpp:2610 + + if (const auto *RecordDecl =

[PATCH] D146234: [clang] Fix crash when handling nested immediate invocations

2023-04-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146234/new/ https://reviews.llvm.org/D146234 ___ cfe-commits mailing list

[PATCH] D146376: Update static_assert message for redundant cases

2023-04-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The changes need a release note and please do add more text to the `expected-error` comments so we can see what the diagnostic actually produces (instead of just `{{failed}}`). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D141497: [clang][Interp] Record initialization via conditional operator

2023-04-03 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. I'm fine with this approach. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141497/new/ https://reviews.llvm.org/D141497 ___

[PATCH] D147307: [clang] Consider artificial always inline builtin as inline builtins

2023-04-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: rjmccall. aaron.ballman added a comment. I don't feel particularly qualified to review this, but my reading of the GCC docs suggest that this attribute should only impact debug information and nothing else about codegen. However,

[PATCH] D147369: [clang][Interp] Support empty initlist initializers for complex types

2023-04-03 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 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147369/new/ https://reviews.llvm.org/D147369

[PATCH] D147414: [python] Expose clang_Location_isInSystemHeader

2023-04-03 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! Do you need someone to land this on your behalf? If so, please let me know what name and email address you would like for patch attribution. In D147414#4239453

[PATCH] D147349: [C2x] Implement support for empty brace initialization (WG14 N2900 and WG14 N3011)

2023-04-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 510228. aaron.ballman added a comment. Another round of fixing what post commit CI found. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147349/new/ https://reviews.llvm.org/D147349 Files: clang/docs/ReleaseNotes.rst

[PATCH] D147349: [C2x] Implement support for empty brace initialization (WG14 N2900 and WG14 N3011)

2023-04-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 510213. aaron.ballman added a comment. Fixed some test failures found by precommit CI. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147349/new/ https://reviews.llvm.org/D147349 Files: clang/docs/ReleaseNotes.rst

[PATCH] D139653: [clang] Set ShowInSystemHeader for module-build and module-import remarks

2023-04-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added subscribers: ChuanqiXu, aaron.ballman. aaron.ballman added a reviewer: ChuanqiXu. aaron.ballman added a comment. CC @ChuanqiXu -- this relates to our discussions about diagnostics in modules. Are you okay with the direction this change is going? Repository: rG LLVM Github

[PATCH] D147349: [C2x] Implement support for empty brace initialization (WG14 N2900 and WG14 N3011)

2023-03-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 510099. aaron.ballman added a comment. Oops, previous diff missed a change that was only locally staged. Fixed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147349/new/ https://reviews.llvm.org/D147349 Files: clang/docs/ReleaseNotes.rst

[PATCH] D147349: [C2x] Implement support for empty brace initialization (WG14 N2900 and WG14 N3011)

2023-03-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: jyknight, efriedma, erichkeane, cor3ntin, clang-language-wg. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. This implements support for allowing `{}` to consistently

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-03-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this! The changes should also come with a release note in `clang/docs/ReleaseNotes.rst` to note the improvement. Comment at: clang/lib/AST/ExprConstant.cpp:2357-2361 +if (SubobjectDecl) { + Info.FFDiag(DiagLoc,

[PATCH] D146376: Update static_assert message for redundant cases

2023-03-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/static-assert.cpp:266-268 + static_assert(invert(true) || invert(true) || false, ""); // expected-error {{failed}} + static_assert((true && invert(true)) || false, ""); // expected-error {{failed}} +

[PATCH] D146376: Update static_assert message for redundant cases

2023-03-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/static-assert.cpp:262 + + static_assert(invert(true) || invert(true), ""); // expected-error {{failed}} + +1 -- please spell out more of the diagnostic wording (I see you're following a

[PATCH] D147141: [clang][documentation][enhancement]Documented Optimization Flags

2023-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. We already have documentation for these: https://clang.llvm.org/docs/CommandGuide/clang.html#code-generation-options I think there's sufficient confusion in this space that we should fix *something*. We have at least three places where we list a lot of command

[PATCH] D76547: [WebAssembly] Add `wasm-exported` function attribute

2023-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D76547#4231501 , @sbc100 wrote: > In D76547#4231476 , @aaron.ballman > wrote: > >> In D76547#4231422 , @sbc100 wrote: >> >>> The reason

[PATCH] D76547: [WebAssembly] Add `wasm-exported` function attribute

2023-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D76547#4231422 , @sbc100 wrote: > The reason `__attribute__((export_name("foo")))` doesn't work in all use > cases is that we have a lot of existing code that uses the > `EMSCRIPTEN_KEEPALIVE` macro. We also have

[PATCH] D146168: [Sema] Stop stripping CV quals from *this captures in lambdas

2023-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM aside from a minor nit, though I have some minor concerns that we may silently break people's code by calling different overloads or instantiating templates differently so I wonder if this is a potentially breaking change

[PATCH] D76547: [WebAssembly] Add `wasm-exported` function attribute

2023-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: erichkeane. aaron.ballman added a comment. The changes need a release note at some point, and this is missing all of the usual sema diagnostic tests (wrong subject, wrong number of args, wrong target, etc). That said, are we sure this attribute is sufficiently

[PATCH] D146719: [Clang] Improve diagnostics when using a concept as template argument

2023-03-29 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, but please give @erichkeane a chance to give it a second set of eyes given he's been knee-deep in concepts recently. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D146408: [clang][Interp] Start supporting complex types

2023-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/PrimType.h:108 +switch (Expr) { \ + TYPE_SWITCH_CASE(PT_Sint8, B) \ +

[PATCH] D146408: [clang][Interp] Start supporting complex types

2023-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/PrimType.h:108 +switch (Expr) { \ + TYPE_SWITCH_CASE(PT_Sint8, B) \ +

[PATCH] D145545: [clang][Interp] Fix local variable (destructor) management in loop bodies

2023-03-29 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! Comment at: clang/lib/AST/Interp/ByteCodeStmtGen.cpp:324-328 + LocalScope Scope(this); + if (!this->visitUnscopedCompoundStmt(Body)) return false;

[PATCH] D146408: [clang][Interp] Start supporting complex types

2023-03-29 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 but perhaps we should add an expected-failing test case for the `_BitInt` situation just so we don't forget about it. Comment at:

[PATCH] D146412: [NFC] Fix potential for use-after-free in DumpModuleInfoAction

2023-03-29 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. This looks much better to me, thank you! LGTM with one small nit for safety. Comment at: clang/include/clang/Frontend/FrontendActions.h:191 +

<    7   8   9   10   11   12   13   14   15   16   >