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

2022-09-02 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. In D53847#3745415 , @royjacobson wrote: > I looked at this a bit about a week ago and got it down to 3-4 tests failing, > but I'm not sure how much time I'll have to continue working on it. If one of > you wants to take over I'll

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

2022-09-06 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 458329. ayzhao added a comment. Update commit with contributions from @royjacobson Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/include/clang/Basic/Dia

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

2022-09-07 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 458580. ayzhao marked 12 inline comments as done. ayzhao added a comment. address code review comments from shafik@ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files

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

2022-09-07 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao marked an inline comment as done. ayzhao added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:5100-5101 bool IsConstructor = false; - if (isDeclarationSpecifier()) + if (isDeclarationSpecifier(ITC_Never)) IsConstructor = true; else if (Tok.is(tok::

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

2022-09-08 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 458900. ayzhao added a comment. Fix failing test in p5.cpp where typename should be required for enum-base (N.B. due to https://github.com/llvm/llvm-project/commit/c90e198107431f64b73686bdce31c293e3380ac7, the correct error should now be missing 'typename' r

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

2022-09-08 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 458901. ayzhao added a comment. remove obsolete FIXME Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/i

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

2022-09-08 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao marked an inline comment as done. ayzhao added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:4321 + isCXXDeclarationSpecifier(ITC_Never, TPResult::True) != + TPResult::True) || +(!getLangOpts().CPlusPlus && !isDeclaratio

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

2022-09-08 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 458930. ayzhao marked 2 inline comments as done. ayzhao added a comment. p5.cpp -> p4.cpp, removed debug statements haven't yet fully grokked this patch. still looking into fixing test failures and PrevLookupResult. Repository: rG LLVM Github Monorepo CH

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

2022-09-09 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 459205. ayzhao added a comment. Fix typename-specifier-3.cpp test Things done: - the warning should also include a check that C++20 is required - the warning should only show up for precxx17, as %std_cxx17- translates to -std=c++2b Repository: rG LLVM Gi

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

2022-09-15 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:362 +// allow this as an extension. +if (AllowImplicitTypename == ImplicitTypenameContext::No && +!isClassName && !IsCtorOrDtorName) Status update: This line is cur

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

2022-09-15 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:362 +// allow this as an extension. +if (AllowImplicitTypename == ImplicitTypenameContext::No && +!isClassName && !IsCtorOrDtorName) ayzhao wrote: > Status update: >

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

2022-09-15 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 460514. ayzhao added a comment. hacky fix for the test CXX/module/module.interface/p2-2.cpp If anyone has a better idea on how to fix this test, feedback is **very** welcome. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

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

2022-03-30 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao created this revision. Herald added subscribers: frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson. Herald add

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

2022-03-30 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 419277. ayzhao added a comment. Remove errant diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122766/new/ https://reviews.llvm.org/D122766 Files: clang/lib/AST/Expr.cpp clang/lib/Lex/PPMacroExpansion.cpp

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

2022-03-31 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/AST/Expr.cpp:2193 SmallString<256> Path(PLoc.getFilename()); Ctx.getLangOpts().remapPathPrefix(Path); +if (Ctx.getTargetInfo().getTriple().isOSWindows()) { hans wrote: > I was going to say perhaps

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

2022-04-04 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao created this revision. Herald added a subscriber: dexonsmith. Herald added a project: All. ayzhao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When targeting Windows, the path separator used when targeting Windows depends on the b

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

2022-04-04 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao abandoned this revision. ayzhao added a comment. Accidental duplicate of D122766 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123101/new/ https://reviews.llvm.org/D123101 STAMPS actor(@ayzhao) application

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

2022-04-04 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 420350. ayzhao added a comment. Herald added a subscriber: dexonsmith. Extract logic into a separate function Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122766/new/ https://reviews.llvm.org/D122766 Files:

[PATCH] D121653: Implement __cpuid intrinsic WIP

2022-03-14 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao created this revision. Herald added a subscriber: pengfei. Herald added a project: All. ayzhao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. cpuid implementation complete, still have a cannot compile this function yet WORK IN PROG

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

2022-04-13 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. So, the general consensus seems to be that we should use backslashes when targeting Windows. I implemented using only backslashes for Windows; however, clang/test/SemaCXX/destructor.cpp

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

2022-04-14 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a subscriber: rsmith. ayzhao added a comment. In D122766#3451775 , @hans wrote: > In D122766#3450298 , @ayzhao wrote: > >> So, the general consensus seems to be that we should use backslashes when >>

[PATCH] D125138: [clang] Add the flag -ffile-reproducible

2022-05-06 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao created this revision. Herald added a project: All. ayzhao requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. When Clang generates the path prefix (i.e. the path of the directory where the file is) when generating __FILE__, __bu

[PATCH] D125138: [clang] Add the flag -ffile-reproducible

2022-05-06 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao abandoned this revision. ayzhao added a comment. Duplicate of D122766 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125138/new/ https://reviews.llvm.org/D125138

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

2022-05-06 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 427771. ayzhao added a comment. Implement -ffile-reproducible Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122766/new/ https://reviews.llvm.org/D122766 Files: clang/include/clang/Basic/LangOptions.h clang/

[PATCH] D122766: [clang] Add the flag -ffile-reproducible

2022-05-06 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 427773. ayzhao added a comment. missing newline Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122766/new/ https://reviews.llvm.org/D122766 Files: clang/include/clang/Basic/LangOptions.h clang/include/clang/

[PATCH] D122766: [clang] Add the flag -ffile-reproducible

2022-05-06 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 427774. ayzhao added a comment. another missing newline Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122766/new/ https://reviews.llvm.org/D122766 Files: clang/include/clang/Basic/LangOptions.h clang/includ

[PATCH] D122766: [clang] Add the flag -ffile-reproducible

2022-05-06 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. In D122766#3450348 , @dexonsmith wrote: > In D122766#3450298 , @ayzhao wrote: > >> So, the general consensus seems to be that we should use backslashes when >> targeting Windows. >> >> I

[PATCH] D122766: [clang] Add the flag -ffile-reproducible

2022-05-09 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 428121. ayzhao marked 4 inline comments as done. ayzhao added a comment. code review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122766/new/ https://reviews.llvm.org/D122766 Files: clang/include/cl

[PATCH] D122766: [clang] Add the flag -ffile-reproducible

2022-05-09 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 428139. ayzhao added a comment. Clarify --fno-file-reproducible HelpText Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122766/new/ https://reviews.llvm.org/D122766 Files: clang/include/clang/Basic/LangOptions

[PATCH] D125425: Explicitly add -target for Windows builds in file_test_windows.c

2022-05-11 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao created this revision. Herald added a subscriber: pengfei. Herald added a project: All. ayzhao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. It turns out that the llvm buildbots run the test with -DLLVM_DEFAULT_TARGET_TRIPLE=x86_64

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-19 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 469073. ayzhao added a comment. implement TreeTransform + add a test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D129531 Files: clang/include/clang-c/Index.h clang/inc

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6052 +} else if (S.getLangOpts().CPlusPlus20 && !TopLevelOfInitList) + TryOrBuildParenListInitialization(S, Entity, Kind, Args, *this, +/*VerifyOnly=*/true); ---

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6052 +} else if (S.getLangOpts().CPlusPlus20 && !TopLevelOfInitList) + TryOrBuildParenListInitialization(S, Entity, Kind, Args, *this, +/*VerifyOnly=*/true); ---

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 469393. ayzhao added a comment. Add test for p1975r0 and add fix (hack?) for IK_COPY Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D129531 Files: clang/include/clang-c/Ind

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 469406. ayzhao added a comment. add test for p1975r0 static_cast Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D129531 Files: clang/include/clang-c/Index.h clang/include

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6052 +} else if (S.getLangOpts().CPlusPlus20 && !TopLevelOfInitList) + TryOrBuildParenListInitialization(S, Entity, Kind, Args, *this, +/*VerifyOnly=*/true); ---

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 469411. ayzhao added a comment. Update ReleaseNotes.rst and cxx_status.html Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D129531 Files: clang/docs/ReleaseNotes.rst clan

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. Friendly ping for reviewers since (I think) this is more or less complete. Additionally, I found out that the GCC implementation [0] allows references to aggregates to be paren-initialized - i.e. it accepts the following: struct A { int a; int b; }; const A

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-24 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao marked 11 inline comments as done. ayzhao added a comment. In D129531#3873872 , @royjacobson wrote: > Thanks for working on it! It looks really good. Please remember to update the > feature test macro (__cpp_aggregate_paren_init). Done > Also,

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-24 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 470311. ayzhao added a comment. some comment fixes, add a test for serialization which doesn't work yet Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D129531 Files: clang/

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-24 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 470314. ayzhao added a comment. remove whitespace change and disable test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D129531 Files: clang/docs/ReleaseNotes.rst clang/

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-25 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/Serialization/ASTReaderStmt.cpp:2179 + for (unsigned I = 0; I < E->NumExprs; I++) +E->getTrailingObjects()[I] = Record.readSubExpr(); +} ilya-biryukov wrote: > FYI: I think this is where the crash comes fro

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-27 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 471329. ayzhao marked 11 inline comments as done. ayzhao added a comment. Fix PCH test and address some code review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D12

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-27 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. In D129531#3880875 , @ayzhao wrote: > In D129531#3873872 , @royjacobson > wrote: > >> Thanks for working on it! It looks really good. Please remember to update >> the feature test macro (

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-27 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 471338. ayzhao added a comment. we don't need CHECK-DAG here Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D129531 Files: clang/docs/ReleaseNotes.rst clang/include/clang

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-28 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 471694. ayzhao marked 2 inline comments as done. ayzhao added a comment. add C++20 extension diagnostics and some other code review feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://revi

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-28 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. Friendly ping for reviewers as all comments should be addressed by now. In D129531#3873775 , @cor3ntin wrote: > It starting to look great. > Should we add an extension warning? Note that I'm not suggesting to support > that in ea

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-31 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 472190. ayzhao marked 6 inline comments as done. ayzhao added a comment. address some comments and implement disallowing flexible array members Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://r

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-31 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. Status update: While investigating @cor3ntin's comment about refactoring `VisitInitListExpr` and `VisitCXXParenListInitExpr` as they share common code, I discovered that flexible array members would cause this patch to explode. Specifically, the following code: struc

[PATCH] D131818: [clang][diagnostics] Don't warn about unreachable code in constexpr if

2022-08-12 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao created this revision. ayzhao added a reviewer: thakis. Herald added a reviewer: NoQ. Herald added a project: All. ayzhao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The point of a constexpr if statement is to determine which bra

[PATCH] D131818: [clang][diagnostics] Don't warn about unreachable code in constexpr if

2022-08-12 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 452334. ayzhao added a comment. Add a test for non-constexpr if statements Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131818/new/ https://reviews.llvm.org/D131818 Files: clang/lib/Analysis/ReachableCode.cp

[PATCH] D131818: [clang][diagnostics] Don't warn about unreachable code in constexpr if

2022-08-15 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 452721. ayzhao added a comment. Add tests for nested non-constexpr if Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131818/new/ https://reviews.llvm.org/D131818 Files: clang/lib/Analysis/ReachableCode.cpp c

[PATCH] D131818: [clang][diagnostics] Don't warn about unreachable code in constexpr if

2022-08-15 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. In D131818#3723227 , @thakis wrote: > Thanks! > > Can you add a test for non-constexpr unreachable code within the constexpr if > and test that that still warns? Done Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D131818: [clang][diagnostics] Don't warn about unreachable code in constexpr if

2022-08-15 Thread Alan Zhao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGff8aadf58d1a: [clang][diagnostics] Don't warn about unreachable code in constexpr if (authored by ayzhao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1318

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

2022-09-16 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/Sema/SemaTemplate.cpp:3377-3379 // FIXME: This is not quite correct recovery as we don't transform SS // into the corresponding dependent form (and we don't diagnose missing // 'template' keywords within SS

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

2022-09-19 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 461401. ayzhao added a comment. fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/include/clang/

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

2022-09-19 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 461403. ayzhao added a comment. remove extra blank line Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang

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

2022-09-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao marked an inline comment as done. ayzhao added inline comments. Comment at: clang/lib/Sema/SemaTemplate.cpp:3377-3379 // FIXME: This is not quite correct recovery as we don't transform SS // into the corresponding dependent form (and we don't diagnose missing

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

2022-09-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 461699. ayzhao added a comment. rebase + clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/i

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

2022-09-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 461729. ayzhao marked 2 inline comments as done. ayzhao added a comment. remove PrevLookupResult + put Declarator(...) and ~Declarator() definitions back in the header files to reduce the diff since we're no longer overloading the constructor. Repository:

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

2022-09-20 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/include/clang/Sema/DeclSpec.h:1918 + /// Lookup result of declarator, if any. + std::unique_ptr PrevLookupResult; + shafik wrote: > Why do we need this one shot previous lookup result? I am struggling to see > th

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

2022-09-21 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 462032. ayzhao added a comment. rebase + upload; also friendly ping! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/include/clang/Basic/DiagnosticSemaKin

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

2022-09-22 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 46. ayzhao marked 2 inline comments as done. ayzhao added a comment. address some review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/incl

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

2022-09-22 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 462239. ayzhao marked 2 inline comments as done. ayzhao added a comment. address some comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/include/cla

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

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

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

2022-09-22 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 462315. ayzhao added a comment. Add FriendSpecified enum Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clan

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

2022-09-22 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 462317. ayzhao added a comment. fix spacing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/include/cla

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

2022-09-22 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao marked 4 inline comments as done. ayzhao added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:5592 +bool Parser::isConstructorDeclarator(bool IsUnqualified, bool DeductionGuide, + bool IsFriend) { TentativeParsingAction TP

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

2022-09-23 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 462587. ayzhao marked an inline comment as done. ayzhao added a comment. address some more review comments + rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files

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

2022-09-23 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:367 +// with this method returning a non-null ParsedType? +if (isa(CurContext)) + return nullptr; erichkeane wrote: > Hmm... this scares me quite a bit, I don't really

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

2022-09-23 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao marked 2 inline comments as done. ayzhao added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:367 +// with this method returning a non-null ParsedType? +if (isa(CurContext)) + return nullptr; ayzhao wrote: > erichkeane wr

[PATCH] D134578: Add missing `struct` keyword to the test p2-2.cpp

2022-09-23 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao created this revision. Herald added a project: All. ayzhao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. While working on D53847 , I noticed that this test would fail once we started recognizing th

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

2022-09-23 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 462633. ayzhao added a comment. remove the hack for the test p2-2.cpp and patch in patch in D134578 which fixes the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new

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

2022-09-23 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao marked an inline comment as done. ayzhao added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:367 +// with this method returning a non-null ParsedType? +if (isa(CurContext)) + return nullptr; ayzhao wrote: > ayzhao wrote:

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

2022-09-23 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. In D53847#3809072 , @erichkeane wrote: > I think this is on the right track, but would like to see more work done on > that fixme before we commit (or at least better understand what is causing > this). I'm afraid of what else ca

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

2022-09-26 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 462969. ayzhao added a comment. clang-format + rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/i

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

2022-09-27 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 463334. ayzhao added a comment. update cxx_status.html and ReleaseNotes.rst + rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/docs/ReleaseNotes.rst

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

2022-09-27 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. In D53847#3817376 , @cor3ntin wrote: > It's great to see this make progress. > Can you update cxx_status.html and ReleaseNotes.txt? Done. I also saw that P2092R0 was marked as partially supported in `cxx_status.html` due to missi

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

2022-09-27 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. In D53847#3819200 , @cor3ntin wrote: > Good catch > > template > concept K = requires (typename T::Type X) { // (3) > X.next(); > } > > That typename should be optional. Can you add a test for that? If it works > you can ma

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

2022-09-27 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 463351. ayzhao added a comment. add test and fix for P2092 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files: clang/docs/ReleaseNo

[PATCH] D134578: Add missing `struct` keyword to the test p2-2.cpp

2022-09-28 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. In D134578#3821178 , @ilya-biryukov wrote: > Is this the only thing that blocks D53847 ? > I suggest to stamp this if so (happy to do it myself). In case @ChuanqiXu > will have comments we can add

[PATCH] D134578: Add missing `struct` keyword to the test p2-2.cpp

2022-09-28 Thread Alan Zhao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6f2b34789541: Add missing `struct` keyword to the test p2-2.cpp (authored by ayzhao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134578/new/ https://revi

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

2022-09-28 Thread Alan Zhao 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 rG4848f3bf2ff5: [C++2a] P0634r3: Down with typename! (authored by Rakete, committed by ayzhao). Changed prior to commit: https://reviews.llvm.or

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-03 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 464738. ayzhao edited the summary of this revision. ayzhao added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/

[PATCH] D133817: MSVC ABI: Looks like even non-aarch64 uses the MSVC/14 definition for pod/aggregate passing

2022-10-03 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao resigned from this revision. ayzhao added a comment. Removing myself as a reviewer as I'm not really familiar with this area. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133817/new/ https://reviews.llvm.org/D133817 ___

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-04 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:4151 + QualType T = Entity.getType(); + // FIXME: Union is unsupported. + int InitKind = T->isArrayType() ? 0 : 4; Hmm...it seems like as is this patch generates the correct code

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-04 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:4151 + QualType T = Entity.getType(); + // FIXME: Union is unsupported. + int InitKind = T->isArrayType() ? 0 : 4; ayzhao wrote: > Hmm...it seems like as is this patch generates

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-05 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:4151 + QualType T = Entity.getType(); + // FIXME: Union is unsupported. + int InitKind = T->isArrayType() ? 0 : 4; ayzhao wrote: > ayzhao wrote: > > Hmm...it seems like as is thi

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-05 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 465606. ayzhao added a comment. implement union support Unions actually work as-is - the only thing I had to do was to cap the number of parameters at 1 Also add some tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-06 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 465913. ayzhao added a comment. implement initialization of remaining elements not in the list Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D129531 Files: clang/include/c

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-06 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 465927. ayzhao added a comment. implement StmtPrinter::VisitCXXParenListInitExpr(...) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D129531 Files: clang/include/clang/AST/

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-06 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 465943. ayzhao added a comment. Fill out implementation for ClassifyExprValueKind(...) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D129531 Files: clang/include/clang/AST

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-13 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 467621. ayzhao added a comment. Herald added a subscriber: arphaman. implement constexpr and anonymous bitfields Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D129531 Files:

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-13 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 467622. ayzhao added a comment. unify spacing in CodeGen tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D129531 Files: clang/include/clang-c/Index.h clang/include/c

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-13 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:15717 +// FIXME: unimplemented +llvm_unreachable("unimplemented"); } 0x59616e wrote: > cor3ntin wrote: > > This is fairly important, ie you should make sure the feature works in

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-13 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 467626. ayzhao added a comment. Restrict CodeGen test to Linux only since Windows semantics for bitfields are weird Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D129531 Fi

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-13 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 467647. ayzhao added a comment. Fix object lifetime issue Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D129531 Files: clang/include/clang-c/Index.h clang/include/clang/

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-13 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 467661. ayzhao added a comment. run clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D129531 Files: clang/include/clang-c/Index.h clang/include/clang/AST/Decl.

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-13 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 467674. ayzhao added a comment. add test for constexpr array and a whitespace fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D129531 Files: clang/include/clang-c/Index.

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-14 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 467900. ayzhao added a comment. run clang-format again Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://reviews.llvm.org/D129531 Files: clang/include/clang-c/Index.h clang/include/clang/AST

  1   2   3   >