[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:47 +CRLF, +CRLFCR, + }; LegalizeAdulthood wrote: > aaron.ballman wrote: > > LegalizeAdulthood wrote: > > > aaron.ballman wrote: > > > > LegalizeA

[PATCH] D122378: Be more explicit about -fvisibility= documentation

2022-03-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks for the additional docs! Comment at: clang/docs/ClangCommandLineReference.rst:2616 -.. option:: -fvisibility= +.. option:: -fvisibility=[default|hidden] From looking at Options.td, it seems there are more visibility val

[PATCH] D122378: Be more explicit about -fvisibility= documentation

2022-03-24 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. Btw, you're changing a generated .rst file. You need to fix up the documentation in Options.td which is used to generate this .rst file. I don't know that you'll be abl

[PATCH] D122341: Fix a crash with variably-modified parameter types in a naked function

2022-03-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 417928. aaron.ballman added a comment. Updated the tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122341/new/ https://reviews.llvm.org/D122341 Files: clang/docs/ReleaseNotes.rst clang/lib/CodeGen/CodeGenFunction.cpp clang/test/Code

[PATCH] D122341: Fix a crash with variably-modified parameter types in a naked function

2022-03-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122341#3405269 , @erichkeane wrote: > In D122341#3405008 , @aaron.ballman > wrote: > >> In D122341#3403587 , @erichkeane >> wrote: >>

[PATCH] D122341: Fix a crash with variably-modified parameter types in a naked function

2022-03-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks for the reviews! I've commit in 488c772920566354075f7933eedbe4358c128bd2 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122341/new/ https://re

[PATCH] D122248: [clang][CodeGen]Fix clang crash and add bitfield support in __builtin_dump_struct

2022-03-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122248#3405644 , @yihanaa wrote: > In D122248#3405166 , @erichkeane > wrote: > >> In D122248#3405062 , >> @aaron.ballman wrote: >> >>>

[PATCH] D122248: [clang][CodeGen]Fix clang crash and add bitfield support in __builtin_dump_struct

2022-03-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM aside from a tiny nit with one of the release notes. Comment at: clang/docs/ReleaseNotes.rst:140-144 +- Improve __builtin_dump_struct: + + - Support bitfields in struct and union. + + - Improve the du

[PATCH] D121328: Disable -Wmissing-prototypes for internal linkage functions that aren't explicitly marked "static"""

2022-03-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. In D121328#3406017 , @dblaikie wrote: > @aaron.ballman wouldn't mind your take on this to see if this seems > sufficiently robust, tested, etc. (should I move the isExternallyVisible >

[PATCH] D122248: [clang][CodeGen]Fix clang crash and add bitfield support in __builtin_dump_struct

2022-03-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for the fix and the improvements here, @yihanaa! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122248/new/ https://reviews.llvm.org/D122248 ___ cfe-commits mailin

[PATCH] D122423: [Clang][doc] Fix __builtin_assume wording.

2022-03-24 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, a second time. :-D Sorry for missing that the first time. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122423/new/ https://

[PATCH] D120185: [ASTMatchers] Output currently processing match and nodes on crash

2022-03-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D120185#3406765 , @njames93 wrote: > In D120185#3405091 , @aaron.ballman > wrote: > >> @thakis -- is it possible your build bot is configured to disable generation >> of crash d

[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2022-03-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D54943#3407789 , @JonasToth wrote: >> Sorry, for my own sanity, I've stopped reviewing C++ Core Guideline reviews >> for their diagnostic behavior until the guideline authors put effort into >> specifying realistic enfor

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-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. Thanks for the discussion on this new check, it LGTM! Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:47 +CRLF, +CRLFCR, + }; -

[PATCH] D122078: [clang-tidy] Ignore concepts in `misc-redundant-expression`

2022-03-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: alexfh, sammccall. aaron.ballman added subscribers: sammccall, alexfh. aaron.ballman added a comment. Thanks for the fix, can you also add a release note for it? I'm a bit worried about using `hasAncestor()` for this; that has a tendency to do surprising things in

[PATCH] D122155: Add warning when eval-method is set in the presence of value unsafe floating-point calculations.

2022-03-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticFrontendKinds.td:50-53 +def warn_eval_method_setting_via_option_in_value_unsafe_context : Warning< +"setting the eval method via '-ffp-eval-method' has not effect when numeric " +"result

[PATCH] D122078: [clang-tidy] Ignore concepts in `misc-redundant-expression`

2022-03-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. In D122078#3407981 , @sammccall wrote: > I don't actually know a great deal about matcher performance :-( I wish I did. > I think this is

[PATCH] D120589: [Clang] Implement decltype(auto)(x) from P0849R2

2022-03-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: rsmith, clang-language-wg. aaron.ballman added a comment. Herald added a project: All. I'm adding more reviewers for a wider audience on this topic. Personally, I don't think we should support this extension. EWG voted pretty strongly against it: 0/3/7/6/1 (https:

[PATCH] D121532: [Clang] Fix Unevaluated Lambdas

2022-03-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think this is a sufficient stopgap measure to keep clang from crashing, and I appreciate the FIXME comment. Should the cxx_status page also be updated, or is P0315R4 still partial (and if it is, can we add information to the status page about what's partial if y

[PATCH] D120185: [ASTMatchers] Output currently processing match and nodes on crash

2022-03-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D120185#3408258 , @thakis wrote: > That bot sets ENABLE_BACKTRACES=1. > > It seems to work for clang-cl (foo.cc contains `#pragma clang __debug > parser_crash`): > > >out\gn\bin\clang-cl /c foo.cc > PLEASE submit a b

[PATCH] D121532: [Clang] Fix Unevaluated Lambdas

2022-03-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision as: aaron.ballman. 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/D121532/new/ https://reviews.llvm.org/D121532 __

[PATCH] D122496: [C11] Correct the resulting type for an assignment expression

2022-03-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: eli.friedman, jyknight, erichkeane, clang-language-wg. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. In C, assignment expressions result in an rvalue whose type is th

[PATCH] D122496: [C11] Correct the resulting type for an assignment expression

2022-03-26 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/Sema/SemaExpr.cpp:13647 // operand. - return (getLangOpts().CPlusPlus - ? LHSType : LHSType.getUnqualifiedType()); + return getLangOpts().CPlusPlus ? LHSType :

[PATCH] D122496: [C11] Correct the resulting type for an assignment expression

2022-03-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. Thanks for the reviews, I've commit in bfa2f25d350c1015b74b8a14684e68efa6500bbc . Repository: rG LLVM Github

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt; increase max _BitInt size

2022-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8422 +def err_int_to_float_bit_int_max_size : Error< + "cannot convert '_BitInt' operands of more than %0 bits to floating point">; mgehre-amd wrote: > aaron.ball

[PATCH] D122544: Utilize comparison operation implemented in APInt

2022-03-28 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! Can you also add a release note for the fix? I'm happy to land this on your behalf if you'd prefer, but given that you've had several quality commits already, you might wan

[PATCH] D122586: Fix template instantiation of UDLs

2022-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: erichkeane, rsmith, clang-language-wg. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. Previously, we would instantiate the UDL by marking the function as referenced an

[PATCH] D122586: Fix template instantiation of UDLs

2022-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:10516 TreeTransform::TransformUserDefinedLiteral(UserDefinedLiteral *E) { - if (FunctionDecl *FD = E->getDirectCallee()) -SemaRef.MarkFunctionReferenced(E->getBeginLoc(), FD); - return SemaRef.

[PATCH] D122586: Fix template instantiation of UDLs

2022-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 418650. aaron.ballman marked 3 inline comments as done. aaron.ballman added a comment. Update based on review feedback CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122586/new/ https://reviews.llvm.org/D122586 Files: clang/docs/ReleaseNotes

[PATCH] D122586: Fix template instantiation of UDLs

2022-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks for the reviews! I've commit in ca844ab01c3f9410ceca967c09f809400950beae . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122586/new/ https://re

[PATCH] D122378: [doc] Rely on tblgen to dump supported options value when generating doc

2022-03-28 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! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122378/new/ https://reviews.llvm.org/D122378 ___ cfe

[PATCH] D122608: Fix behavior of ifuncs with 'used' extern "C" static functions

2022-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: rjmccall. aaron.ballman added a subscriber: rjmccall. aaron.ballman added a comment. CodeGen is not my wheelhouse, so I've added @rjmccall in case he spots something I've missed. This seems reasonable to me though. Comment at: clang/lib/CodeGen/

[PATCH] D122155: Add warning when eval-method is set in the presence of value unsafe floating-point calculations.

2022-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticFrontendKinds.td:52-53 +def err_incompatible_fp_eval_method_options : Error< +"option 'ffp-eval-method' cannot be used with" +" %select{option 'fapprox-func'|option 'mreassociate'|option

[PATCH] D122529: [ASTMatchers] Output currently matching node on crash

2022-03-28 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/D122529/new/ https://reviews.llvm.org/D122529

[PATCH] D120956: [clang][AST matchers] new AST matcher argumentCountAsWrittenIs(n) that checks the actual number of arguments given in a function call

2022-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In addition to tests, please also add a release note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120956/new/ https://reviews.llvm.org/D120956 ___ cfe-commits mailing lis

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Can you also add a release note for the changes? Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:7800 + attr::Kind, AttrKind) { + return llvm::any_of(Node.getAttrs(), + [&](const Attr *A) {

[PATCH] D122544: Utilize comparison operation implemented in APInt

2022-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122544#3412568 , @SimplyDanny wrote: > In D122544#3411226 , @aaron.ballman > wrote: > >> LGTM! Can you also add a release note for the fix? >> >> I'm happy to land this on your

[PATCH] D122535: [clang-tidy] Never consider assignments as equivalent in `misc-redundant-expression` check

2022-03-28 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; can you add a release note when you land? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122535/new/ https://reviews.llvm.org

[PATCH] D122544: Utilize comparison operation implemented in APInt

2022-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-sizeof-expression.cpp:175 // CHECK-MESSAGES: :[[@LINE-1]]:28: warning: suspicious usage of sizeof pointer 'sizeof(T)/sizeof(T)' -int Test3() { return Foo<42>() + Bar(); } +temp

[PATCH] D122656: [C11] Improve the diagnostic when accessing a member of an atomic struct

2022-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: eli.friedman, rjmccall, jyknight, erichkeane, clang-language-wg. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. Member access for an atomic structure or union is uncon

[PATCH] D122656: [C11] Improve the diagnostic when accessing a member of an atomic struct

2022-03-29 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/Sema/SemaExprMember.cpp:1300 + // warning defaults to an error. + if (const auto *ATy = BaseType->getAs()) { +S.Diag(OpLoc, diag::warn_atomic_member_access); -

[PATCH] D122656: [C11] Improve the diagnostic when accessing a member of an atomic struct

2022-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 418884. aaron.ballman marked 2 inline comments as done. aaron.ballman added a comment. Added test cases based on review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122656/new/ https://reviews.llvm.org/D122656 Files: clang/docs/R

[PATCH] D122544: Utilize comparison operation implemented in APInt

2022-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-sizeof-expression.cpp:175 // CHECK-MESSAGES: :[[@LINE-1]]:28: warning: suspicious usage of sizeof pointer 'sizeof(T)/sizeof(T)' -int Test3() { return Foo<42>() + Bar(); } +temp

[PATCH] D122656: [C11] Improve the diagnostic when accessing a member of an atomic struct

2022-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks for the review, I've commit in 3c84e4a0dbd08fc03bbcdd8354a984e0efcf7672 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122656/new/ https://revi

[PATCH] D122681: Don't diagnostic atomic object access as UB in an unevaluated context

2022-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: jyknight, erichkeane, clang-language-wg. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. We started diagnosing this situation with a more clear diagnostic message, but

[PATCH] D122681: Don't diagnostic atomic object access as UB in an unevaluated context

2022-03-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122681#3414900 , @erichkeane wrote: > Ah! Release notes! I didn't add one because this is augmenting https://reviews.llvm.org/D122656 which already added the release note. :-) Repository: rG LLVM Github Monorepo

[PATCH] D122681: Don't diagnostic atomic object access as UB in an unevaluated context

2022-03-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thank you for the reviews, I've commit in cf4a67bcbbb109347b1e2d6cedf69bae142a182f . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D122627: [HLSL] Fix MSFT Attribute parsing, add numthreads

2022-03-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaHLSL/num_threads.hlsl:48 +#endif + + There are a few test cases that are missing here: 1) Writing the attribute on the wrong subject. 2) Passing no args to the attribute, passing too many args to th

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-03-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. You should also add parsing test coverage as this is parsing new syntax. Comment at: clang/include/clang/Basic/AttrDocs.td:6386 + let Content = [{ +The `SV_GroupIndex` semantic when applied to an input parameter specifies a data +binding to map

[PATCH] D122659: [clang][preprocessor] Allow calling DumpToken() on annotation tokens

2022-03-30 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 don't think there's a particularly strong need to add test coverage for this as the dump method is a debugging aid. CHANGES SINCE LAST ACTION https://reviews.llvm.org/

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

2022-03-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. FWIW, now that https://discourse.llvm.org/t/rfc-enabling-wstrict-prototypes-by-default-in-c has reached a conclusion, I think this patch may be worth resurrecting, if you're interested. https://discourse.llvm.org/t/rfc-enabling-wstrict-prototypes-by-default-in-c/

[PATCH] D122249: [Clang] Add a compatibiliy warning for non-literals in constexpr.

2022-03-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM Comment at: clang/lib/Sema/SemaDeclCXX.cpp:1905 +if (SemaRef.LangOpts.CPlusPlus2b) { + if (!VD->getType()->isLiteralType(SemaRef.Context)) +SemaRef.Diag(VD->getLocation(), ---

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D120949#3417545 , @ajohnson-uoregon wrote: > Okay, I put the assert back in and made a thing similar to HasSizeMatcher > that works and all the tests pass. > > What do you mean by a release note, in the commit message,

[PATCH] D122627: [HLSL] Fix MSFT Attribute parsing, add numthreads

2022-03-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122627#3417495 , @beanz wrote: > @aaron.ballman I pushed updates in rGff6696c842ba > . > > The one bit we discussed that I didn't do anything for is t

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-03-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:6965-6966 // Parse GNU attributes, if present. MaybeParseGNUAttributes(ParmDeclarator); +MaybeParseHLSLSemantics(DS.getAttributes()); beanz wrote: > aaron.ballman wrote

[PATCH] D122627: [HLSL] Fix MSFT Attribute parsing, add numthreads

2022-03-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122627#3417919 , @beanz wrote: > In D122627#3417557 , @aaron.ballman > wrote: > >> Are you sure that's what you want? This returns true for a static C++ member >> function, fal

[PATCH] D120952: [clang][AST matchers] adding submatchers under cudaKernelCallExpr to match kernel launch config

2022-03-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks! This is missing test coverage for the new matcher, and you should also add a release note for it. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:7837-7839 + if (const CallExpr *Config = Node.getConfig()) { +return InnerMat

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-03-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Generally I think things are looking pretty good, but there's still an open question and Precommit CI is still failing on Windows: Failed Tests (7): Clang-Unit :: AST/./ASTTests.exe/StructureLayoutRandomization.AnonymousStructsAndUnionsRetainFieldOrder C

[PATCH] D122104: [X86][regcall] Support passing / returning structures

2022-03-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:3992 --FreeIntRegs; + else if (NeededSSE && MaxVectorWidth > 0) +FI.setMaxVectorWidth(MaxVectorWidth); erichkeane wrote: > erichkeane wrote: > > This line here accesses Ne

[PATCH] D122608: Fix behavior of ifuncs with 'used' extern "C" static functions

2022-03-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. FWIW, I'm seeing a precommit CI failure on Windows: Failed Tests (1): Clang :: SemaCXX/externc-ifunc-resolver.cpp May as well also fix up the clang-format issues in the review. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:6319 +bool Cod

[PATCH] D122822: [Clang][CodeGen]Add constant array support for __builtin_dump_sturct

2022-03-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122822#3420162 , @rsmith wrote: > I'm also concerned that this builtin is making a lot of design decisions on > behalf of the programmer, meaning that either it does exactly what you want > or it's not suitable for you

[PATCH] D122871: Clang-Formatting

2022-04-01 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. I'm confused -- the issue you linked is for a bug with clang-format but the changes in your patch don't modify clang-format, just modifies a test file to be formatted.

[PATCH] D122871: Clang-Formatting

2022-04-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122871#3422061 , @ps-19 wrote: > okay now i understand the issue completely. > If i just mentioned that i am formatting a test file it would be correct then > according to my patch. We don't typically reformat whole fi

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-04-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: jyknight, eli.friedman, hubert.reinterpretcast, erichkeane, clang-language-wg. Herald added a subscriber: jdoerfert. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. Fun

[PATCH] D122529: [ASTMatchers] Output currently matching node on crash

2022-04-01 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 good? to me. :-) Despite this complicating things by a fair amount, I don't have a better suggestion to offer. LGTM Comment at: clang/lib/A

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-04-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 419734. aaron.ballman added a comment. Rebased, no changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122895/new/ https://reviews.llvm.org/D122895 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticGroups.td clan

[PATCH] D122874: [clang] Add GNU spelling for no_unqiue_address attribute

2022-04-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm not opposed, but this does muddy the waters about the target-specific nature of the attribute. Currently, the semantic attribute cannot be used outside of Itanium ABI targets, so it doesn't work on Windows (and we don't want it to -- Microsoft hasn't picked th

[PATCH] D122808: [clang] Fix warnings when `-Wdeprecated-enum-enum-conversion` is enabled

2022-04-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The changes here look correct to me, but they complicate the code a reasonable amount. I almost wonder whether we want to add a helper function (perhaps even to STLExtras.h?) along the lines of a cleaned up version of: template auto addEnumValues(EnumTy1 LHS,

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-04-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. General question about the new syntax -- how does this work on field declarations of a record? e.g., struct S { int i : SV_GroupIndex; }; (Please tell me the answer is: it doesn't, because bit-fields are a thing.) Similar question applies to other places

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-04-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked an inline comment as done. aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:5566-5567 +def warn_non_prototype_changes_behavior : Warning< + "this function declaration without a prototype is deprecated in all v

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-04-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 3 inline comments as done. aaron.ballman added inline comments. Comment at: clang/test/CodeGen/2009-06-01-addrofknr.c:8 -static int func(f) +static int func(f) // expected-warning {{this function declaration without a prototype is deprecated in all version

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-04-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 419844. aaron.ballman marked 5 inline comments as done. aaron.ballman added a comment. Updating based on review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122895/new/ https://reviews.llvm.org/D122895 Files: clang/docs/ReleaseNo

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-04-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/CodeGen/2009-06-01-addrofknr.c:8 -static int func(f) +static int func(f) // expected-warning {{this function declaration without a prototype is deprecated in all versions of C and changes behavior in C2x}} void *f;

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-04-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 419853. aaron.ballman added a comment. Fix failing test case caught by precommit CI. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122895/new/ https://reviews.llvm.org/D122895 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/D

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

2022-04-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: jyknight, eli.friedman, rjmccall, erichkeane, clang-language-wg. Herald added subscribers: usaxena95, pengfei, kadircet, arphaman. Herald added a project: All. aaron.ballman requested review of this revision. Herald added projects

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

2022-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 420138. aaron.ballman added a comment. Fix clang-tools-extra test caught 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-to

[PATCH] D122965: Corrected A Command

2022-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. In D122965#3426403 , @ps-19 wrote: > Can anyone please review the patch? FYI: please only ping the patch after about a week has gone by

[PATCH] D122965: Corrected A Command

2022-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122965#3426412 , @aaron.ballman wrote: > In D122965#3426403 , @ps-19 wrote: > >> Can anyone please review the patch? > > FYI: please only ping the patch after about a week has g

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

2022-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 2 inline comments as done. aaron.ballman added a comment. In D122983#3426261 , @erichkeane wrote: > I don't have any real comments (the changes are quite trivial), and I really > like the approach here, I think it is more than gener

[PATCH] D122965: Corrected A Command

2022-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In D122965#3426446 , @ps-19 wrote: > Priyansh Singh > priyansh.singh...@gmail.com Thanks! I've landed on your behalf in aa19500a4c3a66058078f88b3a7dd7a9ad30be12

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

2022-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked an inline comment as done. aaron.ballman added a comment. In D122983#3426534 , @paulwalker-arm wrote: > Please consider this "AArch64 folks speaking up". What are your plans here > exactly? I have no issue with adding `-std=c99` to

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

2022-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122983#3426541 , @paulwalker-arm wrote: > The tests verify a set of builtins do not exist when the associated feature > flag is not present. They sit within CodeGen because the tests were > plentiful and it did not s

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

2022-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122983#3426661 , @paulwalker-arm wrote: > Thanks for this. Any time, thank you for speaking up when I was about to drop test coverage by accident! In D122983#3426716 , @erich

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

2022-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122983#3426739 , @paulwalker-arm wrote: > Ok, message understood. I'll try and get these cleaned up, I cannot say > precisely when but will push for before we branch for 15 if that sounds > sensible. Oops, sorry, I

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

2022-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I pushed 5d90004874c7b040cd43597826aabb34757d25ab to hopefully address the lion's share of the currently failing precommit CI tests. I'll address the remaining few as an update to this patch.

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

2022-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 420242. aaron.ballman added a comment. Herald added subscribers: kbarton, nemanjai. Updated the release note and hopefully addressed the remaining test failures found by precommit CI. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122983/new/

[PATCH] D119609: [Clang][Sema] Prohibit expr statement in the default argument

2022-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D119609#3426279 , @erichkeane wrote: > I think LGTM on technical perspective, Please don't commit until > @aaron.ballman confirms he is OK with the direction, or would like to wait > longer for GCC. I spotted some tec

[PATCH] D122155: Add warning when eval-method is set in the presence of value unsafe floating-point calculations.

2022-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, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122155/new/ https://reviews.llvm.org/D122155 ___ cfe-commits mai

[PATCH] D122808: [clang] Fix warnings when `-Wdeprecated-enum-enum-conversion` is enabled

2022-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122808#3425703 , @antoniofrighetto wrote: > Looks definitely better! How about this slightly changed version protecting > the interface? > > /// Helper which adds two underlying types of enumeration type. > templat

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

2022-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 420290. aaron.ballman added a comment. Fixed a failing test case caught 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-too

[PATCH] D122954: [clang] Extend target_clones tests to exercise declarations that are not definitions.

2022-04-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122954#3427422 , @erichkeane wrote: > In D122954#3427406 , @tahonermann > wrote: > >>> FWIW, I dislike this idea of doing tests in separate commits from the patch >>> itself,

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

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 420446. aaron.ballman added a comment. Fixing the clangd include fixer unit tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122983/new/ https://reviews.llvm.org/D122983 Files: clang-tools-extra/clangd/IncludeFixer.cpp clang-tools-ext

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

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122983#3427518 , @xbolva00 wrote: > Could you please check that https://github.com/llvm/llvm-test-suite is > buildable with your patch? I gave it a shot just to see, but I'm unable to build it even without my patch:

[PATCH] D122954: [clang] Extend target_clones tests to exercise declarations that are not definitions.

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122954#3427676 , @tahonermann wrote: >> but I DO have the opposite problem: Figuring out what the associated tests >> are for a patch > > I also have that issue, but I don't see the relevance here. The changes in > D1

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

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 420488. aaron.ballman added a comment. Fixing more precommit CI failures. The `ScudoWrappersCTest.MallocInfo` do not appear to be caused by this patch, however. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122983/new/ https://reviews.llvm.or

[PATCH] D122661: [Clang] Do not warn on unused lifetime-extending vars with side effects...

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:1893-1894 +const Expr *Init = VD->getInit(); +if (const ExprWithCleanups *Cleanups = +dyn_cast_or_null(Init)) + Init = Cleanups->getSubExpr(); ===

[PATCH] D122808: [clang] Fix warnings when `-Wdeprecated-enum-enum-conversion` is enabled

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks! This is heading in the right direction. You should also add some test coverage to `llvm/unittests/ADT/STLExtrasTests.cpp` for the new interface. Comment at: llvm/include/llvm/ADT/STLExtras.h:207-211 +template , +

[PATCH] D122766: [clang] Use forward slash as the path separator for Windows in __FILE__, __builtin_FILE(), and std::source_location

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122766#3419303 , @hans wrote: > Maybe Martin or Aaron have opinions here too? Naively, this seems wrong to me. Yes, Windows sometimes allows you to use forward slashes, but that is not the path separator which Windows

[PATCH] D122661: [Clang] Do not warn on unused lifetime-extending vars with side effects...

2022-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. Thanks, the additional test coverage makes it more clear that the changes are good. Please add a release note when landing though! Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D119609: [Clang][Sema] Prohibit statement expression in the default argument

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This should also have a release note that explains the change in behavior, since we're now being more restrictive with what programs we accept. Aside from the release note and the column wrapping, this LGTM!

<    22   23   24   25   26   27   28   29   30   31   >