[PATCH] D141690: [clang] fix consteval ctor code generation assert

2023-02-23 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google abandoned this revision. luken-google added a comment. seems to have fixed itself.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141690/new/ https://reviews.llvm.org/D141690 ___ cfe-commits

[PATCH] D141690: [clang] fix consteval ctor code generation assert

2023-01-13 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:1338 + llvm::StructType *STy = dyn_cast(Val->getType()); + if (STy && STy->isLayoutIdentical(cast(Dest.getElementType( { for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { ---

[PATCH] D141690: [clang] fix consteval ctor code generation assert

2023-01-13 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 489058. luken-google added a comment. Add newline at end of test file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141690/new/ https://reviews.llvm.org/D141690 Files: clang/docs/ReleaseNotes.rst cla

[PATCH] D141690: [clang] fix consteval ctor code generation assert

2023-01-13 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 489057. luken-google added a comment. Adds test and release note, refactors to avoid possible null pointer deref. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141690/new/ https://reviews.llvm.org/D141690

[PATCH] D141690: [clang] fix consteval ctor code generation assert

2023-01-13 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added a comment. See: https://github.com/llvm/llvm-project/issues/53983 I can add a release note and some testing, but wanted feedback that this was the right approach. The problem is when generating code for the constructor for the `bar` element inside of `MyStruct`, `Dest` has an

[PATCH] D141690: [clang] fix consteval ctor code generation assert

2023-01-13 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google created this revision. Herald added a project: All. luken-google requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes GH#53983. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D141690 Files: clang/lib/Code

[PATCH] D138210: [clang] Require parameter pack to be last argument in concepts.

2022-12-12 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google closed this revision. luken-google added a comment. committed at afd800fc5679ccfe6f32b097586c658628500867 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138210/new/

[PATCH] D138210: [clang] Require parameter pack to be last argument in concepts.

2022-11-25 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 478019. luken-google added a comment. Strengthen assert. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138210/new/ https://reviews.llvm.org/D138210 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/Se

[PATCH] D138210: [clang] Require parameter pack to be last argument in concepts.

2022-11-25 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added a comment. There is logic in the template expansion that returns an error state if the template parameter pack was not at the end of the template parameter list. It returns `true` but does not generate any diagnostics, but the outer code error machinery assumes that diagnosti

[PATCH] D138210: [clang] Require parameter pack to be last argument in concepts.

2022-11-18 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 476462. luken-google added a comment. Adding release note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138210/new/ https://reviews.llvm.org/D138210 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/

[PATCH] D138210: [clang] Require parameter pack to be last argument in concepts.

2022-11-17 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google created this revision. Herald added a project: All. luken-google requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes GH48182. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D138210 Files: clang/lib/Sema/

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-11-02 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google abandoned this revision. luken-google added a comment. Abandoned in favor of Erich's patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133052/new/ https://reviews.llvm.org/D133052 ___ cfe

[PATCH] D136975: [Concepts] Correctly handle failure when checking concepts recursively

2022-10-31 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added a comment. Looks good to me! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136975/new/ https://reviews.llvm.org/D136975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-10-31 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added a comment. Because of the change to `InsertNode` to not assert on already cached concepts this patch now works. If I try to catch the recursive expansion on a higher level the test in `concepts.cpp` for 2-level concept expansion fails. There are some finite recursive use case

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-10-31 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 472029. luken-google added a comment. Check template constraint satisfaction logic Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133052/new/ https://reviews.llvm.org/D133052 Files: clang/docs/ReleaseNot

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-09-16 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added a comment. @ilya-biryukov something like this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133052/new/ https://reviews.llvm.org/D133052 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-09-16 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 460757. luken-google added a comment. Remove extraneous comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133052/new/ https://reviews.llvm.org/D133052 Files: clang/docs/ReleaseNotes.rst clang/lib

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-09-16 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 460756. luken-google added a comment. Refactor to check during template overload evaluation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133052/new/ https://reviews.llvm.org/D133052 Files: clang/docs/R

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-09-14 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added a comment. @ilya-biryukov can you please take a look? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133052/new/ https://reviews.llvm.org/D133052 ___ cfe-commits mailing list cf

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-09-12 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added a comment. Friendly ping on this, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133052/new/ https://reviews.llvm.org/D133052 ___ cfe-commits mailing list cfe-commits@lists.llvm

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-09-02 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added a comment. In D133052#3765753 , @ychen wrote: > Oh, one more thing, we probably need to handle nested levels too, for > example, `foo(a);` might be triggered by a template which may be in turn > triggered by the concept check. So only

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-09-02 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 457579. luken-google marked an inline comment as done. luken-google added a comment. Rebase and lazily check condition. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133052/new/ https://reviews.llvm.org/D1

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-09-01 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added a comment. In D133052#3763201 , @ychen wrote: > In D133052#3763041 , @luken-google > wrote: > >> In D133052#3762596 , @ychen wrote: >> >>> Like mention

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-09-01 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 457264. luken-google added a comment. Remove debugging cruft Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133052/new/ https://reviews.llvm.org/D133052 Files: clang/docs/ReleaseNotes.rst clang/lib/Sem

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-09-01 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 457262. luken-google added a comment. Refactor to use CodeSynthesisContexts Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133052/new/ https://reviews.llvm.org/D133052 Files: clang/docs/ReleaseNotes.rst

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-08-31 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added a comment. In D133052#3762596 , @ychen wrote: > Like mentioned in > https://stackoverflow.com/questions/68853472/is-this-a-bug-in-clangs-c20-concepts-implementation-unnecessary-checking-of, > could we not go down the path of consideri

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-08-31 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added a reviewer: ilya-biryukov. luken-google added a comment. I'm open to other suggestions if this doesn't seem like the right approach. The problem is the concept evaluation code is fairly separated in the call stack from this Sema code, so it's hard to think of a minimal change

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-08-31 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 457084. luken-google added a comment. Remove extraneous header inclusion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133052/new/ https://reviews.llvm.org/D133052 Files: clang/docs/ReleaseNotes.rst

[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

2022-08-31 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google created this revision. Herald added a project: All. luken-google requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/50891 Repository: rG LLVM Github Monorepo https://reviews.l

[PATCH] D132874: [clang] Don't emit debug vtable information for consteval functions

2022-08-30 Thread Luke Nihlen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc9aba6007451: [clang] Don't emit debug vtable information for consteval functions (authored by luken-google). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D132874: [clang] Don't emit debug vtable information for consteval functions

2022-08-30 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 456641. luken-google added a comment. Change to method call. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132874/new/ https://reviews.llvm.org/D132874 Files: clang/docs/ReleaseNotes.rst clang/lib/Cod

[PATCH] D132874: [clang] Don't emit debug vtable information for consteval functions

2022-08-30 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google marked an inline comment as done. luken-google added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1761 - if (Method->isVirtual()) { + if (Method->isVirtual() && !Method->isConsteval()) { if (Method->isPure()) shafik wrote:

[PATCH] D132874: [clang] Don't emit debug vtable information for consteval functions

2022-08-29 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added reviewers: aaron.ballman, ilya-biryukov. luken-google added a comment. Note that there's still an underlying issue where the linker complains of missing vtable information for both Base and Derived, which I'm treating as a separate issue and will either file or de-dup against

[PATCH] D132874: [clang] Don't emit debug vtable information for consteval functions

2022-08-29 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google created this revision. Herald added a project: All. luken-google requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/55065 Repository: rG LLVM Github Monorepo https://reviews.l

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

2022-08-25 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added a comment. Yes please, I'm hoping to earn committer rights with a series of C++20 patches :). Name is Luke Nihlen, email is lu...@google.com, github ID is luken-google@. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1325

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

2022-08-25 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added inline comments. Comment at: clang/lib/Parse/ParseTemplate.cpp:293 +if (Tok.is(tok::kw_requires)) { + CXXScopeSpec ScopeSpec = DeclaratorInfo.getCXXScopeSpec(); + DeclaratorScopeObj DeclScopeObj(*this, ScopeSpec); erichkeane wrote

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

2022-08-25 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 455622. luken-google retitled this revision from "Add cxx scope if needed for requires clause." to "[clang] Add cxx scope if needed for requires clause.". luken-google added a comment. Make ScopeSpec a reference. Repository: rG LLVM Github Monorepo

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

2022-08-25 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google abandoned this revision. luken-google added a comment. Uploaded by mistake, kindly ignore. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132670/new/ https://reviews.llvm.org/D132670 ___ cfe-

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

2022-08-25 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google marked 2 inline comments as done. luken-google added a comment. Thanks for the feedback and the code review. I've uploaded a new revision with the requested changes, PTAL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132503/new/ http

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

2022-08-25 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 455620. luken-google added a comment. Responding to feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132503/new/ https://reviews.llvm.org/D132503 Files: clang/docs/ReleaseNotes.rst clang/lib/Pa

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

2022-08-25 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google created this revision. Herald added a project: All. luken-google requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes issue #55216. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D132670 Files: clang/docs

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

2022-08-24 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added a comment. Note that the following tests: Builtins-i386-linux :: muldc3_test.c SanitizerCommon-asan-i386-Linux :: Linux/crypt_r.cpp SanitizerCommon-asan-i386-Linux :: Posix/crypt.cpp SanitizerCommon-lsan-i386-Linux :: Linux/crypt_r.cpp SanitizerCommon-lsan-i386-Linux

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

2022-08-24 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 455217. luken-google added a comment. Fix clang-format errors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132503/new/ https://reviews.llvm.org/D132503 Files: clang/lib/Parse/ParseTemplate.cpp clang/

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

2022-08-23 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google created this revision. Herald added a project: All. luken-google requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes issue #55216. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D132503 Files: clang/lib/

[PATCH] D127748: Adds a warning for aligned new in MSVC before C++17

2022-06-15 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google abandoned this revision. luken-google added a comment. Probably better to address this in the Driver. See also https://reviews.llvm.org/D127641. I'm going to close this for now and see if we want to revisit after that lands or as part of that change. Repository: rG LLVM Github M

[PATCH] D127683: Adds a warning for aligned new in MSVC before C++17

2022-06-14 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google abandoned this revision. luken-google added a comment. Mistakenly updated change here: https://reviews.llvm.org/D127748 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127683/new/ https://reviews.llvm.org/D127683 ___

[PATCH] D127748: Adds a warning for aligned new in MSVC before C++17

2022-06-14 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google created this revision. Herald added a project: All. luken-google requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. MSVC requires C++17 to support aligned new and defining the macro __cpp_aligned_new. Clang does not, which could r

[PATCH] D127683: Adds a warning for aligned new in MSVC before C++17

2022-06-13 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google created this revision. Herald added a project: All. luken-google requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. MSVC requires C++17 to support aligned new and defining the macro __cpp_aligned_new. Clang does not, which could r

[PATCH] D126664: Expand definition deprecation warning to include constexpr statements.

2022-06-01 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 433404. luken-google added a comment. Squash commit to include original changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126664/new/ https://reviews.llvm.org/D126664 Files: clang/docs/ReleaseNotes

[PATCH] D126664: Expand definition deprecation warning to include constexpr statements.

2022-06-01 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added a comment. Thanks for the review! I do need someone to commit on my behalf. Please commit with name "Luke Nihlen" and email address "lu...@google.com". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126664/new/ https://reviews.ll

[PATCH] D126664: Expand definition deprecation warning to include constexpr statements.

2022-06-01 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google updated this revision to Diff 433395. luken-google added a comment. Add release note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126664/new/ https://reviews.llvm.org/D126664 Files: clang/docs/ReleaseNotes.rst Index: clang/docs/

[PATCH] D126664: Expand definition deprecation warning to include constexpr statements.

2022-05-30 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google created this revision. Herald added a project: All. luken-google requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Clang currently warns on definitions downgraded to declarations with a const modifier, but not for a constexpr mod