Author: ibiryukov
Date: Thu Dec 13 09:23:48 2018
New Revision: 349061
URL: http://llvm.org/viewvc/llvm-project?rev=349061&view=rev
Log:
[CodeComplete] Temporarily disable failing assertion
Found the case in the clang codebase where the assertion fires.
To avoid crashing assertion-enabled builds b
Hi David,
Thanks for the fix. And sorry for the inconvenience, I've been hit by this
so many times and yet I forget again and again...
On Thu, Dec 13, 2018 at 6:25 PM David Green wrote:
> Hello!
>
> Certain version of gcc (along with ccache iirc, where they use -E) don't
> like these raw string
Author: ibiryukov
Date: Thu Dec 13 09:32:38 2018
New Revision: 349063
URL: http://llvm.org/viewvc/llvm-project?rev=349063&view=rev
Log:
[CodeComplete] Adhere to LLVM naming style in CodeCompletionTest. NFC
Also reuses the same var for multiple to reduce the chance of
accidentally referecing the p
= 10;
>
> ~ ^ ~~
>
> 1 error generated.
>
> C:\src\llvm-project\clang\unittests\Sema\CodeCompleteTest.cpp(216): error:
> Value of: collectPreferredTypes(Code)
>
> Expected: only contains elements that is equal to "long"
>
&
Author: ibiryukov
Date: Mon Dec 17 08:37:52 2018
New Revision: 349362
URL: http://llvm.org/viewvc/llvm-project?rev=349362&view=rev
Log:
[CodeComplete] Fix test failure on different host and target configs
This should fix PR40033.
Modified:
cfe/trunk/unittests/Sema/CodeCompleteTest.cpp
Modif
steps/ninja%20check%201/logs/FAIL%3A%20Clang-Unit%3A%3APreferredTypeTest.BinaryExpr
>
> Cheers,
> Yvan
>
> On Thu, 13 Dec 2018 at 18:35, Ilya Biryukov via cfe-commits
> wrote:
> >
> > Author: ibiryukov
> > Date: Thu Dec 13 09:32:38 2018
> > New Revisio
Author: ibiryukov
Date: Wed Dec 19 10:01:24 2018
New Revision: 349655
URL: http://llvm.org/viewvc/llvm-project?rev=349655&view=rev
Log:
[CodeComplete] Properly determine qualifiers of 'this' in a lambda
Summary:
The clang used to pick up the qualifiers of the lamba's call operator
(which is alway
Author: ibiryukov
Date: Thu Dec 20 08:27:19 2018
New Revision: 349769
URL: http://llvm.org/viewvc/llvm-project?rev=349769&view=rev
Log:
[clangd] Try to workaround test failure by increasing the timeouts
Ideally we'd figure out a way to run this test without any sleeps, this
workaround is only the
Author: ibiryukov
Date: Thu Jan 3 05:28:05 2019
New Revision: 350303
URL: http://llvm.org/viewvc/llvm-project?rev=350303&view=rev
Log:
[clangd] clang-format everything. NFC
Modified:
clang-tools-extra/trunk/clangd/AST.cpp
clang-tools-extra/trunk/clangd/AST.h
clang-tools-extra/trunk/c
Author: ibiryukov
Date: Thu Jan 3 05:37:12 2019
New Revision: 350304
URL: http://llvm.org/viewvc/llvm-project?rev=350304&view=rev
Log:
[clangd] Check preceding char when completion triggers on ':' or '>'
Summary:
Only run completion when we were trigerred on '->' and '::', otherwise
send an erro
Author: ibiryukov
Date: Mon Jan 7 03:18:11 2019
New Revision: 350512
URL: http://llvm.org/viewvc/llvm-project?rev=350512&view=rev
Log:
[clangd] Disable BackgroundIndexTest.PeriodicalIndex
It sometimes fails on AArch64.
Modified:
clang-tools-extra/trunk/unittests/clangd/BackgroundIndexTests.
Temporarily disabled the test in r350512.
On Mon, Jan 7, 2019 at 10:54 AM Diana Picus wrote:
> Hi Eric,
>
> This is still failing intermittently on AArch64 in spite of your and
> Ilya's timeout increases. Could you please revert and rework this
> test?
>
> Thanks,
> Diana
>
> http://lab.llvm.org
Author: ibiryukov
Date: Mon Jan 7 08:55:59 2019
New Revision: 350540
URL: http://llvm.org/viewvc/llvm-project?rev=350540&view=rev
Log:
[clangd] Include instead of . NFC
This fixes the only clang-tidy check currently enabled by clangd.
Modified:
clang-tools-extra/trunk/clangd/fuzzer/ClangdF
Author: ibiryukov
Date: Mon Jan 7 09:03:15 2019
New Revision: 350542
URL: http://llvm.org/viewvc/llvm-project?rev=350542&view=rev
Log:
[clangd] Fix Windows build after r350531
Modified:
clang-tools-extra/trunk/clangd/FSProvider.cpp
Modified: clang-tools-extra/trunk/clangd/FSProvider.cpp
URL
s://codereview.chromium.org/281753002).
>
> On Mon, Nov 12, 2018 at 8:58 AM Ilya Biryukov via cfe-commits <
> cfe-commits@lists.llvm.org> wrote:
>
>> Author: ibiryukov
>> Date: Mon Nov 12 05:55:55 2018
>> New Revision: 346652
>>
>> URL: http://llvm.o
Author: ibiryukov
Date: Wed Jan 9 05:08:11 2019
New Revision: 350714
URL: http://llvm.org/viewvc/llvm-project?rev=350714&view=rev
Log:
[Driver] Fix libcxx detection on Darwin with clang run as ./clang
Summary:
By using '..' instead of fs::parent_path.
The intention of the code was to go from 'p
Author: ibiryukov
Date: Wed Jan 9 05:08:31 2019
New Revision: 350715
URL: http://llvm.org/viewvc/llvm-project?rev=350715&view=rev
Log:
Fix clang-tidy test after r350714. NFC
Added:
clang-tools-extra/trunk/test/clang-tidy/Inputs/mock-libcxx/bin/
clang-tools-extra/trunk/test/clang-tidy/Inp
rectory that's a sibling to the "bin" directory (and have
>>> been doing so for 4.5 years, since
>>> https://codereview.chromium.org/281753002).
>>>
>>> On Mon, Nov 12, 2018 at 8:58 AM Ilya Biryukov via cfe-commits <
>>> cfe-commits@lists
Author: ibiryukov
Date: Mon Sep 16 09:16:03 2019
New Revision: 372008
URL: http://llvm.org/viewvc/llvm-project?rev=372008&view=rev
Log:
[clangd] Simplify semantic highlighting visitor
Summary:
- Functions to compute highlighting kinds for things are separated from
the ones that add highlighting
Author: ibiryukov
Date: Mon Sep 16 23:49:50 2019
New Revision: 372074
URL: http://llvm.org/viewvc/llvm-project?rev=372074&view=rev
Log:
[clangd] Remove stale comment. NFC
Modified:
clang-tools-extra/trunk/clangd/ClangdServer.h
Modified: clang-tools-extra/trunk/clangd/ClangdServer.h
URL:
htt
Author: ibiryukov
Date: Wed Sep 25 05:40:22 2019
New Revision: 372859
URL: http://llvm.org/viewvc/llvm-project?rev=372859&view=rev
Log:
[clangd] A helper to find explicit references and their names
Summary:
Allows to simplify pending code tweaks:
- the upcoming DefineInline tweak (D66647)
- r
Author: ibiryukov
Date: Wed Sep 25 06:09:10 2019
New Revision: 372863
URL: http://llvm.org/viewvc/llvm-project?rev=372863&view=rev
Log:
[AST] Extract Decl::printNestedNameSpecifier helper from
Decl::printQualifiedName
Summary:
To be used in clangd, e.g. in D66647.
Currently the alternative to th
Author: ibiryukov
Date: Wed Sep 25 07:50:12 2019
New Revision: 372880
URL: http://llvm.org/viewvc/llvm-project?rev=372880&view=rev
Log:
Revert r372863: [AST] Extract Decl::printNestedNameSpecifier helper from
Decl::printQualifiedName
Reason: causes a test failure, will investigate and re-land wi
Author: ibiryukov
Date: Wed Sep 25 08:46:04 2019
New Revision: 372889
URL: http://llvm.org/viewvc/llvm-project?rev=372889&view=rev
Log:
Re-land r372863: [AST] Extract Decl::printNestedNameSpecifier helper from
Decl::printQualifiedName
Reverted in r372880 due to the test failure.
Also contains a
-avx2-linux/builds/11395/steps/ninja%20check%201/logs/FAIL%3A%20Clang%3A%3Aclang-diff-ast.cpp
> ?
>
> On Wed, Sep 25, 2019 at 9:07 AM Ilya Biryukov via cfe-commits <
> cfe-commits@lists.llvm.org> wrote:
>
>> Author: ibiryukov
>> Date: Wed Sep 25 06:09:10 2019
>&g
Author: ibiryukov
Date: Fri Sep 27 02:24:58 2019
New Revision: 373056
URL: http://llvm.org/viewvc/llvm-project?rev=373056&view=rev
Log:
[clang-format] Reference qualifiers in member templates causing extra
indentation
The following code
```
struct f {
template
void bar() && noexcept {}
};
Author: ibiryukov
Date: Fri Sep 27 02:39:10 2019
New Revision: 373057
URL: http://llvm.org/viewvc/llvm-project?rev=373057&view=rev
Log:
[clangd] Support OverloadExpr in findExplicitReferences
Reviewers: kadircet
Reviewed By: kadircet
Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commi
Author: ibiryukov
Date: Fri Sep 27 02:49:20 2019
New Revision: 373059
URL: http://llvm.org/viewvc/llvm-project?rev=373059&view=rev
Log:
Revert r373056: [clang-format] Reference qualifiers in member templates causing
extra indentation
Reason: this breaks unit tests.
Modified:
cfe/trunk/lib/F
Author: ibiryukov
Date: Fri Sep 27 03:55:53 2019
New Revision: 373067
URL: http://llvm.org/viewvc/llvm-project?rev=373067&view=rev
Log:
[clangd] Handle type template parameters in findExplicitReferences
Reviewers: kadircet
Reviewed By: kadircet
Subscribers: MaskRay, jkorous, arphaman, usaxena95
Author: ibiryukov
Date: Fri Sep 27 10:55:46 2019
New Revision: 373104
URL: http://llvm.org/viewvc/llvm-project?rev=373104&view=rev
Log:
[clangd] Fix template type aliases in findExplicitReference
Reviewers: kadircet
Reviewed By: kadircet
Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-c
Author: ibiryukov
Date: Tue Oct 1 00:27:55 2019
New Revision: 373305
URL: http://llvm.org/viewvc/llvm-project?rev=373305&view=rev
Log:
[clangd] Handle OverloadExpr in targetDecl
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: nridge, MaskRay, jkorous, arphaman, kadircet, usaxena95,
c
Author: ibiryukov
Date: Tue Oct 1 03:02:23 2019
New Revision: 373318
URL: http://llvm.org/viewvc/llvm-project?rev=373318&view=rev
Log:
[clangd] Handle template arguments in findExplicitReferences
Reviewers: kadircet
Reviewed By: kadircet
Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-
Author: ibiryukov
Date: Fri Oct 4 01:10:27 2019
New Revision: 373710
URL: http://llvm.org/viewvc/llvm-project?rev=373710&view=rev
Log:
[CodeComplete] Ensure object is the same in compareOverloads()
Summary:
This fixes a regression that led to size() not being available in clangd
when completing
Author: ibiryukov
Date: Fri Oct 4 01:10:27 2019
New Revision: 373710
URL: http://llvm.org/viewvc/llvm-project?rev=373710&view=rev
Log:
[CodeComplete] Ensure object is the same in compareOverloads()
Summary:
This fixes a regression that led to size() not being available in clangd
when completing
Author: ibiryukov
Date: Fri Apr 13 04:03:07 2018
New Revision: 330004
URL: http://llvm.org/viewvc/llvm-project?rev=330004&view=rev
Log:
[clangd] Match AST and Index label for template Symbols
Summary:
Previsouly, class completions items from the index were missing
template parameters in both the
Author: ibiryukov
Date: Sat Apr 14 09:27:35 2018
New Revision: 330087
URL: http://llvm.org/viewvc/llvm-project?rev=330087&view=rev
Log:
[clangd] Fix label and snippet for funcs in the index
This is a follow-up to r330004 to fix functions with required template args,
e.g. std::make_shared.
Modifi
Author: ibiryukov
Date: Tue Apr 24 06:48:53 2018
New Revision: 330717
URL: http://llvm.org/viewvc/llvm-project?rev=330717&view=rev
Log:
[CodeComplete] Fix completion at the end of keywords
Summary:
Make completion behave consistently no matter if it is run at the
start, in the middle or at the en
Author: ibiryukov
Date: Wed Apr 25 08:13:34 2018
New Revision: 330833
URL: http://llvm.org/viewvc/llvm-project?rev=330833&view=rev
Log:
[CodeComplete] Fix completion in the middle of ident in ctor lists.
Summary:
The example that was broken before (^ designates completion points):
class Foo
Author: ibiryukov
Date: Wed Jun 27 02:47:20 2018
New Revision: 335718
URL: http://llvm.org/viewvc/llvm-project?rev=335718&view=rev
Log:
[clangd] Do not show namespace comments.
Summary:
Comments from namespaces that clangd produces are too noisy and often
not useful.
Namespaces have too many red
iliar enough with this
>> code to debug it. Can you take a look at this?
>>
>> On Fri, Jun 15, 2018 at 1:35 AM Ilya Biryukov via cfe-commits <
>> cfe-commits@lists.llvm.org> wrote:
>>
>>> Author: ibiryukov
>>> Date: Fri Jun 15 01:31:17 2018
>
Author: ibiryukov
Date: Thu Jun 28 04:04:45 2018
New Revision: 335836
URL: http://llvm.org/viewvc/llvm-project?rev=335836&view=rev
Log:
[clangd] Fix a data race in TUScheduler
By recomputing CompilerInvocation instead of copying it.
The problem was caused by the fact that copies of CompilerInvoca
Author: ibiryukov
Date: Wed Jul 4 01:50:12 2018
New Revision: 336244
URL: http://llvm.org/viewvc/llvm-project?rev=336244&view=rev
Log:
[Sema] Fix crash in getConstructorName.
Summary:
Can happen when getConstructorName is called on invalid decls,
specifically the ones that do not have the inject
Author: ibiryukov
Date: Mon Jul 9 02:07:01 2018
New Revision: 336528
URL: http://llvm.org/viewvc/llvm-project?rev=336528&view=rev
Log:
[Preamble] Check system dependencies in preamble too
Summary:
PrecompiledPreamble hasn't checked if the system dependencies changed
before. This resulted in inva
Author: ibiryukov
Date: Mon Jul 9 02:10:22 2018
New Revision: 336530
URL: http://llvm.org/viewvc/llvm-project?rev=336530&view=rev
Log:
[clangd] Added a test for preambles and -isystem
Summary:
Checks that preambles are properly invalidated when headers from
-isystem paths change.
Reviewers: sam
Author: ibiryukov
Date: Mon Jul 9 03:45:33 2018
New Revision: 336538
URL: http://llvm.org/viewvc/llvm-project?rev=336538&view=rev
Log:
[clangd] Wait for first preamble before code completion
Summary:
To avoid doing extra work of processing headers in the preamble
mutilple times in parallel.
Rev
Author: ibiryukov
Date: Mon Jul 9 04:33:31 2018
New Revision: 336540
URL: http://llvm.org/viewvc/llvm-project?rev=336540&view=rev
Log:
[clangd] Do not write comments into Preamble PCH
Summary:
To avoid wasting time deserializing them on code completion and
further reparses.
We do not use the co
Author: ibiryukov
Date: Mon Jul 9 04:33:23 2018
New Revision: 336539
URL: http://llvm.org/viewvc/llvm-project?rev=336539&view=rev
Log:
[PCH] Add an option to not write comments into PCH
Summary:
Will be used in clangd, see the follow-up change.
Clangd does not use comments read from PCH to avoid
Author: ibiryukov
Date: Tue Oct 8 07:03:45 2019
New Revision: 374048
URL: http://llvm.org/viewvc/llvm-project?rev=374048&view=rev
Log:
[clangd] Disable expand auto on decltype(auto)
Summary: Applying it produces incorrect code at the moment.
Reviewers: sammccall
Reviewed By: sammccall
Subscri
Hi Jan,
This patch seems to assume VFS will only re-map some paths, but still point
into the physical filesystem.
This may not be the case, e.g. in unit tests.
This also manages to break some of our internal clang-tidy integrations for
obscure reasons.
Can we instead just pass VFS instance to th
Author: ibiryukov
Date: Wed Oct 9 02:40:22 2019
New Revision: 374151
URL: http://llvm.org/viewvc/llvm-project?rev=374151&view=rev
Log:
Revert r374006: Reland 'Add VFS support for sanitizers' blacklist'
Also revert follow-up changes to the test.
Reason: the patch breaks our internal clang-tidy in
Reverted in r374151.
On Wed, Oct 9, 2019 at 11:03 AM Ilya Biryukov wrote:
> Hi Jan,
>
> This patch seems to assume VFS will only re-map some paths, but still
> point into the physical filesystem.
> This may not be the case, e.g. in unit tests.
>
> This also manages to break some of our internal
Author: ibiryukov
Date: Wed Oct 9 03:00:05 2019
New Revision: 374152
URL: http://llvm.org/viewvc/llvm-project?rev=374152&view=rev
Log:
[Sema] Emit diagnostics for uncorrected delayed typos at the end of TU
Summary:
Instead of asserting all typos are corrected in the sema destructor.
The sema de
s like
> poor form to me. It's really hard to reland in that case. Please make a
> reduced repro next time.
>
> On Wed, Oct 9, 2019 at 5:38 AM Ilya Biryukov via cfe-commits <
> cfe-commits@lists.llvm.org> wrote:
>
>> Reverted in r374151.
>>
>> On Wed, Oc
gt;
>> FWIW reverting a patch for it breaking some internal system seems like
>> poor form to me. It's really hard to reland in that case. Please make a
>> reduced repro next time.
>>
>> On Wed, Oct 9, 2019 at 5:38 AM Ilya Biryukov via cfe-commits <
>>
Author: Ilya Biryukov
Date: 2019-10-24T15:41:50+02:00
New Revision: ed913a291532968c188909e932a94c5cc7b416be
URL:
https://github.com/llvm/llvm-project/commit/ed913a291532968c188909e932a94c5cc7b416be
DIFF:
https://github.com/llvm/llvm-project/commit/ed913a291532968c188909e932a94c5cc7b416be.diff
Author: Ilya Biryukov
Date: 2019-10-28T09:45:10+01:00
New Revision: d9971d0b2e34a6a5ca182089d019c9f079f528af
URL:
https://github.com/llvm/llvm-project/commit/d9971d0b2e34a6a5ca182089d019c9f079f528af
DIFF:
https://github.com/llvm/llvm-project/commit/d9971d0b2e34a6a5ca182089d019c9f079f528af.diff
Author: Ilya Biryukov
Date: 2019-10-28T12:03:09+01:00
New Revision: c814f4c4592cf0a6049a56b09442369d8e6eb9d7
URL:
https://github.com/llvm/llvm-project/commit/c814f4c4592cf0a6049a56b09442369d8e6eb9d7
DIFF:
https://github.com/llvm/llvm-project/commit/c814f4c4592cf0a6049a56b09442369d8e6eb9d7.diff
Author: Ilya Biryukov
Date: 2019-10-28T14:41:34+01:00
New Revision: 4c430a7c6f6b11105963c6a0ff1e6ee31517a1c8
URL:
https://github.com/llvm/llvm-project/commit/4c430a7c6f6b11105963c6a0ff1e6ee31517a1c8
DIFF:
https://github.com/llvm/llvm-project/commit/4c430a7c6f6b11105963c6a0ff1e6ee31517a1c8.diff
Author: Ilya Biryukov
Date: 2020-06-08T19:27:25+03:00
New Revision: 9982d48a92beb35525c50890ae3a96ece3cf8de1
URL:
https://github.com/llvm/llvm-project/commit/9982d48a92beb35525c50890ae3a96ece3cf8de1
DIFF:
https://github.com/llvm/llvm-project/commit/9982d48a92beb35525c50890ae3a96ece3cf8de1.diff
Author: ibiryukov
Date: Fri Nov 24 05:04:21 2017
New Revision: 318944
URL: http://llvm.org/viewvc/llvm-project?rev=318944&view=rev
Log:
[clangd] Ensure preamble outlives the AST
Summary:
In-memory preambles will not be copied anymore, so we need to make
sure they outlive the AST.
Reviewers: bkra
Author: ibiryukov
Date: Fri Nov 24 05:12:38 2017
New Revision: 318945
URL: http://llvm.org/viewvc/llvm-project?rev=318945&view=rev
Log:
Avoid copying the data of in-memory preambles
Summary: Preambles are large and we should avoid copying them.
Reviewers: bkramer, klimek
Reviewed By: bkramer
S
Author: ibiryukov
Date: Fri Nov 24 05:13:41 2017
New Revision: 318946
URL: http://llvm.org/viewvc/llvm-project?rev=318946&view=rev
Log:
[clangd] Sort list of sources in CMakeLists.txt. NFC
Modified:
clang-tools-extra/trunk/clangd/CMakeLists.txt
Modified: clang-tools-extra/trunk/clangd/CMakeL
Author: ibiryukov
Date: Tue Dec 5 02:42:57 2017
New Revision: 319753
URL: http://llvm.org/viewvc/llvm-project?rev=319753&view=rev
Log:
[clangd] Set completion options per-request.
Summary:
Previously, completion options were set per ClangdServer instance.
It will allow to change completion prefe
Author: ibiryukov
Date: Tue Dec 12 03:16:45 2017
New Revision: 320468
URL: http://llvm.org/viewvc/llvm-project?rev=320468&view=rev
Log:
[clangd] Introduced a Context that stores implicit data
Summary:
It will be used to pass around things like Logger and Tracer throughout
clangd classes.
Reviewe
Author: ibiryukov
Date: Tue Dec 12 04:27:47 2017
New Revision: 320474
URL: http://llvm.org/viewvc/llvm-project?rev=320474&view=rev
Log:
[clangd] Document highlights for clangd
Summary: Implementation of Document Highlights Request as described in
LSP.
Contributed by William Enright (nebiroth).
Author: ibiryukov
Date: Tue Dec 12 04:56:46 2017
New Revision: 320476
URL: http://llvm.org/viewvc/llvm-project?rev=320476&view=rev
Log:
[clangd] clang-format the code. NFC
Modified:
clang-tools-extra/trunk/clangd/fuzzer/ClangdFuzzer.cpp
clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp
Author: ibiryukov
Date: Tue Dec 12 06:15:01 2017
New Revision: 320482
URL: http://llvm.org/viewvc/llvm-project?rev=320482&view=rev
Log:
[clangd] Removed unused variable. NFC
Modified:
clang-tools-extra/trunk/clangd/ClangdUnit.cpp
Modified: clang-tools-extra/trunk/clangd/ClangdUnit.cpp
URL:
Author: ibiryukov
Date: Wed Dec 13 04:51:22 2017
New Revision: 320576
URL: http://llvm.org/viewvc/llvm-project?rev=320576&view=rev
Log:
[clangd] Implemented logging using Context
Reviewers: sammccall, ioeric, hokein
Reviewed By: sammccall
Subscribers: klimek, cfe-commits
Differential Revision:
Author: ibiryukov
Date: Wed Dec 13 04:53:16 2017
New Revision: 320577
URL: http://llvm.org/viewvc/llvm-project?rev=320577&view=rev
Log:
[clangd] clang-format the source code. NFC
Modified:
clang-tools-extra/trunk/clangd/index/Index.cpp
clang-tools-extra/trunk/clangd/index/Index.h
clan
Author: ibiryukov
Date: Wed Dec 13 05:43:47 2017
New Revision: 320578
URL: http://llvm.org/viewvc/llvm-project?rev=320578&view=rev
Log:
[clangd] Try to workaround MSVC compilation failure.
Modified:
clang-tools-extra/trunk/clangd/Context.h
Modified: clang-tools-extra/trunk/clangd/Context.h
U
Author: ibiryukov
Date: Wed Dec 13 07:42:59 2017
New Revision: 320591
URL: http://llvm.org/viewvc/llvm-project?rev=320591&view=rev
Log:
[clangd] Fix bool conversion operator of UniqueFunction
Usages of it were giving compiler errors because of the missing
explicit conversion.
Modified:
clang
Author: Ilya Biryukov
Date: 2023-11-10T17:12:24+01:00
New Revision: 18a0313149ea2d6134e566d9190ecede96e77afb
URL:
https://github.com/llvm/llvm-project/commit/18a0313149ea2d6134e566d9190ecede96e77afb
DIFF:
https://github.com/llvm/llvm-project/commit/18a0313149ea2d6134e566d9190ecede96e77afb.diff
@@ -11591,6 +11591,10 @@ def err_conflicting_aligned_options : Error <
def err_coro_invalid_addr_of_label : Error<
"the GNU address of label extension is not allowed in coroutines."
>;
+def err_coroutine_return_type : Error<
+ "function returns a coroutine return type %0 but
@@ -0,0 +1,99 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -std=c++20 -fsyntax-only
-verify -Wall -Wextra
+#include "Inputs/std-coroutine.h"
+
+using std::suspend_always;
+using std::suspend_never;
+
+
+template struct [[clang::coro_return_type]] Gen {
+ struct promis
@@ -11183,6 +11183,7 @@ class Sema final {
bool buildCoroutineParameterMoves(SourceLocation Loc);
VarDecl *buildCoroutinePromise(SourceLocation Loc);
void CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body);
+ void CheckCoroutineWrapper(FunctionDecl *FD);
@@ -15811,6 +15813,32 @@ static void diagnoseImplicitlyRetainedSelf(Sema &S) {
<< FixItHint::CreateInsertion(P.first, "self->");
}
+// Return whether FD is `promise_type::get_return_object`.
+bool isGetReturnObject(FunctionDecl *FD) {
+ if (!FD->getDeclName().isIden
@@ -11591,6 +11591,10 @@ def err_conflicting_aligned_options : Error <
def err_coro_invalid_addr_of_label : Error<
"the GNU address of label extension is not allowed in coroutines."
>;
+def err_coroutine_return_type : Error<
ilya-biryukov wrote:
Are there re
@@ -15811,6 +15813,32 @@ static void diagnoseImplicitlyRetainedSelf(Sema &S) {
<< FixItHint::CreateInsertion(P.first, "self->");
}
+// Return whether FD is `promise_type::get_return_object`.
+bool isGetReturnObject(FunctionDecl *FD) {
+ if (!FD->getDeclName().isIden
@@ -7482,3 +7482,51 @@ generation of the other destruction cases, optimizing
the above `foo.destroy` to
}];
}
+
+
+def CoroReturnTypeAndWrapperDoc : Documentation {
+ let Category = DocCatDecl;
+ let Content = [{
+The ``coro_return_type`` attribute should be marked on a C
@@ -10088,9 +10088,13 @@ static bool allowAmbiguity(ASTContext &Context, const
FunctionDecl *F1,
const FunctionDecl *F2) {
if (declaresSameEntity(F1, F2))
return true;
- if (F1->isTemplateInstantiation() && F2->isTemplateInstantiation() &&
-
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/72213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -10088,9 +10088,13 @@ static bool allowAmbiguity(ASTContext &Context, const
FunctionDecl *F1,
const FunctionDecl *F2) {
if (declaresSameEntity(F1, F2))
return true;
- if (F1->isTemplateInstantiation() && F2->isTemplateInstantiation() &&
-
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/72213
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -10088,9 +10088,13 @@ static bool allowAmbiguity(ASTContext &Context, const
FunctionDecl *F1,
const FunctionDecl *F2) {
if (declaresSameEntity(F1, F2))
return true;
- if (F1->isTemplateInstantiation() && F2->isTemplateInstantiation() &&
-
https://github.com/ilya-biryukov created
https://github.com/llvm/llvm-project/pull/74490
... and only look at equivalence of substituted expressions, not results of
constraint satisfaction.
Fixes #74314.
There is already some existing machinery for that in `TemplateInstantiator` and
`Sema` e
ilya-biryukov wrote:
@cor3ntin I have tried getting some lambda examples, but because lambda
produces a unique type every time, I don't see how I can get a matching
declaration with a lambda inside `requires` clause.
https://github.com/llvm/llvm-project/pull/74490
_
@@ -4077,6 +4084,7 @@ Sema::SubstExpr(Expr *E, const
MultiLevelTemplateArgumentList &TemplateArgs) {
TemplateInstantiator Instantiator(*this, TemplateArgs,
SourceLocation(),
DeclarationName());
+ Instan
@@ -4077,6 +4084,7 @@ Sema::SubstExpr(Expr *E, const
MultiLevelTemplateArgumentList &TemplateArgs) {
TemplateInstantiator Instantiator(*this, TemplateArgs,
SourceLocation(),
DeclarationName());
+ Instan
https://github.com/ilya-biryukov commented:
This is useful to us to have attributes on lambdas early in C++20 mode before
switching to C++23. I only have a nitpick about naming and happy to approve
after its addressed.
And let's give @AaronBallman a few days to jump in.
https://github.com/llv
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/74553
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1126,6 +1126,8 @@ def FutureAttrs :
DiagGroup<"future-attribute-extensions", [CXX14Attrs,
CXX17Attrs,
CXX20Attrs]>;
+def CXX23AttrsOnLambda : DiagGroup<
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/74553
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -11591,6 +11591,10 @@ def err_conflicting_aligned_options : Error <
def err_coro_invalid_addr_of_label : Error<
"the GNU address of label extension is not allowed in coroutines."
>;
+def err_coroutine_return_type : Error<
ilya-biryukov wrote:
This makes s
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/71945
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilya-biryukov commented:
Thanks, I have a few small NIT (but feel free to ignore any number of them).
I do have a major question about the use of `getCurFunction()->isCoroutine()`,
see the corresponding comment.
https://github.com/llvm/llvm-project/pull/71945
___
@@ -15811,6 +15813,20 @@ static void diagnoseImplicitlyRetainedSelf(Sema &S) {
<< FixItHint::CreateInsertion(P.first, "self->");
}
+void Sema::CheckCoroutineWrapper(FunctionDecl *FD) {
+ if (!FD || getCurFunction()->isCoroutine())
+return;
+ RecordDecl *RD = FD
@@ -0,0 +1,117 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -std=c++20 -fsyntax-only
-verify -Wall -Wextra
+#include "Inputs/std-coroutine.h"
+
+using std::suspend_always;
+using std::suspend_never;
+
+
+template struct [[clang::coro_return_type]] Gen {
+ struct promi
@@ -15811,6 +15813,20 @@ static void diagnoseImplicitlyRetainedSelf(Sema &S) {
<< FixItHint::CreateInsertion(P.first, "self->");
}
+void Sema::CheckCoroutineWrapper(FunctionDecl *FD) {
+ if (!FD || getCurFunction()->isCoroutine())
ilya-biryukov wrot
@@ -0,0 +1,117 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -std=c++20 -fsyntax-only
-verify -Wall -Wextra
+#include "Inputs/std-coroutine.h"
+
+using std::suspend_always;
+using std::suspend_never;
+
+
+template struct [[clang::coro_return_type]] Gen {
+ struct promi
@@ -300,6 +300,11 @@ Attribute Changes in Clang
to reduce the size of the destroy functions for coroutines which are known to
be destroyed after having reached the final suspend point.
+- Clang now introduced ``[[clang::coro_return_type]]`` and
``[[clang::coro_wrapper]]``
401 - 500 of 1460 matches
Mail list logo