Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
cfd813e4
Commit
cfd813e4
authored
Apr 21, 2017
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix clang 5 build and warnings.
parent
bea712bd
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
13 additions
and
13 deletions
+13
-13
lexer.c++
c++/src/capnp/compiler/lexer.c++
+3
-3
parser.c++
c++/src/capnp/compiler/parser.c++
+3
-3
ez-rpc.c++
c++/src/capnp/ez-rpc.c++
+1
-1
membrane.h
c++/src/capnp/membrane.h
+2
-2
rpc.c++
c++/src/capnp/rpc.c++
+1
-1
async-test.c++
c++/src/kj/async-test.c++
+1
-1
async.c++
c++/src/kj/async.c++
+1
-1
http.c++
c++/src/kj/compat/http.c++
+1
-1
No files found.
c++/src/capnp/compiler/lexer.c++
View file @
cfd813e4
...
...
@@ -152,7 +152,7 @@ Lexer::Lexer(Orphanage orphanageParam, ErrorReporter& errorReporter)
auto
&
commaDelimitedList
=
arena
.
copy
(
p
::
transform
(
p
::
sequence
(
tokenSequence
,
p
::
many
(
p
::
sequence
(
p
::
exactChar
<
','
>
(),
tokenSequence
))),
[
this
](
kj
::
Array
<
Orphan
<
Token
>>&&
first
,
kj
::
Array
<
kj
::
Array
<
Orphan
<
Token
>>>&&
rest
)
[](
kj
::
Array
<
Orphan
<
Token
>>&&
first
,
kj
::
Array
<
kj
::
Array
<
Orphan
<
Token
>>>&&
rest
)
->
kj
::
Array
<
kj
::
Array
<
Orphan
<
Token
>>>
{
if
(
first
==
nullptr
&&
rest
==
nullptr
)
{
// Completely empty list.
...
...
@@ -231,7 +231,7 @@ Lexer::Lexer(Orphanage orphanageParam, ErrorReporter& errorReporter)
p
::
oneOf
(
sequence
(
p
::
exactChar
<
'\xff'
>
(),
p
::
exactChar
<
'\xfe'
>
()),
sequence
(
p
::
exactChar
<
'\xfe'
>
(),
p
::
exactChar
<
'\xff'
>
()),
sequence
(
p
::
exactChar
<
'\x00'
>
())),
[
this
,
&
errorReporter
](
Location
loc
)
->
kj
::
Maybe
<
Orphan
<
Token
>>
{
[
&
errorReporter
](
Location
loc
)
->
kj
::
Maybe
<
Orphan
<
Token
>>
{
errorReporter
.
addError
(
loc
.
begin
(),
loc
.
end
(),
"Non-UTF-8 input detected. Cap'n Proto schema files must be UTF-8 text."
);
return
nullptr
;
...
...
@@ -275,7 +275,7 @@ Lexer::Lexer(Orphanage orphanageParam, ErrorReporter& errorReporter)
));
auto
&
statement
=
arena
.
copy
(
p
::
transformWithLocation
(
p
::
sequence
(
tokenSequence
,
statementEnd
),
[
this
](
Location
loc
,
kj
::
Array
<
Orphan
<
Token
>>&&
tokens
,
Orphan
<
Statement
>&&
statement
)
{
[](
Location
loc
,
kj
::
Array
<
Orphan
<
Token
>>&&
tokens
,
Orphan
<
Statement
>&&
statement
)
{
auto
builder
=
statement
.
get
();
auto
tokensBuilder
=
builder
.
initTokens
(
tokens
.
size
());
for
(
uint
i
=
0
;
i
<
tokens
.
size
();
i
++
)
{
...
...
c++/src/capnp/compiler/parser.c++
View file @
cfd813e4
...
...
@@ -599,7 +599,7 @@ CapnpParser::CapnpParser(Orphanage orphanageParam, ErrorReporter& errorReporterP
builder
.
initApplication
().
adoptParams
(
kj
::
mv
(
params
.
value
));
return
result
;
})))),
[
this
](
Orphan
<
Expression
>&&
base
,
kj
::
Array
<
Orphan
<
Expression
>>&&
suffixes
)
[](
Orphan
<
Expression
>&&
base
,
kj
::
Array
<
Orphan
<
Expression
>>&&
suffixes
)
->
Orphan
<
Expression
>
{
// Apply all the suffixes to the base expression.
uint
startByte
=
base
.
getReader
().
getStartByte
();
...
...
@@ -773,7 +773,7 @@ CapnpParser::CapnpParser(Orphanage orphanageParam, ErrorReporter& errorReporterP
// Parse an ordinal followed by an optional colon, or no ordinal but require a colon.
auto
&
ordinalOrColon
=
arena
.
copy
(
p
::
oneOf
(
p
::
transform
(
p
::
sequence
(
parsers
.
ordinal
,
p
::
optional
(
op
(
"!"
)),
p
::
optional
(
op
(
":"
))),
[
this
](
Orphan
<
LocatedInteger
>&&
ordinal
,
[](
Orphan
<
LocatedInteger
>&&
ordinal
,
kj
::
Maybe
<
kj
::
Tuple
<>>
exclamation
,
kj
::
Maybe
<
kj
::
Tuple
<>>
colon
)
->
kj
::
Tuple
<
kj
::
Maybe
<
Orphan
<
LocatedInteger
>>
,
bool
,
bool
>
{
...
...
@@ -966,7 +966,7 @@ CapnpParser::CapnpParser(Orphanage orphanageParam, ErrorReporter& errorReporterP
auto
&
annotationTarget
=
arena
.
copy
(
p
::
oneOf
(
identifier
,
p
::
transformWithLocation
(
op
(
"*"
),
[
this
](
kj
::
parse
::
Span
<
List
<
Token
>::
Reader
::
Iterator
>
location
)
{
[](
kj
::
parse
::
Span
<
List
<
Token
>::
Reader
::
Iterator
>
location
)
{
// Hacky...
return
Located
<
Text
::
Reader
>
(
"*"
,
location
.
begin
()
->
getStartByte
(),
...
...
c++/src/capnp/ez-rpc.c++
View file @
cfd813e4
...
...
@@ -126,7 +126,7 @@ struct EzRpcClient::Impl {
:
context
(
EzRpcContext
::
getThreadLocal
()),
setupPromise
(
context
->
getIoProvider
().
getNetwork
()
.
parseAddress
(
serverAddress
,
defaultPort
)
.
then
([
readerOpts
](
kj
::
Own
<
kj
::
NetworkAddress
>&&
addr
)
{
.
then
([](
kj
::
Own
<
kj
::
NetworkAddress
>&&
addr
)
{
return
connectAttach
(
kj
::
mv
(
addr
));
}).
then
([
this
,
readerOpts
](
kj
::
Own
<
kj
::
AsyncIoStream
>&&
stream
)
{
clientContext
=
kj
::
heap
<
ClientContext
>
(
kj
::
mv
(
stream
),
...
...
c++/src/capnp/membrane.h
View file @
cfd813e4
...
...
@@ -161,13 +161,13 @@ template <typename ServerType>
typename
ServerType
::
Serves
::
Client
membrane
(
kj
::
Own
<
ServerType
>
inner
,
kj
::
Own
<
MembranePolicy
>
policy
)
{
return
membrane
(
Capability
::
Client
(
kj
::
mv
(
inner
)),
kj
::
mv
(
policy
))
.
castAs
<
typename
ServerType
::
Serves
::
Client
>
();
.
castAs
<
typename
ServerType
::
Serves
>
();
}
template
<
typename
ServerType
>
typename
ServerType
::
Serves
::
Client
reverseMembrane
(
kj
::
Own
<
ServerType
>
inner
,
kj
::
Own
<
MembranePolicy
>
policy
)
{
return
reverseMembrane
(
Capability
::
Client
(
kj
::
mv
(
inner
)),
kj
::
mv
(
policy
))
.
castAs
<
typename
ServerType
::
Serves
::
Client
>
();
.
castAs
<
typename
ServerType
::
Serves
>
();
}
namespace
_
{
// private
...
...
c++/src/capnp/rpc.c++
View file @
cfd813e4
...
...
@@ -983,7 +983,7 @@ private:
// Make a promise which resolves to `replacement` as soon as the `Disembargo` comes back.
auto
embargoPromise
=
paf
.
promise
.
then
(
kj
::
mvCapture
(
replacement
,
[
this
](
kj
::
Own
<
ClientHook
>&&
replacement
)
{
kj
::
mvCapture
(
replacement
,
[](
kj
::
Own
<
ClientHook
>&&
replacement
)
{
return
kj
::
mv
(
replacement
);
}));
...
...
c++/src/kj/async-test.c++
View file @
cfd813e4
...
...
@@ -167,7 +167,7 @@ TEST(Async, Chain) {
Promise
<
int
>
promise2
=
evalLater
([
&
]()
->
int
{
return
321
;
});
auto
promise3
=
promise
.
then
([
&
](
int
i
)
{
return
promise2
.
then
([
&
loop
,
i
](
int
j
)
{
return
promise2
.
then
([
i
](
int
j
)
{
return
i
+
j
;
});
});
...
...
c++/src/kj/async.c++
View file @
cfd813e4
...
...
@@ -735,7 +735,7 @@ Maybe<Own<Event>> ChainPromiseNode::fire() {
KJ_IF_MAYBE
(
exception
,
intermediate
.
exception
)
{
// There is an exception. If there is also a value, delete it.
kj
::
runCatchingExceptions
([
&
,
this
]()
{
intermediate
.
value
=
nullptr
;
});
kj
::
runCatchingExceptions
([
&
]()
{
intermediate
.
value
=
nullptr
;
});
// Now set step2 to a rejected promise.
inner
=
heap
<
ImmediateBrokenPromiseNode
>
(
kj
::
mv
(
*
exception
));
}
else
KJ_IF_MAYBE
(
value
,
intermediate
.
value
)
{
...
...
c++/src/kj/compat/http.c++
View file @
cfd813e4
...
...
@@ -1653,7 +1653,7 @@ public:
}
auto
timeoutPromise
=
server
.
timer
.
afterDelay
(
server
.
settings
.
pipelineTimeout
)
.
then
([
this
]()
{
return
false
;
});
.
then
([]()
{
return
false
;
});
auto
awaitPromise
=
httpInput
.
awaitNextMessage
();
return
timeoutPromise
.
exclusiveJoin
(
kj
::
mv
(
awaitPromise
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment