[PATCH] D124012: [Clang] Fix references to captured variables in dependant context.

2022-04-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaLambda.cpp:539-546 void Sema::buildLambdaScope(LambdaScopeInfo *LSI, CXXMethodDecl *CallOperator, SourceRange IntroducerRange, LambdaCaptureDefault Captu

[PATCH] D124004: Define __FLT_EVAL_METHOD__ when input source is stdin.

2022-04-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Frontend/FrontendAction.cpp:845-855 + if (Input.isFile() && Input.getFile() == "-") { +Preprocessor &PP = CI.getPreprocessor(); +std::string PredefineBuffer; +PredefineBuffer.reserve(4080); +llvm::raw_str

[PATCH] D123009: [Sema] Enum conversion warning when one signed and other unsigned.

2022-04-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. Thank you for working on this, and for your patience -- this review fell off my radar for a bit, sorry about that! I think there's an issue here to be solved, but I'm n

[PATCH] D123926: [clang] Add a raw_ostream operator<< overload for QualType

2022-04-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. Thanks for this! LGTM with some small nits. Comment at: clang/include/clang/AST/Type.h:1319 +llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const clang:

[PATCH] D123957: Update the developer policy to mention release notes

2022-04-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D123957#3459557 , @lattner wrote: > This is awesome, I agree completely we should curate release notes better. > That said, I think this should make it more clear that there is a "difference > in kind" between user-fac

[PATCH] D123957: Update the developer policy to mention release notes

2022-04-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 423683. aaron.ballman marked 3 inline comments as done. aaron.ballman added a comment. Updated based on review feedback. - Made it more clear that adding a release note is discretionary rather than mandatory - Clarified that bug fix release notes shoul

[PATCH] D124004: Define __FLT_EVAL_METHOD__ when input source is stdin.

2022-04-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Frontend/FrontendAction.cpp:845-855 + if (Input.isFile() && Input.getFile() == "-") { +Preprocessor &PP = CI.getPreprocessor(); +std::string PredefineBuffer; +PredefineBuffer.reserve(4080); +llvm::raw_str

[PATCH] D124012: [Clang] Fix references to captured variables in dependant context.

2022-04-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, but please wait a bit before landing so other reviewers have time to weigh in (should be fine to land tomorrow sometime if you don't hear back). Comment

[PATCH] D123958: [randstruct] Randomize all elements of a record

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D123958#3461020 , @void wrote: > In D123958#3459205 , @aaron.ballman > wrote: > >> I think you'll need a more targeted approach than assuming the only kinds of >> declarations i

[PATCH] D123783: [clang] Eliminate TypeProcessingState::trivial.

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:170 /// Whether we saved the attributes in the decl spec. bool hasSavedAttrs; mboehme wrote: > aaron.ballman wrote: > > mboehme wrote: > > > aaron.ballman wrote: > > > > Isn'

[PATCH] D124081: [clang] [draft] Reject non-declaration C++11 attributes on declarations.

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D124081#3461556 , @mboehme wrote: > I'd like to mark this patch as a draft so that Herald doesn't keep adding > reviewers -- but I'm not sure how? In that case, I usually set the permissions on the review explicitly so

[PATCH] D124081: [clang] [WIP] Reject non-declaration C++11 attributes on declarations.

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D124081#3461742 , @mboehme wrote: > In D124081#3461731 , @aaron.ballman > wrote: > >> In D124081#3461556 , @mboehme >> wrote: >> >>> I'

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 423895. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. Updated the diagnostic wording, putting it through precommit CI again to see if I missed any tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122983/new

[PATCH] D123682: [clang-tblgen] Automatically document options values

2022-04-20 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/D123682/new/ https://reviews.llvm.org/D123682 ___ cfe-commits mailing list cfe-comm

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 423902. aaron.ballman added a comment. Rebased to hopefully get precommit CI to test it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122983/new/ https://reviews.llvm.org/D122983 Files: clang-tools-extra/clangd/IncludeFixer.cpp clang-too

[PATCH] D123955: [C2x] Disallow functions without prototypes/functions with identifier lists

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 2 inline comments as done. aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:6664- +// OpenCL disallows variadic functions, so it also disallows a function +// without a prototype. However, it doesn't enforce strict pr

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 423912. aaron.ballman added a comment. Fixes some failing tests found by precommit CI. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122983/new/ https://reviews.llvm.org/D122983 Files: clang-tools-extra/clangd/IncludeFixer.cpp clang-tools

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:420-422 +def ext_implicit_function_decl_c99 : ExtWarn< + "implicit declaration of function %0 is invalid in C99 and later and " + "unsupported in C2x">, InGroup, DefaultError;

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-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 rG7d644e1215b3: [C11/C2x] Change the behavior of the implicit function declaration warning (authored by aaron.ballman). Herald added a project: Sanitiz

[PATCH] D123957: Update the developer policy to mention release notes

2022-04-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 rG009048ab314f: Update the developer policy to mention release notes (authored by aaron.ballman). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D123957: Update the developer policy to mention release notes

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you to everyone for the great feedback! In D123957#3459975 , @xbolva00 wrote: > Can you please add link to RFC to commit message? Good call, I added that when landing. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D123955: [C2x] Disallow functions without prototypes/functions with identifier lists

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 2 inline comments as done. aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:6667 +// have an identifier list. +HasProto = ParamInfo.size() || getLangOpts().requiresStrictPrototypes() || + getLangOpts().OpenC

[PATCH] D124054: [NFC] Avoid unnecessary duplication of code generating diagnostic.

2022-04-20 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/D124054/new/ https://reviews.llvm.org/D124054

[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

2022-04-20 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/D116203/new/ https://reviews.llvm.org/D116203

[PATCH] D123955: [C2x] Disallow functions without prototypes/functions with identifier lists

2022-04-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 rG9955f14aaf99: [C2x] Disallow functions without prototypes/functions with identifier lists (authored by aaron.ballman). Changed prior to commit: ht

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. FWIW, I changed the patch summary as a drive-by because I originally thought this was adding a global pragma named `atomic compare fail` and was very confused. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123235/new/ https://reviews.llvm.org/D123235 __

[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: MaskRay. aaron.ballman added a comment. In D123909#3461716 , @hokein wrote: > Hi, this patch seems to break the following code which was previously > compiled: > > #include > #include > #include > > templat

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D119136#3462570 , @MaskRay wrote: > Sorry but I've reverted this patch and all its fixups in > c79e6007edef4b0044be93c464dc806ac687 > and > 0f5d

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D119136#3462609 , @MaskRay wrote: > In D119136#3462579 , @aaron.ballman > wrote: > >> In D119136#3462570 , @MaskRay >> wrote: >> >>> So

[PATCH] D124033: [NFC] Adding a note about the macro __FLT_EVAL_METHOD__

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/UsersManual.rst:1610-1618 The macro ``__FLT_EVAL_METHOD__`` will expand to either the value set from the command line option ``ffp-eval-method`` or to the value from the target info -setting. The ``__FLT_EVAL_METHOD__`

[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D123909#3462791 , @rsmith wrote: > In D123909#3462560 , @aaron.ballman > wrote: > >> This looks like a true positive to me, at least for the moment (Core is >> still trying to d

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This seems like a case where we might want a configuration option (maybe). Some of the test cases where you silence the diagnostic look like places I would expect us to be able to use a (local) enumeration. e.g., void g(int x) { if (x != 0) { #define INS

[PATCH] D113804: [clang-tidy] Fix behavior of `modernize-use-using` with nested structs/unions

2022-04-20 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 nit. Comment at: clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp:39-48 + Finder->addMatcher( + tagDecl( + anyOf(allOf(

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122983#3463600 , @nemanjai wrote: > In D122983#3463569 , @xbolva00 > wrote: > >> But your link shows failures in compiler-rt/, not in llvm test-suite > > It shows both. But the

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122983#3464331 , @xbolva00 wrote: > You probably need to fix Makefiles as well. I believe there were similar > mysterious errors with -ffp-contract changes. Try to look at history of llvm > test-suite. > > cc @fhahn if

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122983#3464342 , @xbolva00 wrote: > https://github.com/llvm/llvm-test-suite/commit/79f2b03c5111392d647fa542e120f70c8f39a991 Awesome, parallel build systems to boot. I'll make that change at the same time as setting CFL

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122983#3464347 , @aaron.ballman wrote: > In D122983#3464342 , @xbolva00 > wrote: > >> https://github.com/llvm/llvm-test-suite/commit/79f2b03c5111392d647fa542e120f70c8f39a991 >

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122983#3464724 , @Jake-Egan wrote: > Hi, we also have a failure on AIX with test-suite `call to undeclared library > function '%0' with type %1; ISO C99 and later` > https://lab.llvm.org/buildbot/#/builders/214/builds

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122983#3465052 , @daltenty wrote: > In D122983#3464759 , @aaron.ballman > wrote: > >> In D122983#3464724 , @Jake-Egan >> wrote: >> >>>

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122983#3465099 , @nemanjai wrote: > @daltenty Can you please run this with the same config as the bot on one of > our AIX machines but be sure to pass `-i` if it's `make` or `-k 0` if it's > `ninja`? That would be *aw

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you @nemanjai and @Jake-Egan for the help, I really appreciate it! I've disabled the diagnostics from another test (it looks like I caught the other ones earlier today), so hopefully the bot goes back to green shortly. If not, I'll keep on it. :-) Reposito

[PATCH] D114439: [Annotation] Allow parameter pack expansions and initializer lists in annotate attribute

2022-02-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think this is heading in the right direction! I've got a few more comments and questions though. Comment at: clang/include/clang/Basic/Attr.td:545 + // Set to true if this attribute accepts parameter pack expansion expressions. + bit Accepts

[PATCH] D114439: [Annotation] Allow parameter pack expansions and initializer lists in annotate attribute

2022-02-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:4203 + if (AllArgs.size() && AllArgs[0]->isValueDependent()) { +auto *Attr = AnnotateAttr::CreateWithDelayedArgs( +S.getASTContext(), AllArgs.data(), AllArgs.size(), AL); ---

[PATCH] D114439: [Annotation] Allow parameter pack expansions and initializer lists in annotate attribute

2022-02-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Sema/ParsedAttr.h:52-57 + /// The number of non-fake arguments specified in the attribute definition. + unsigned NumArgMembers : 4; /// True if the parsing does not match the semantic content. unsigned H

[PATCH] D118350: [Clang][Sema][AIX][PowerPC] Emit byval alignment warning only when struct member is passed to a function

2022-02-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:5212-5215 + const Expr *AArg = Arg->IgnoreParens(); + if (const auto *ICE = dyn_cast(AArg)) { +AArg = ICE->getSubExpr(); +if (const auto *ME = dyn_cast(AArg)) { I don't see

[PATCH] D117390: [AST] Reformat CastExpr unittest suite

2022-02-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In D117390#3290715 , @kimgr wrote: > @aaron.ballman Thanks! Please use Kim Gräsman and kim.grasman at gmail.com. You're welcome. I've pushed on your behalf in d7ddad408f5b64df39a39f4af3a

[PATCH] D118104: Make run-clang-tidy.py print the configured checks correctly

2022-02-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. In D118104#3297315 , @LegalizeAdulthood wrote: > In D118104#3296467 , > @salman-javed-nz wrot

[PATCH] D117391: [AST] Ignore implicit nodes in CastExpr::getConversionFunction

2022-02-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D117391#3299483 , @kimgr wrote: > I have now convinced myself that including `FullExpr` in > `skipImplicitTemporary` gives an improvement in `consteval` diagnostics. But > I'm still not sure why. Motivating example, der

[PATCH] D117091: [Clang] Add attributes alloc_size and alloc_align to mm_malloc

2022-02-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. The header bits LGTM aside from a nit I found with potential identifier conflicts. I don't feel super qualified to review the behavioral aspects of the change, but if others are happy with that, I'm happy with the header change

[PATCH] D117898: [Clang] Add elementwise saturated add/sub builtins

2022-02-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. Aside from some nits, this LGTM. Comment at: clang/docs/LanguageExtensions.rst:549 + T __builtin_elementwise_add_sat(T x, T y) return the sum of x and y, clampe

[PATCH] D117898: [Clang] Add elementwise saturated add/sub builtins

2022-02-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/LanguageExtensions.rst:549 + T __builtin_elementwise_add_sat(T x, T y) return the sum of x and y, clamped to the range of signed or integer types + values representable by t

[PATCH] D119045: Fix address space for function types with AS qualifier

2022-02-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. LGTM aside from some nits Comment at: clang/lib/AST/ASTContext.cpp:11962-11963 unsigned ASTContext::getTargetAddressSpace(QualType T) const { - return T->isFu

[PATCH] D119225: [clang] Add core papers adopted at the february plenary.

2022-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/www/cxx_status.html:1394 + https://wg21.link/P2173R1";>P2173R1 + No + We support this one. I implemented it in https://github.com/llvm/llvm-project/commit/b2bc0a32545f9b066fed1631c6fba92a2a5a6d

[PATCH] D119224: [clang][tests] Add a testcase for C++ DR2406

2022-02-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, thank you for spotting this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119224/new/ https://reviews.llvm.org/D119224 ___

[PATCH] D119230: [clang] Add test for C++ DR2390

2022-02-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, thank you for this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119230/new/ https://reviews.llvm.org/D119230

[PATCH] D118104: Make run-clang-tidy.py print the configured checks correctly

2022-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D118104#3303665 , @JesApp wrote: > Thanks for accepting. Do I need to do anything to get this merged or is this > basically done? Oops, sorry for failing to ask if you needed this committed on your behalf. :-) What nam

[PATCH] D118804: Revert "[Clang] Propagate guaranteed alignment for malloc and others"

2022-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D118804#3303004 , @jyknight wrote: > In D118804#3302675 , @rsmith wrote: > >> I support this revert. > > Having received enough support, I'll go ahead and commit, and then propose

[PATCH] D118350: [Clang][Sema][AIX][PowerPC] Emit byval alignment warning only when struct member is passed to a function

2022-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Sema/aix-attr-align.c:34-35 + baz(s.a); // no-warning + baz(s.b); // expected-warning {{requesting an alignment of 16 bytes or greater for struct members is not binary compatible with IBM XL C/C++ for AIX 16.1.0 and

[PATCH] D117391: [AST] Ignore implicit nodes in CastExpr::getConversionFunction

2022-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D117391#3301696 , @kimgr wrote: > @aaron.ballman Thanks for the valuable feedback! > >> Assuming that the `to_lvalue_ref(A{})` case should diagnose, then yes, I >> agree, I think the `ret_a()` portion should as well. > >

[PATCH] D118804: Revert "[Clang] Propagate guaranteed alignment for malloc and others"

2022-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D118804#3304261 , @urnathan wrote: > While C2X has blessed such smaller alignments, the x86_64 ABI (in > particular), has not. However, using that ABI to justify 'It. Is. 16. > Bytes.', is really an exercise in reality

[PATCH] D118104: Make run-clang-tidy.py print the configured checks correctly

2022-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit on your behalf in 0851970af5771f6721c29d066c88a72db823ba83 , thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118104/new/ https:/

[PATCH] D118383: [OpenMP] Enable inoutset dependency-type in depend clause.

2022-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit on your behalf in 0a7cc078ac2be36beb605f08d98ee70065352c7b , thank you! I think it's entirely appropriate for you to obtain commit privileges (http

[PATCH] D119225: [clang] Add core papers adopted at the february plenary.

2022-02-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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119225/new/ https://reviews.llvm.org/D119225

[PATCH] D119225: [clang] Add core papers adopted at the february plenary.

2022-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit on your behalf in 3c17f3955c8b18da658ccb2fafde0759210b3f17 , thanks for the update! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D118804: Revert "[Clang] Propagate guaranteed alignment for malloc and others"

2022-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D118804#3304337 , @urnathan wrote: > In D118804#3304280 , @aaron.ballman > wrote: > >> In D118804#3304261 , @urnathan >> wrote: >> >>>

[PATCH] D118350: [Clang][Sema][AIX][PowerPC] Emit byval alignment warning only when struct member is passed to a function

2022-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks! I think we're pretty close, just some wording nits with the diagnostics. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3299-3301 +: Warning<" %0 byte requested alignment for a struct member used as an" + " a

[PATCH] D114439: [Annotation] Allow parameter pack expansions and initializer lists in annotate attribute

2022-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I still have some naming issues that need to be corrected, but functionally I think this is good to go. I presume you don't have commit privileges @steffenlarsen? If that's accurate, what name and email address would you like me to use for patch attribution after

[PATCH] D118350: [Clang][Sema][AIX][PowerPC] Emit byval alignment warning only when struct member is passed to a function

2022-02-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, thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118350/new/ https://reviews.llvm.org/D118350 _

[PATCH] D117994: [Clang] Implement multidimentional subscript operator

2022-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks! I've commit on your behalf in c1512250960bd247519a9f959ad4af202402dcc4 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D114439: [Annotation] Allow parameter pack expansions and initializer lists in annotate attribute

2022-02-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! Thank you for all the good discussion and work on this! I'll commit on your behalf once the precommit CI pipeline comes back green. CHANGES SINCE LAST ACTION https://rev

[PATCH] D114439: [Annotation] Allow parameter pack expansions and initializer lists in annotate attribute

2022-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit on your behalf in ead1690d31f815c00fdd2bc23db4766191bbeabc , thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114439/new/ https:/

[PATCH] D118052: [X86] Fix CodeGen Module Flag for -mibt-seal

2022-02-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added subscribers: cfe-commits, aaron.ballman. aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added a comment. In D118052#3273241 , @gftg wrote: > Thanks, João, that's exactly what I needed. For the record, the use of > `-DLLV

[PATCH] D119296: KCFI sanitizer

2022-02-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:695 +def KCFIUnchecked : Attr { + let Spellings = [Clang<"kcfi_unchecked">]; Is there a reason the attribute isn't inheritable? e.g., ``` [[clang::kcfi_unchecked]] extern int i;

[PATCH] D116635: Add warning to detect when calls passing arguments are made to functions without prototypes.

2022-02-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:5529 +def warn_call_function_without_prototype : Warning< + "calling function %0 with arguments when function has no prototype">, InGroup< + DiagGroup<"strict-calls-without-protot

[PATCH] D118850: [PS4] Make __BIGGEST_ALIGNMENT__ 32bytes

2022-02-09 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 as far as the changes go (I can't speak to how appropriate the changes are for the PS4 target). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D118520: [clang-tidy] Output currently processing check and nodes on crash

2022-02-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:349-352 + // This should be an assert, but asserts shouldn't be used in signal + // handlers + if (!CurContext) +return; ---

[PATCH] D119362: [NFC] Make file offsets a regex to handle CRLF

2022-02-09 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 think this NFC change is reasonable. We do lose a bit of JSON dumping test coverage from it (I don't see any tests for the offset there now), but I am okay with that as I don't

[PATCH] D119405: [Clang][Sema] Use C++ standard terminology in clang diagnostics.

2022-02-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. Thank you for the patch! I don't think this is an improvement; the diagnostic text goes from being correct in C but odd in C++ to being correct in C++ but odd in C (the

[PATCH] D110485: Support [[no_unique_address]] for all targets.

2022-02-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D110485#3308878 , @mstorsjo wrote: > In D110485#3308854 , @mstorsjo > wrote: > >> To pick up the thread here again, `[[no_unique_address]]` is done and >> settled in MSVC, with

[PATCH] D119405: [Clang][Sema] Use C++ standard terminology in clang diagnostics.

2022-02-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D119405#3310711 , @junaire wrote: > In D119405#3310695 , @aaron.ballman > wrote: > >> Thank you for the patch! >> >> I don't think this is an improvement; the diagnostic text goe

[PATCH] D113393: [c++2b] Implement P0849R8 auto(x)

2022-02-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2396 +def ext_decltype_auto_expr : ExtWarn< + "ISO C++23 DIS does not allow functional-style cast to 'decltype(auto)'">, + InGroup>; Is there a reason this one sho

[PATCH] D113622: [analyzer] support ignoring use-after-free checking with reference_counted attribute

2022-02-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D113622#3193319 , @chrisdangelo wrote: > Hi @aaron.ballman, > > It's nice to meet you, virtually. Nice to meet you as well, and I'm very sorry that this review took so long for me to get to. It fell off my radar for a

[PATCH] D113499: [clang-tidy] Reduce false positives for `bugprone-infinite-loop` with dependent expressions

2022-02-10 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. Sorry about the delay in getting this reviewed, but it generally LGTM. Can you also add a release note about the fix? (I'm accepting the review and you can feel free to land with

[PATCH] D117348: [Preprocessor] Reduce the memory overhead of `#define` directives

2022-02-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. Thanks, this LGTM as well! I don't think the precommit CI pipeline failures are related from what I can tell. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117348/new/ https://reviews.llvm.org/D117348 ___

[PATCH] D119525: [clang] Fix crash when array size is missing in initializer

2022-02-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D119525#3313554 , @tbaeder wrote: > This is a pretty big gotcha at best and I feel like `getArraySize()` should > return `None` in that case instead... thoughts? I think it is a gotcha -- some places protect against a n

[PATCH] D119528: [Clang][Sema] Add a missing regression test about Wliteral-range

2022-02-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Sema/warn-literal-range.c:25 + +double d5 = 0x0.42p+4200; // expected-warning {{magnitude of floating-point constant too large for type 'double'; maximum is 1.7976931348623157E+308}} I think we should p

[PATCH] D119221: [clang][lexer] Allow u8 character literal prefixes in C2x

2022-02-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: tahonermann. aaron.ballman added a comment. Can you also add a release note for the new feature, and update the `clang/www/c_status.html` page as well? Comment at: clang/test/Lexer/utf8-char-literal.cpp:23 +char f = u8'ab';// expecte

[PATCH] D112916: Confusable identifiers detection

2022-02-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: tahonermann, cor3ntin. aaron.ballman added a comment. Personally, I'm uncomfortable with this check because it's not really covering homoglyphs in general, it's covering homoglyphs outside of the usual Latin character set. For example, there's no attempt to catch o

[PATCH] D119525: [clang] Fix crash when array size is missing in initializer

2022-02-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. LGTM aside from some minor nits. Can you also add a release note for the change? Comment at: clang/include/clang/AST/ExprCXX.h:2271 + +if (auto Result = +

[PATCH] D119664: Check for the overloadable attribute in all the appropriate syntactic locations

2022-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: erichkeane, cor3ntin, rsmith. aaron.ballman requested review of this revision. Herald added a project: clang. When forming the function type from a declarator, we look for an overloadable attribute before issuing a diagnostic in

[PATCH] D119707: [C2x] Implement WG14 N2764 the [[noreturn]] attribute

2022-02-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: erichkeane, jyknight, rsmith. aaron.ballman requested review of this revision. Herald added a project: clang. This adds support for http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2764.pdf, which was adopted at the Feb 2022 WG1

[PATCH] D119664: Check for the overloadable attribute in all the appropriate syntactic locations

2022-02-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks! I've commit in 76032b0e3f58d4abe8d00ac61ff1b2044e076ba7 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D119528: [Clang][Sema] Add a missing regression test about Wliteral-range

2022-02-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D119528#3316311 , @junaire wrote: >> I think we should probably have test coverage for `long double` as well, but >> I also wonder whether it makes sense to add coverage for the small >> floating-point types (like `_Flo

[PATCH] D119707: [C2x] Implement WG14 N2764 the [[noreturn]] attribute

2022-02-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks for the quick review. I've landed in 5029dce492b3cf3ac191eda0b5bf268c3acac2e0 , but if anyone has post commit review comments (I landed this pretty quic

[PATCH] D119707: [C2x] Implement WG14 N2764 the [[noreturn]] attribute

2022-02-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Headers/stdnoreturn.h:19 +/* The noreturn macro is deprecated in C2x. */ +#pragma clang deprecated(noreturn) + jyknight wrote: > Is this actually useful? Isn't it sufficient to have the include-time warni

[PATCH] D119707: [C2x] Implement WG14 N2764 the [[noreturn]] attribute

2022-02-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Headers/stdnoreturn.h:19 +/* The noreturn macro is deprecated in C2x. */ +#pragma clang deprecated(noreturn) + aaron.ballman wrote: > jyknight wrote: > > Is this actually useful? Isn't it sufficient to ha

[PATCH] D119477: Ignore FullExpr when traversing cast sub-expressions

2022-02-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I haven't had the chance to review this yet (in C standards meetings again this week), but I did notice that https://reviews.llvm.org/D119095 seems to be touching on a related (or possibly the same) issue. Can you coordinate with the other patch author to make sur

[PATCH] D119095: [clang] Fix redundant functional cast in ConstantExpr

2022-02-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I haven't had the chance to review this yet (in C standards meetings again this week), but I did notice that https://reviews.llvm.org/D119477 seems to be touching on a related (or possibly the same) issue. Can you coordinate with the other patch author to make sur

[PATCH] D119528: [Clang][Sema] Add a missing regression test about Wliteral-range

2022-02-14 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 for the additional test coverage! Do you need me to commit on your behalf? If so, what name and email address would you like me to use for patch attribution? Re

[PATCH] D119525: [clang] Fix crash when array size is missing in initializer

2022-02-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D119525#3317623 , @tbaeder wrote: > In D119525#3314383 , @aaron.ballman > wrote: > >> Can you also add a release note for the change? > > Would this go in the "libclang" section

<    28   29   30   31   32   33   34   35   36   37   >