[PATCH] D132503: Add cxx scope if needed for requires clause.

2022-08-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Also, don't forget to add a release note since this is fixing an issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132503/new/ https://reviews.llvm.org/D132503 ___ cfe-c

[PATCH] D132592: [Clang] Implement function attribute nouwtable

2022-08-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Do we have any evidence that users need this level of control or will understand how to properly use the attribute? The command line option makes sense to me because it's an all-or-nothing flag, but I'm not certain I understand the need for per-function control. A

[PATCH] D132286: [clang][Interp] Implement function calls

2022-08-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. It looks like precommit CI found some relevant failures. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:614 + +if (Optional T = classify(E->getType())) { + // Put arguments on the stack. tbaeder wrote: > aaron.ballm

[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/FormatString.cpp:422 + case BuiltinType::Bool: +// Don't warn printf("%hd", [char]) +// https://reviews.llvm.org/D66186 inclyc wrote: > aaron.ballman wrote: > > The co

[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/FormatString.cpp:367 +case BuiltinType::Char_U: +case BuiltinType::Bool: + return Match; inclyc wrote: > aaron.ballman wrote: > > Isn't this a match promotion as well? e.g. `p

[PATCH] D132659: PotentiallyEvaluatedContext in a ImmediateFunctionContext.

2022-08-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: cor3ntin, aaron.ballman, clang-language-wg. aaron.ballman added a comment. Adding a few more reviewers just in case, but this is generally looking good. Please also add a release note for the fix! Comment at: clang/include/clang/Sema/Sema.h:1355

[PATCH] D132503: [clang] Add cxx scope if needed for requires clause.

2022-08-25 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 commit on your behalf? If so, what name and email address would you like used for patch attribution? Comment at: clang/docs/Releas

[PATCH] D132659: PotentiallyEvaluatedContext in a ImmediateFunctionContext.

2022-08-25 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/D132659/new/ https://reviews.llvm.org/D132659

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I spotted one last (hopefully) concern, but otherwise this LG for functionality. Can you also add a release note for the improved diagnostic behavior? Comment at: clang/include/clang/Basic/TokenKinds.def:381-383 +C2X_KEYWORD(bool

[PATCH] D132712: [Clang] Fix assert in Sema::LookupTemplateName so that it does not attempt an unconditional cast to TagType

2022-08-26 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. Good catch! LGTM, but please add a release note for the fix. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132712/new/ https://reviews.llvm.org/D132712

[PATCH] D131632: [clang] Enable output of SARIF diagnostics

2022-08-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Comment at: clang/include/clang/Frontend/SARIFDiagnostic.h:45-47 + void emitCodeContext(FullSourceLoc Loc, DiagnosticsEngine::Level Level, + SmallVectorImpl &Ranges, +

[PATCH] D132695: [Clang] Avoid crashes when parsing using enum declarations

2022-08-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. Thanks, this looks like it cleans up some needlessly chatty diagnostics! Just had a question that you can fix when landing if you agree, otherwise LGTM as well. Comment at: clang/lib/Parse/ParseDecl.cpp:4651

[PATCH] D132661: [clang] Make guard(nocf) attribute available only for Windows

2022-08-26 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, thank you! Comment at: clang/include/clang/Basic/Attr.td:373-375 // Specifies Operating Systems for which the target applies, based off the // OSTyp

[PATCH] D132592: [Clang] Implement function attribute nouwtable

2022-08-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D132592#3749567 , @ychen wrote: > Thanks for taking a look! > > In D132592#3749261 , @aaron.ballman > wrote: > >> Do we have any evidence that users need this level of control or

[PATCH] D132723: [Clang] Fix crash in coverage of if consteval.

2022-08-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Can you also add a release note? Comment at: clang/lib/CodeGen/CoverageMappingGen.cpp:1375 extendRegion(S); + if (S->getInit()) Spurious whitespace change. Comment at: clang/lib/CodeGen/CoverageMapping

[PATCH] D132286: [clang][Interp] Implement function calls

2022-08-26 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 some small nits you can fix when landing. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:607-610 + if (auto R = + ByteCo

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-26 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's a minor thing left to be fixed, but I'll handle it on commit. I wanted to drop the `|KEYC2X` for the Boolean keywords so it relies solely on `BOOLSUPPORT`, but then

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-26 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 rG41667a8b9b62: Diagnosing the Future Keywords (authored by Codesbyusman, committed by aaron.ballman). Changed prior to commit: https://reviews.llvm

[PATCH] D132723: [Clang] Fix crash in coverage of if consteval.

2022-08-26 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, thanks for the fix! Comment at: clang/lib/CodeGen/CoverageMappingGen.cpp:1407 // The 'else' count applies to the area immediately after the 'then'.

[PATCH] D132749: Expose QualType::getUnqualifiedType in libclang

2022-08-26 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. In D132749#3752233 , @diseraluca wrote: > I found a precedence on the old mailing list, from 2018 > (https://lists.llvm.org/pipermail/c

[PATCH] D132398: Allow constant static members to be used with 'this'

2022-08-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: aaron.ballman, clang-language-wg. aaron.ballman added a comment. Thanks for this! Can you add some more details to the patch description so it's more clear from there why the patch is necessary? Also, can you add a release note for the fix? I'm pretty sure the cha

[PATCH] D132136: [clang] Perform implicit lvalue-to-rvalue cast with new interpreter

2022-08-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D132136#3751702 , @erichkeane wrote: > Would be great if we had a better test here... is there anything we can do to > validate this is happening other than checking for that one note? +1 to this request, but the chang

[PATCH] D132739: [clang][Interp] Implement IntegralToBoolean casts

2022-08-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132739/new/ https://reviews.llvm.org/D132739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D133924: add clang_CXXMethod_isDeleted function

2022-09-16 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 the one minor nit. Do you need someone to commit on your behalf? If so, what name and email address would you like used for patch attribution?

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Sema/offsetof.c:79 +int a; +struct B // no-error, struct B is not defined within __builtin_offsetof directly +{ inclyc wrote: > aaron.ballman wrote: > > inclyc wrote: > > > inclyc wrote: > >

[PATCH] D133108: [clang] Rework IsTailPaddedMemberArray into isFlexibleArrayMemberExpr

2022-09-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Found a few more things while trying to convince myself this really is NFC, and I don't think it is. If you agree, then I think we should have some additional test coverage to show the behavioral changes. Comment at: clang/lib/Sema/SemaChecking.

[PATCH] D133934: [clang][Interp] Handle sizeof() expressions

2022-09-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133934#3794389 , @tbaeder wrote: > I can see that `HandleSizeOf()` uses 1 for void and function types as a gcc > extension, but I can't reproduce that: https://godbolt.org/z/njG9zh6PM C code allows the construct: https

[PATCH] D133853: [AST] Add msvc-specific C++11 attributes

2022-09-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: erichkeane. aaron.ballman added a subscriber: erichkeane. aaron.ballman added a comment. In D133853#3793284 , @RIscRIpt wrote: > In D133853#3792518 , @aaron.ballman > wrote: > >> I

[PATCH] D133725: Searching for tokens including comments

2022-09-16 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. Ah, thank you for the extra description, that helped a lot. The changes LGTM, though you should hold off on landing them until we're sure the clang-tidy changes are going in. R

[PATCH] D133634: [clang] Allow vector of BitInt

2022-09-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3024 def err_attribute_invalid_vector_type : Error<"invalid vector element type %0">; +def err_attribute_invalid_bitint_vector_type : Error<"invalid vector element type %0, must b

[PATCH] D134112: [clang] Update ReleaseNotes about a crash fix (Issue 53628)

2022-09-18 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 thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134112/new/ https://reviews.llvm.org/D134112 _

[PATCH] D133436: Ground work for cuda-related checks in clang-tidy

2022-09-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/stddef.h:12 + +using size_t = long long unsigned; + barcisz wrote: > njames93 wrote: > > If this is all the file is used for, and it's only used for this o

[PATCH] D106577: [clang] Define __STDC_ISO_10646__

2022-09-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D106577#3799067 , @mgorny wrote: > In D106577#2965059 , @aaron.ballman > wrote: > >> Thanks! I've passed them along to WG14 and will report back what I hear. > > Have you heard a

[PATCH] D133887: [Clang] Support label at end of compound statement

2022-09-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this! I spotted an issue where we're not quite complete with this implementation work. I pushed up a new test case in https://github.com/llvm/llvm-project/commit/a244194f73788de6dfd6d753ff09be3625613f9f that shows it (and set the C status

[PATCH] D133853: [AST] Add msvc-specific C++11 attributes

2022-09-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133853#3797598 , @RIscRIpt wrote: > In D133853#3795579 , @aaron.ballman > wrote: > >> FWIW, one Microsoft-specific attribute I know people have been asking about >> is `[[msvc:

[PATCH] D133887: [Clang] Support label at end of compound statement

2022-09-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133887#3799347 , @Izaron wrote: > In D133887#3799310 , @aaron.ballman > wrote: > >> Thank you for working on this! I spotted an issue where we're not quite >> complete with thi

[PATCH] D133887: [Clang] Support label at end of compound statement

2022-09-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133887#3799450 , @Izaron wrote: > In D133887#3799399 , @aaron.ballman > wrote: > >> I can fix up the C++ status page as well if you'd like, or I can hold off if >> you're alrea

[PATCH] D133668: [HLSL] Use _BitInt(16) for int16_t to avoid promote to int.

2022-09-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: rjmccall, efriedma. aaron.ballman added a comment. Adding some codegen reviewers for awareness. Comment at: clang/lib/Basic/Targets/DirectX.h:66 + bool hasBitIntType() const override { return true; } bool hasFeature(StringRef Feature) const

[PATCH] D133583: [clang][ubsan] Fix __builtin_assume_aligned incorrect type descriptor and C++ object polymorphic address

2022-09-19 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! Please give @rjmccall another day to chime in with any concerns he has. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133583/

[PATCH] D133668: [HLSL] Use _BitInt(16) for int16_t to avoid promote to int.

2022-09-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. LGTM, but please wait a bit to land for the codegen reviewers to weigh in on those tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133668/new/ https://reviews.llvm.org/D133668 __

[PATCH] D134286: [C2x] implement typeof and typeof_unqual

2022-09-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: erichkeane, jyknight, rsmith, rjmccall, clang-language-wg. 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:

[PATCH] D134286: [C2x] implement typeof and typeof_unqual

2022-09-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 461583. aaron.ballman added a comment. Updated the C status page accordingly. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134286/new/ https://reviews.llvm.org/D134286 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/ASTContext

[PATCH] D133249: [libc++] Documents details of the pre-commit CI.

2022-09-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/www/hacking.html:311-312 + Unlike Clang, libc++ supports multiple versions of Clang. Therefore when a + patch changes the diagnostics it might be required to use a regex in the + "expected" tests to make it pass the CI. +

[PATCH] D133583: [clang][ubsan] Fix __builtin_assume_aligned incorrect type descriptor and C++ object polymorphic address

2022-09-20 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 rG8392f1cc7827: Fix __builtin_assume_aligned incorrect type descriptor and C++ object… (authored by yronglin, committed by aaron.ballman). Repository:

[PATCH] D133583: [clang][ubsan] Fix __builtin_assume_aligned incorrect type descriptor and C++ object polymorphic address

2022-09-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133583#3802451 , @yronglin wrote: > Thanks for take a review @aaron.ballman @rjmccall , can you land this patch > for me? Please use 'yronglin ' to commit the change. Happy to do so! I've landed on your behalf in http

[PATCH] D134207: [Clang] Support case and default labels at end of compound statement

2022-09-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseStmt.cpp:948-956 +if (getLangOpts().CPlusPlus) { + Diag(Tok, getLangOpts().CPlusPlus2b +? diag::warn_cxx20_compat_label_end_of_compound_statement +: diag::ext_cx

[PATCH] D134286: [C2x] implement typeof and typeof_unqual

2022-09-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 13 inline comments as done. aaron.ballman added a comment. In D134286#3803077 , @erichkeane wrote: > I'm on the fence about re-using the same nodes for `typeof` and > `typeof_unqual`. However, I have a preference to stop shuffling

[PATCH] D134286: [C2x] implement typeof and typeof_unqual

2022-09-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 461673. aaron.ballman marked 8 inline comments as done. aaron.ballman added a comment. Addressing review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134286/new/ https://reviews.llvm.org/D134286 Files: clang/docs/ReleaseNotes.rst

[PATCH] D134286: [C2x] implement typeof and typeof_unqual

2022-09-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 461675. aaron.ballman added a comment. Really update, don't just kinda sorta update. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134286/new/ https://reviews.llvm.org/D134286 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/AST

[PATCH] D134286: [C2x] implement typeof and typeof_unqual

2022-09-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:12910-12916 +// FIXME:: is this assumption correct or do we need to do work here to find +// the common type sugar regarding the stripped qualifiers if only one side +// is unqual? +asse

[PATCH] D134286: [C2x] implement typeof and typeof_unqual

2022-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 4 inline comments as done. aaron.ballman added inline comments. Comment at: clang/include/clang/AST/Type.h:1902 AutoTypeBitfields AutoTypeBits; +TypeOfBitfields TypeOfBits; BuiltinTypeBitfields BuiltinTypeBits; erichkeane wrote:

[PATCH] D131465: C++/ObjC++: switch to gnu++17 as the default standard

2022-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131465#3804893 , @glandium wrote: > This didn't change the default for msvc targets, was that expected? Can confirm: https://godbolt.org/z/EPxn1T6za I did not expect this (and I'm a bit shocked that we had no test fail

[PATCH] D134286: [C2x] implement typeof and typeof_unqual

2022-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 461867. aaron.ballman marked 2 inline comments as done. aaron.ballman added a comment. Herald added a subscriber: arphaman. Updating based on review feedback; I believe this handles all of the comments. CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D134286: [C2x] implement typeof and typeof_unqual

2022-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked an inline comment as done. aaron.ballman added inline comments. Comment at: clang/lib/AST/Type.cpp:3504-3507 + // We strip all qualifier-like attributes as well. + if (const auto *AT = dyn_cast(Ret.getTypePtr()); + AT && AT->isQualifier()) +Ret = A

[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

2022-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. There are no tests for applying this to a global variable, so those should be added. Comment at: clang/include/clang/Basic/AttrDocs.td:6596-6598 +The ``SV_DispatchThreadID`` semantic, when applied to an input parameter, specifies a +data binding

[PATCH] D134326: [HLSL] Allow SV_GroupIndex for lib profile.

2022-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This looks reasonable to me, but I leave the final sign-off to @beanz. Comment at: clang/test/CodeGenHLSL/GlobalDestructors.hlsl:1 -// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -std=hlsl202x -S -emit-llvm -disable-llvm-passes %s -o -

[PATCH] D134286: [C2x] implement typeof and typeof_unqual

2022-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 461886. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. Simplifying based on review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134286/new/ https://reviews.llvm.org/D134286 Files: clang/docs/Releas

[PATCH] D115169: Create a generic ABI document for _BitInt

2022-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman edited reviewers, added: efriedma; removed: rsmith. aaron.ballman added a comment. Now that C2x is closer to getting finalized, I would like to get this documentation up somewhere public so that other implementations can see what we do and match our behavior more easily. Changing u

[PATCH] D134054: [clang][Interp] Properly destruct allocated Records

2022-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM as well (modulo Erich's comments). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134054/new/ https://reviews.llvm.org/D134054 ___

[PATCH] D133924: add clang_CXXMethod_isDeleted function

2022-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbc14ed7de0f1: Add clang_CXXMethod_isDeleted function (authored by anderslanglands, committed by aaron.ballman). Changed prior to commit: https://reviews.llvm.org/D133924?vs=460865&id=461900#toc Reposit

[PATCH] D129755: Thread safety analysis: Support copy-elided production of scoped capabilities through arbitrary calls

2022-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D129755#3796799 , @aaronpuchert wrote: > In D129755#3779997 , @aaron.ballman > wrote: > >> Please be sure to add a release note for the changes! > > Any opinion as to what the r

[PATCH] D134057: [clang][Interp] Start implementing record types

2022-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:642 + +for (const auto *Init : Ctor->inits()) { + const FieldDecl *Member = Init->getMember(); Do we have to do anything special if the ctor is an inheriting ctor?

[PATCH] D134362: [clang] Fix interaction between asm labels and inline builtins

2022-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: rjmccall, efriedma. aaron.ballman added a comment. Adding some more codegen reviewers. Can you add a release note for the fix? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134362/new/ https://reviews.llvm.org/D134362 _

[PATCH] D133108: [clang] Rework IsTailPaddedMemberArray into isFlexibleArrayMemberExpr

2022-09-21 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 this should probably have a release note for it (we can augment the release note when we make further changes in this area). Comment at: clang/tes

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: sammccall, rjmccall, efriedma. aaron.ballman added a comment. In D133289#3784117 , @aaron.ballman wrote: > One thought that occurred to me is that the way C has this specified is > awfully effectively the same way implicit

[PATCH] D134207: [Clang] Support case and default labels at end of compound statement

2022-09-21 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/D134207/new/ https://reviews.llvm.org/D134207

[PATCH] D115169: Create a generic ABI document for _BitInt

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D115169#3805964 , @gustedt wrote: > It seems that this has already shipped on some platforms. Since this > basically binds others to use the same ABI, it would perhaps be nice if the > document could have a table that l

[PATCH] D130131: [HLSL] CodeGen hlsl cbuffer/tbuffer.

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:81-83 +auto *GV = Const.first; +Const.second = EltTys.size(); +auto *Ty = GV->getValueType(); Please spell out these types. Comment at: clang/lib/C

[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133983#3807284 , @python3kgae wrote: > In D133983#3805761 , @aaron.ballman > wrote: > >> There are no tests for applying this to a global variable, so those should >> be added

[PATCH] D131465: C++/ObjC++: switch to gnu++17 as the default standard

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added subscribers: hans, majnemer, rnk. aaron.ballman added a comment. In D131465#3806709 , @MaskRay wrote: > In D131465#3804893 , @glandium > wrote: > >> This didn't change the default for msvc tar

[PATCH] D134394: Update docs about [[likely]] vs. PGO

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134394#3808397 , @serge-sans-paille wrote: > While running this small experiment: > https://sergesanspaille.fedorapeople.org/proftest.sh Thank you for the help with testing the assumptions here! Repository: rG LLV

[PATCH] D133659: [Clang] P1169R4: static operator()

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: aaron.ballman, erichkeane, shafik, cor3ntin, lichray. aaron.ballman added a comment. In D133659#3808095 , @royjacobson wrote: > Thanks everyone! So if no one else has comments I'm planning to merge this > tomorrow. FWIW,

[PATCH] D133659: [Clang] P1169R4: static operator()

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:1037-1041 +def err_static_mutable_lambda : Error< + "lambda cannot be both mutable and static">; +def err_static_lambda_captures : Error< + "a static lambda cannot have any captur

[PATCH] D133853: [AST] Add msvc-specific C++11 attributes

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133853#3808669 , @RIscRIpt wrote: > In D133853#3799344 , @aaron.ballman > wrote: > >> It's a conforming extension in older language modes like C++98, where we >> couldn't steal

[PATCH] D133659: [Clang] P1169R4: static operator()

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: hubert.reinterpretcast. aaron.ballman added a subscriber: hubert.reinterpretcast. aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:1037-1041 +def err_static_mutable_lambda : Error< + "lambda cannot

[PATCH] D134416: Allow getting template args for ClassTemplateSpecializations

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Mostly nits from me (FWIW, we use `auto` when the type is explicitly spelled out in the initialization and we don't usually use `else` after an unconditional `return` as a matter of coding style.) In terms of the test coverage, I would probably make a new test mod

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Parse/Parser.h:2343 + static ImplicitTypenameContext + isImplicitTypenameContext(DeclSpecContext DSC) { +switch (DSC) { Starting with `is` implies contextual conversion to bool (generally)

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:5592 +bool Parser::isConstructorDeclarator(bool IsUnqualified, bool DeductionGuide, + bool IsFriend) { TentativeParsingAction TPA(*this); erichke

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Sema/DeclSpec.h:1806 +// typename is allowed (C++2a [temp.res]p5]). +enum class ImplicitTypenameContext { + No, ayzhao wrote: > aaron.ballman wrote: > > Not opposed to this construct, but I am

[PATCH] D134461: [Clang] Diagnose an error when trying to deferencing void pointers in C

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: clang-language-wg, jyknight. aaron.ballman added a comment. Thank you for working on this! Adding a few more reviewers for exposure. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:6921-6926 def ext_typecheck_indirection_through_void

[PATCH] D131465: C++/ObjC++: switch to gnu++17 as the default standard

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131465#3809413 , @hans wrote: > In D131465#3808381 , @aaron.ballman > wrote: > >> In D131465#3806709 , @MaskRay >> wrote: >> >>> In D1

[PATCH] D133586: [clang] initialize type qualifiers for FunctionNoProtoType

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133586#3787814 , @rmaz wrote: > I took a look at writing a test to cover this, but hit the following problem: > function qualifiers are only valid on c++ members, and there we cannot create > FunctionNoProtoTypes. I co

[PATCH] D134453: Introduce the `AlwaysIncludeTypeForNonTypeTemplateArgument` into printing policy

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/PrettyPrinter.h:307 + /// decltype(s) will be printed as "S" if enabled and as "S<{1,2}>" if disabled, + /// regardless if PrintCanonicalTypes is enabled. + unsigned AlwaysIncludeTypeForNonTypeTemplateAr

[PATCH] D134458: [AST] Add msvc-specific C++11 attributes

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Can you split this out into two separate reviews? That makes it easier for the reviewers so we don't mix up context as well as when we do code archeology for changes. (I also made some quick comments as I noticed things in the file, but I've not done a full review

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm on the fence about this... the attributes were added as optimization hints, but for somewhat interesting use cases. The obvious one of "I think this path is likely/unlikely and so I'll help the compiler figure it out" was one such use case, but honestly that's

[PATCH] D115169: Create a generic ABI document for _BitInt

2022-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D115169#3808463 , @gustedt wrote: >>> Also discussing consequences for `va_arg` functions such as `printf` would >>> be nice. >> >> Does the information in the `Passing and Returning an Object` section >> suffice, or ar

[PATCH] D133659: [Clang] P1169R4: static operator()

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:1037-1041 +def err_static_mutable_lambda : Error< + "lambda cannot be both mutable and static">; +def err_static_lambda_captures : Error< + "a static lambda cannot have any captur

[PATCH] D134461: [Clang] Warn when trying to deferencing void pointers in C

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:6922 def ext_typecheck_indirection_through_void_pointer : ExtWarn< - "ISO C++ does not allow indirection on operand of type %0">, + "ISO %select{C++|C}0 does not allow indirection

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ReleaseNotes.rst:279-280 ``%hd``. +- Reject type definitions in the ``type`` argument of ``__builtin_offsetof`` + according to `WG14 N2350 `_. -

[PATCH] D134416: Allow getting template args for ClassTemplateSpecializations

2022-09-23 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! I can fix up the minor nit with the release note formatting when I land on your behalf. Comment at: clang/docs/ReleaseNotes.rst:407-408 + ``clang_Cursor

[PATCH] D134416: Allow getting template args for ClassTemplateSpecializations

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe8c78d8528a6: Allow getting template args for ClassTemplateSpecializations (authored by anderslanglands, committed by aaron.ballman). Changed prior to commit: https://reviews.llvm.org/D134416?vs=462392

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133574#3811496 , @inclyc wrote: > Emm, is it necessary to add a `LangOpts` check so that this change only > applies to c2x? If clang was invoked without `-std=c2x`, should we just > accept `offsetof` with definitions?

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:1650 +def err_type_defined_in_offsetof : Error< + "%0 cannot be defined in '__builtin_offsetof'">; inclyc wrote: > aaron.ballman wrote: > > inclyc wrote: > > > aa

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134456#3810769 , @serge-sans-paille wrote: > Shouldn't this be a situation where `-Wmisexpect` shold / could trigger? If we're going to let PGO override what the user explicitly wrote in their code, we definitely shou

[PATCH] D134468: [Driver] Ignore -fmsc-version= -fms-compatibility-version= values smaller than 19

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: clang-vendors. aaron.ballman added a subscriber: andrew.w.kaylor. aaron.ballman added a comment. Adding clang-vendors for awareness as this has the potential to impact folks vending clang. In D134468#3811882 , @probinson w

[PATCH] D134453: Introduce the `AlwaysIncludeTypeForNonTypeTemplateArgument` into printing policy

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/PrettyPrinter.h:307 + /// decltype(s) will be printed as "S" if enabled and as "S<{1,2}>" if disabled, + /// regardless if PrintCanonicalTypes is enabled. + unsigned AlwaysIncludeTypeForNonTypeTemplateAr

[PATCH] D134550: [Clang] Make Clang driver suggest '-Xclang' for CC1 options passed to the driver

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This is a neat idea, but I think we should think about it carefully. In general, `-Xclang` is not something we want to actively recommend users use, so do we really want to make it easier for users to use? One potential problem that could be caused by this change

[PATCH] D133586: [clang] initialize type qualifiers for FunctionNoProtoType

2022-09-23 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 minor coding style nit, thank you! Comment at: clang/include/clang/AST/Type.h:3897-3898 + return Qualifiers::fromFastMask(FunctionTypeBit

[PATCH] D131465: C++/ObjC++: switch to gnu++17 as the default standard

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131465#3810070 , @hans wrote: >> If we're all using `clang` for the command, we'd all get the same behavior, >> right? There's no expectation that `clang` and `cl` behave the same way, >> that's what `clang-cl` is for.

[PATCH] D130131: [HLSL] CodeGen hlsl cbuffer/tbuffer.

2022-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: rjmccall, efriedma. aaron.ballman added a comment. No additional comments from me, but I don't feel comfortable signing off on the codegen bits; adding some codegen code owners. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

<    50   51   52   53   54   55   56   57   58   59   >