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

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122699#3422347 , @beanz wrote: > In D122699#3422298 , @aaron.ballman > wrote: > >> General question about the new syntax -- how does this work on field >> declarations of a rec

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

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D116203#3425512 , @cjdb wrote: > I've noticed that libstdc++ has `using __remove_cv = typename > remove_cv::type`, which causes Clang to chuck a wobbly. Changing from > `KEYWORD` to `TYPE_TRAIT_1` didn't seem to fix any

[PATCH] D123074: [clang-tidy][run-clang-tidy.py] Fix typo in new -config-file option

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. LGTM, thank you for the fix! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123074/new/ https://reviews.llvm.org/D123074 _

[PATCH] D123074: [clang-tidy][run-clang-tidy.py] Fix typo in new -config-file option

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D123074#3430351 , @aaron.ballman wrote: > LGTM, thank you for the fix! If you need me to commit on your behalf, what name and email address would you like me to use for patch attribution? Repository: rG LLVM Github

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

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122529#3422688 , @njames93 wrote: > In D122529#3422158 , @aaron.ballman > wrote: > >> This looks good? to me. :-) >> >> Despite this complicating things by a fair amount

[PATCH] D123065: [clang-tidy] support --load in clang-tidy-diff.py/run-clang-tidy.py

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. In D123065#3427382 , @bernhardmgruber wrote: > I did not base this revision on my latest main > (422d05e792dbd6a97f5afd4cdd5e8aa677e974

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

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/AttributeCommonInfo.h:47-48 // Note TableGen depends on the order above. Do not add or change the order // without adding related code to TableGen/ClangAttrEmitter.cpp. /// Context-sensi

[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 420612. aaron.ballman added a comment. Rebase; NFC. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122983/new/ https://reviews.llvm.org/D122983 Files: clang-tools-extra/clangd/IncludeFixer.cpp clang-tools-extra/clangd/ParsedAST.cpp clang

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

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122874#3422489 , @philnik wrote: > In D122874#3422263 , @aaron.ballman > wrote: > >> I'm not opposed, but this does muddy the waters about the target-specific >> nature of the

[PATCH] D123074: [clang-tidy][run-clang-tidy.py] Fix typo in new -config-file option

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In D123074#3430623 , @AaronSiddharthaMondal wrote: > In D123074#3430355 , @aaron.ballman > wrote: > >> In D123074#3430351

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

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122874#3430672 , @philnik wrote: >> And if `[[msvc::no_unique_address]]` and `[[no_unique_address]]` (when >> eventually implemented) in MSVC have a different ABI impact, will we will >> leave `__attribute__((no_unique

[PATCH] D123074: [clang-tidy][run-clang-tidy.py] Fix typo in new -config-file option

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D123074#3430705 , @AaronSiddharthaMondal wrote: > @aaron.ballman There may have been something wrong with the commit. On GitHub > it does not link to my user account. Would it be possible to change that? > The github na

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

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:3462 - case 'u': // Identifier (uber) or C11/C++11 UTF-8 or UTF-16 string literal + // Identifer (e.g., uber), or + // UTF-8 (C2x/C++17) or UTF-16 (C11/C++11) character literal, or

[PATCH] D123074: [clang-tidy][run-clang-tidy.py] Fix typo in new -config-file option

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D123074#3430789 , @AaronSiddharthaMondal wrote: > Ahh I didn't know that. After fixing my settings it is now linked correctly. > No need to revert. I'm glad that worked for you! > Thanks a lot for the help! Any time,

[PATCH] D121838: Generalize "check-all" umbrella targets, use for check-clang-tools

2022-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > In D121838#3433022 , @kbobyrev > wrote: > >> I think this is no longer [WIP] but rather review-ready, right? > > It's both WIP and review-ready :-) > There are some mechanical cleanups left to do as mentioned in the commen

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

2022-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122983#3430706 , @erichkeane wrote: > In D122983#3427518 , @xbolva00 > wrote: > >> Could you please check that https://github.com/llvm/llvm-test-suite is >> buildable with you

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

2022-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122983#3433691 , @erichkeane wrote: > In D122983#3433685 , @aaron.ballman > wrote: > >> The `-Wimplicit-function-declaration` already exists today, so I believe we >> can land

[PATCH] D130476: [NFC] Fix some C++20 warnings

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

[PATCH] D130510: Missing tautological compare warnings due to unary operators

2022-07-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks for working on this! I have some suggestions, but you'll also need to add a release note at some point. Comment at: clang/lib/Analysis/CFG.cpp:970-980 +if (LHSExpr->EvaluateAsInt(IntExprResult, *Context)) { + // Evaluating value.

[PATCH] D130331: [C++20] [Modules] Disable preferred_name when writing a C++20 Module interface

2022-07-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. I'm okay with this approach, but please be sure to add a release note explaining the behavior and update AttrDocs.td as well, so that users have some notice as to what's broken.

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130224#3677261 , @arsenm wrote: > In D130224#3677224 , @aaron.ballman > wrote: > >> However, what I think I'm hearing from this thread is that there are >> alternative approach

[PATCH] D130018: [HLSL] Add HLSLResource attribute

2022-07-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 a documentation question. Comment at: clang/include/clang/Basic/AttrDocs.td:6473-6475 +The HLSL ``resource`` attribute is not valid to manually

[PATCH] D130019: [HLSL] CodeGen HLSL Resource annotations

2022-07-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:59 +return; + auto *RD = Ty->getAsCXXRecordDecl(); + if (!RD) Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:62-66 + if (!RD->hasAttr()) +return;

[PATCH] D130058: [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values

2022-07-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticASTKinds.td:370 +def note_constexpr_unscoped_enum_out_of_range : Note< + "store of value outside of the range of unscoped enum, valid values %0 to %1">; def err_experimental_clang_interp_faile

[PATCH] D129596: [clang-tidy] Avoid extra parentheses around MemberExpr

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

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2050-2066 +static bool IsArgumentMayBeUndef(const Decl *TargetDecl, unsigned ArgNo) { + if (!TargetDecl) +return false; + + bool ArgHasMayBeUndefAttr = false; + if (TargetDecl) { +if (const F

[PATCH] D130058: [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values

2022-07-27 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, with some minor nits. Also, please be sure to add a release note. @erichkeane -- should we update the cxx_dr_status.html page for this? We currently claim Clang 12 for this

[PATCH] D130058: [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values

2022-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:2420 + constexpr E1 x2 = static_cast(8); // expected-error {{must be initialized by a constant expression}} + // expected-note@-1 {{integer value 8 is outside the valid range of v

[PATCH] D130058: [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values

2022-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:2420 + constexpr E1 x2 = static_cast(8); // expected-error {{must be initialized by a constant expression}} + // expected-note@-1 {{integer value 8 is outside the valid range of v

[PATCH] D130058: [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values

2022-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: cjdb. aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:2420 + constexpr E1 x2 = static_cast(8); // expected-error {{must be initialized by a constant expression}} + // expected-note@-1 {{integer

[PATCH] D130018: [HLSL] Add HLSLResource attribute

2022-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:6473-6475 +The HLSL ``resource`` attribute is not valid to manually specify in +HLSL. It is applied by the compiler to HLSL resource type objects enabling them +to be handled appropriately in C

[PATCH] D130510: Missing tautological compare warnings due to unary operators

2022-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for this, I think this is good incremental progress and is almost ready to go. Just a few small nits, but also, can you also add a release note for the fix (be sure to mention which issue is being closed too). Note, the precommit CI failures are unrelate

[PATCH] D130058: [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values

2022-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:2420 + constexpr E1 x2 = static_cast(8); // expected-error {{must be initialized by a constant expression}} + // expected-note@-1 {{integer value 8 is outside the valid range of v

[PATCH] D129752: Thread safety analysis: Handle additional cast in scoped capability construction

2022-07-27 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 think this warrants a release note (or did it close any open issues in the tracker)? Comment at: clang/lib/Analysis/ThreadSafety.cpp:2091-2097 +

[PATCH] D130058: [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values

2022-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:2420 + constexpr E1 x2 = static_cast(8); // expected-error {{must be initialized by a constant expression}} + // expected-note@-1 {{integer value 8 is outside the valid range of v

[PATCH] D130510: Missing tautological compare warnings due to unary operators

2022-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130510#3683078 , @Codesbyusman wrote: > In D130510#3682902 , @aaron.ballman > wrote: > >> Thank you for this, I think this is good incremental progress and is almost >> ready

[PATCH] D130055: Clang extensions yolo, woot & kaboom

2022-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for this! I'm starting to get dug out from standards meetings and able to think about this a bit more, and I had some questions. > The yolo attribute denotes a constructor as creating an "uninitialized" > variable. Are there circumstances where we canno

[PATCH] D130055: Clang extensions yolo, woot & kaboom

2022-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added subscribers: aaronpuchert, delesley. aaron.ballman added a comment. In D130055#3683279 , @beanz wrote: > In D130055#3683173 , @aaron.ballman > wrote: > >> Are there circumstances where we cann

[PATCH] D130055: Clang extensions yolo, woot & kaboom

2022-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130055#3683822 , @jkorous wrote: > In D130055#3683173 , @aaron.ballman > wrote: > >> Are there circumstances where we cannot "simply" infer this from the >> constructor itself?

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. FWIW, precommit CI has some relevant failures for a change: TEST 'Clang :: CodeGen/attr-maybeundef-template.cpp' FAILED Script: -- : 'RUN: at line 1'; c:\ws\w4\llvm-project\premerge-checks\build\bin\clang.exe -cc

[PATCH] D130510: Missing tautological compare warnings due to unary operators

2022-07-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! I'll make some editorial corrections for grammar to the release note when I land. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D130510: Missing tautological compare warnings due to unary operators

2022-07-28 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 rG0cc3c184c784: Missing tautological compare warnings due to unary operators (authored by Codesbyusman, committed by aaron.ballman). Changed prior to

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/Stmt.h:62-63 class Token; class VarDecl; +class ValueDecl; We usually keep these alphabetical. Comment at: clang/lib/AST/ExprCXX.cpp:1214-1216 + return (C->capturesVa

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/CodeGen/attr-maybeundef-template.cpp:3 + +// CHECK-LABEL: @_Z5test4IfEvT_( +// CHECK-NEXT: entry: This mangling works for Itanium targets, but doesn't match MSVC targets, which is why the test is faili

[PATCH] D129752: Thread safety analysis: Handle additional cast in scoped capability construction

2022-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Analysis/ThreadSafety.cpp:2091-2097 + if (auto *CE = dyn_cast(E)) +if (CE->getCastKind() == CK_NoOp) + E = CE->getSubExpr()->IgnoreParens(); + if (auto *CE = dyn_cast(E)) +if (CE->getCastKind() == CK_Constr

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-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! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130224/new/ https://reviews.llvm.org/D130224 ___ cfe-commits mailing lis

[PATCH] D130750: [Clang] Do not check for underscores in isAllowedInitiallyIDChar

2022-07-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The change is fine by me, but you should put NFC in the patch title so it's more clear that this is simplifying code in a way that won't change behavior (and doesn't need tests). Comment at: clang/lib/Lex/Lexer.cpp:1486 static bool isAllowedIni

[PATCH] D130750: [Clang] Do not check for underscores in isAllowedInitiallyIDChar

2022-07-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM assuming @tahonermann doesn't spot concerns. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130750/new/ https://reviews.llvm.o

[PATCH] D130058: [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values

2022-07-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130058#3687680 , @thakis wrote: > Hello, this breaks a bunch of existing code over here (and I imagine > elsewhere). Do you have an idea on how much a bunch is and whether the fixes are particularly involved or not? D

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130224#3687860 , @amyk wrote: > In D130224#3687487 , @mubarizafzal > wrote: > >> Hi, the test cases that this patch introduces are failing on some ppc64le >> (Linux on Power) b

[PATCH] D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables

2022-08-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D54943#3687827 , @JonasToth wrote: > In D54943#3681527 , @sammccall wrote: > >> This check is enabled by default in LLVM (`Checks: misc-*` in >> `llvm-project/.clang-tidy`) >> >> T

[PATCH] D130847: [clang] SourceManager: fix isOffsetInFileID for the case of a fake SLocEntry

2022-08-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks for working on this! I think the same is true for `SourceManager::isInFileID()` as well, right? (Or any other place that calls `getSLocEntry()` and doesn't check whether the entry is invalid, which also seems to happen a fair amount in SourceManager.cpp.)

[PATCH] D130019: [HLSL] CodeGen HLSL Resource annotations

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

[PATCH] D130827: [clang] Fixed a number of typos

2022-08-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks for the typo fixes! All the changes look correct to me, so LGTM. Do you need someone to land this on your behalf? If so, what name and email address would you like used for patch attribution? Comment at: clang/lib/Headers/opencl-c.h:17856

[PATCH] D130827: [clang] Fixed a number of typos

2022-08-01 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 rG5674a3c88088: Fixed a number of typos (authored by GabrielRavier, committed by aaron.ballman). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D130827: [clang] Fixed a number of typos

2022-08-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130827#3691371 , @GabrielRavier wrote: >> Do you need someone to land this on your behalf? > > I assume so since landing seems to mean pushing the commit to the repo which > I'm pretty sure I don't have the rights to d

[PATCH] D130058: [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values

2022-08-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130058#3689053 , @thakis wrote: > In D130058#3687868 , @aaron.ballman > wrote: > >> In D130058#3687680 , @thakis wrote: >> >>> Hello, t

[PATCH] D130800: [clang][Headers] Avoid compiler warnings in builtin headers

2022-08-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks for catching this! As far as these changes go, they're pretty reasonable, but don't seem like they hit all of the problem areas. There's 20+ occurrences of `#if __STDC_VERSION__` and 10+ of `#if __cplusplus` in lib/Headers; shouldn't they all be updated?

[PATCH] D130791: [clang] Short-circuit trivial constexpr array constructors

2022-08-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this! This should also include test coverage (hmmm, we don't have a reasonable way to lit test performance regressions though so perhaps we just need to ensure there's at least one test that would normally have been unreasonably slow?)

[PATCH] D129048: Rewording the "static_assert" to static assertion

2022-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D129048#3692394 , @thakis wrote: > This change caused a ton of churn, for what I understand fix the diag in C > mode when assert.h is not included. Which is not that uncommon of a scenario: https://sourcegraph.com/sear

[PATCH] D130510: Missing tautological compare warnings due to unary operators

2022-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130510#3692654 , @rtrieu wrote: > This warning is now flagging some code which I believe is a false positive. > In particular, when template arguments are involved, their values can be > calculated during template ins

[PATCH] D130510: Missing tautological compare warnings due to unary operators

2022-08-02 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've reverted in c783ca0de1e1e00f364cf4745b8444a020ddd29b . Marking as requesting changes to make i

[PATCH] D130847: [clang] SourceManager: fix isOffsetInFileID for the case of a fake SLocEntry

2022-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. These changes look reasonable, but I verified that the precommit CI failures are valid -- it looks like this change broke a test somehow; perhaps a caller was relying on the old behavior and needs to be reworked? Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D130791: [clang] Short-circuit trivial constexpr array constructors

2022-08-02 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 agree that test coverage for the performance issue is basically impossible with our testing system. I was thinking "well good, add a test with a huge initializer to make

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Wow, I *really* like this improvement, thank you for working on it! This is going to be especially helpful for things like `static_assert(foo() == 12, "oh no, foo wasn't 12!");`. Can you also add a release note for this improvement? Comment at:

[PATCH] D131012: No longer place const volatile global variables in a read only section

2022-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: nickdesaulniers, erichkeane, rjmccall, efriedma. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. The C standard hints in a footnote attached to C17 6.7.3p5 that `const`

[PATCH] D131007: [NFCI] Refactor how KeywordStatus is calculated

2022-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/TokenKinds.def:400-401 +CXX20_KEYWORD(concept , 0) +CXX20_KEYWORD(requires , 0) // Not a CXX20_KEYWORD because it is disabled by -fno-char8_t. KEYWORD(char8_t

[PATCH] D131012: No longer place const volatile global variables in a read only section

2022-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131012#3694502 , @rjmccall wrote: > I think this is fine for the ABI; the section is generally a > definition-specific property and doesn't affect use sites. > > Do we also need to check for volatile fields of records?

[PATCH] D131012: No longer place const volatile global variables in a read only section

2022-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 449405. aaron.ballman added a comment. Rebased to get precommit CI to look at it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131012/new/ https://reviews.llvm.org/D131012 Files: clang/docs/ReleaseNotes.rst clang/lib/CodeGen/CodeGenModul

[PATCH] D131007: [NFCI] Refactor how KeywordStatus is calculated

2022-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM once nits are fixed (take or leave them). Comment at: clang/lib/Basic/IdentifierTable.cpp:169 + case KEYALTIVEC: +return LangOpts.AltiVec ? KS_Enabled : KS_Unknown; + case KEYBORLAND: --

[PATCH] D130933: Add docs for function attributes hot/cold

2022-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for adding the docs! I'm not well-versed enough in hot/cold behavior and PGO to comment on the documentation accuracy, so I'm hopeful someone can sign off on that bit. Comment at: clang/include/clang/Basic/Attr.td:1077 - let Documenta

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added subscribers: mikerice, ABataev. aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9060 continue; - const VarDecl *VD = LC.getCapturedVar(); + const VarDecl *VD = cast(LC.getCapturedVar()); if (LC.g

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this, this is heading in the right direction! Please be sure to also add a release note so users know about the new functionality. Comment at: clang/lib/Sema/SemaChecking.cpp:8509 + if (E->EvaluateAsRValue(Result, S.Cont

[PATCH] D130794: [Docs] Add HLSL ResourceType documentation

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

[PATCH] D131012: No longer place const volatile global variables in a read only section

2022-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman planned changes to this revision. aaron.ballman added a comment. In D131012#3695110 , @anakryiko wrote: > This will severly break BPF users, as we have a heavy reliance on `const > volatile` variables being allocated to `.rodata`, which are

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130894#3696590 , @xbolva00 wrote: > Use ‘5 ==6’ ? So add quotes .. +1 to the suggestion to use quotes for a bit of visual distinction between the diagnostic message and the code embedded within it.

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. I mostly only have minor nits, but otherwise this LGTM! Comment at: clang/docs/ReleaseNotes.rst:104-105 +- Support capturing structured bindings in lambdas +

[PATCH] D131012: No longer place const volatile global variables in a read only section

2022-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131012#3696810 , @anakryiko wrote: > In D131012#3696327 , @aaron.ballman > wrote: > >> In D131012#3695110 , @anakryiko >> wrote: >> >>

[PATCH] D131070: [clang][sema] Fix collectConjunctionTerms()

2022-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. It looks like precommit CI caught a relevant issue Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131070/new/ https://reviews.llvm.org/D131070 ___ cfe-commits mailing list c

[PATCH] D131057: [Sema] -Wformat: support C23 printf %b %B

2022-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks for working on this! Please also add a release note for it. I think there are changes missing for ScanfFormatString.cpp to handle `bArg` and `BArg` that should be handled at the same time. WDYT? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D130800: [clang][Headers] Avoid compiler warnings in builtin headers

2022-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. These changes look reasonable to me, thanks! Comment at: clang/lib/Headers/stdint.h:99-100 typedef __UINT64_TYPE__ uint64_t; +# undef __int_least64_t # define

[PATCH] D131057: [Sema] -Wformat: support C23 printf %b %B

2022-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131057#3697265 , @enh wrote: >> I think making scanf in the same patch makes sense. Let me check existing >> tests... > > fwiw, most of the libcs seem to have been doing these separately because > scanf is harder. i ho

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130894#3698552 , @tbaeder wrote: >> +1 to the suggestion to use quotes for a bit of visual distinction between >> the diagnostic message and the code embedded within it. > > One problem is that both the integer value `0

[PATCH] D130058: [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values

2022-08-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130058#3697949 , @smeenai wrote: > Given that we have a non-obvious (at least to me) issue in a widely used > third-party library, would we consider giving users some way to opt out of > this error, at least as a trans

[PATCH] D131007: [NFCI] Refactor how KeywordStatus is calculated

2022-08-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131007#3699142 , @omjavaid wrote: > This breaks clang causes it to crash in LLDB buildbot testsuite breaking the > LLDB buildbot: https://lab.llvm.org/buildbot/#/builders/96/builds/27003 I believe this was already reso

[PATCH] D131057: [Sema] -Wformat: support C23 format specifier %b %B

2022-08-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. In D131057#3697392 , @MaskRay wrote: > ISTM adding the diagnostic (even if we do) is not so necessary in this patch. I tend to agree. I think we'll want such a diagnostic at some point,

[PATCH] D131070: [clang][sema] Fix collectConjunctionTerms()

2022-08-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. Oh shoot, I saw that precommit CI made it past patch application failing (last time) and I thought the precommit CI bug was fixed and so it was testing the whole stack for once.

[PATCH] D131084: Add support for specifying the severity of a SARIF Result.

2022-08-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131084#3697678 , @cjdb wrote: > It seems I got confused and conflated the two this morning. > > In D131084#3697525 , @vaibhav.y > wrote: > >>> Hmm, we can probably use "informat

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-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 aside from some small corrections. Thank you for this! Do you need me to commit on your behalf? If so, what name and email address would you like me to use for patch attribu

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130906#3699323 , @inclyc wrote: > Thank you! I already have the commit access, I can commit this myself ^_^ Excellent! Feel free to land when you're ready. :-) Comment at: clang/lib/Sema/SemaCheckin

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think the precommit CI failures might be relevant here -- can you double-check those? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131134/new/ https://reviews.llvm.org/D131134

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130906#3699342 , @inclyc wrote: > In D130906#3699335 , @aaron.ballman > wrote: > >> In D130906#3699323 , @inclyc wrote: >> >>> Thank yo

[PATCH] D131155: [clang] Expand array expressions if the filler expression's filler is element dependent

2022-08-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. Your logic makes sense to me and these changes look correct; good catch! Please be sure to add a release note when landing. Thanks for the fix! CHANGES SINCE LAST ACTION https

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130906#3699361 , @inclyc wrote: > Last question, issue https://github.com/llvm/llvm-project/issues/55805 > mentioned another case, some `initListExpr` evaulated as > "StringLiteral"(`Array` in fact, but maybe able to c

[PATCH] D131194: [C++20] Fix crash-on-valid with consteval temporary construction through list initialization

2022-08-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: erichkeane, rjmccall, efriedma, clang-language-wg. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. Clang currently crashes when lowering a consteval list initialization

[PATCH] D131194: [C++20] Fix crash-on-valid with consteval temporary construction through list initialization

2022-08-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1404 + // default value here and reset the type only as needed. + QualType RetType = Inner->getType(); if (auto *Call = dyn_cast(Inner)) erichkeane wrote: > Is there any po

[PATCH] D131202: [Clang] Fix capture of values initialized by bitfields

2022-08-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/lambda-expressions.cpp:680 + auto l = [&]() { + a; // expected-error{{cannot capture a bit-field by reference}} + b; This still should be accepted -- `a` is an `const int &`

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks (NFCI)

2022-08-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This seems like a reasonable set of changes, but I'd prefer someone more well-versed in codegen make the final call. Comment at: clang/lib/CodeGen/TargetInfo.h:63 + /// Returns Swift ABI info helper for the target. + const SwiftABIInfo &getSwif

[PATCH] D131213: [clang][Headers] Fix unintentional error in D130800

2022-08-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > Undefined macros evaluate to zero, so when checking for a smaller value, we > need to include the case when the macro is undefined. The code being changed already checks `defined(__cplusplus)` so there no undefined macro value being tested. What's more, if `__cp

[PATCH] D131194: [C++20] Fix crash-on-valid with consteval temporary construction through list initialization

2022-08-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 450271. aaron.ballman added a comment. Improved from review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131194/new/ https://reviews.llvm.org/D131194 Files: clang/docs/ReleaseNotes.rst clang/lib/CodeGen/CGExprConstant.cpp cla

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