Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
54a28de4
Commit
54a28de4
authored
Oct 13, 2016
by
baldurk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give all complex lambdas an explicit return type
parent
e3aa654c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
ParseContextBase.cpp
glslang/MachineIndependent/ParseContextBase.cpp
+1
-1
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+2
-2
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+5
-5
No files found.
glslang/MachineIndependent/ParseContextBase.cpp
View file @
54a28de4
...
...
@@ -253,7 +253,7 @@ const TFunction* TParseContextBase::selectFunction(
return
viableCandidates
.
front
();
// 4. find best...
auto
betterParam
=
[
&
call
,
&
better
](
const
TFunction
&
can1
,
const
TFunction
&
can2
){
auto
betterParam
=
[
&
call
,
&
better
](
const
TFunction
&
can1
,
const
TFunction
&
can2
)
->
bool
{
// is call -> can2 better than call -> can1 for any parameter
bool
hasBetterParam
=
false
;
for
(
int
param
=
0
;
param
<
call
.
getParamCount
();
++
param
)
{
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
54a28de4
...
...
@@ -4907,7 +4907,7 @@ const TFunction* TParseContext::findFunction400(const TSourceLoc& loc, const TFu
symbolTable
.
findFunctionNameList
(
call
.
getMangledName
(),
candidateList
,
builtIn
);
// can 'from' convert to 'to'?
const
auto
convertible
=
[
this
](
const
TType
&
from
,
const
TType
&
to
)
{
const
auto
convertible
=
[
this
](
const
TType
&
from
,
const
TType
&
to
)
->
bool
{
if
(
from
==
to
)
return
true
;
if
(
from
.
isArray
()
||
to
.
isArray
()
||
!
from
.
sameElementShape
(
to
))
...
...
@@ -4918,7 +4918,7 @@ const TFunction* TParseContext::findFunction400(const TSourceLoc& loc, const TFu
// Is 'to2' a better conversion than 'to1'?
// Ties should not be considered as better.
// Assumes 'convertible' already said true.
const
auto
better
=
[](
const
TType
&
from
,
const
TType
&
to1
,
const
TType
&
to2
)
{
const
auto
better
=
[](
const
TType
&
from
,
const
TType
&
to1
,
const
TType
&
to2
)
->
bool
{
// 1. exact match
if
(
from
==
to2
)
return
from
!=
to1
;
...
...
hlsl/hlslParseHelper.cpp
View file @
54a28de4
...
...
@@ -1001,7 +1001,7 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
const
auto
getMember
=
[
&
](
bool
flatten
,
TIntermTyped
*
node
,
const
TVector
<
TVariable
*>&
memberVariables
,
int
member
,
TOperator
op
,
const
TType
&
memberType
)
{
TOperator
op
,
const
TType
&
memberType
)
->
TIntermTyped
*
{
TIntermTyped
*
subTree
;
if
(
flatten
)
subTree
=
intermediate
.
addSymbol
(
*
memberVariables
[
member
]);
...
...
@@ -2693,7 +2693,7 @@ void HlslParseContext::handleRegister(const TSourceLoc& loc, TQualifier& qualifi
// space
unsigned
int
setNumber
;
const
auto
crackSpace
=
[
&
]()
{
const
auto
crackSpace
=
[
&
]()
->
bool
{
const
int
spaceLen
=
5
;
if
(
spaceDesc
->
size
()
<
spaceLen
+
1
)
return
false
;
...
...
@@ -3889,7 +3889,7 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, const TFu
symbolTable
.
findFunctionNameList
(
call
.
getMangledName
(),
candidateList
,
builtIn
);
// can 'from' convert to 'to'?
const
auto
convertible
=
[
this
](
const
TType
&
from
,
const
TType
&
to
)
{
const
auto
convertible
=
[
this
](
const
TType
&
from
,
const
TType
&
to
)
->
bool
{
if
(
from
==
to
)
return
true
;
...
...
@@ -3916,7 +3916,7 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, const TFu
// Is 'to2' a better conversion than 'to1'?
// Ties should not be considered as better.
// Assumes 'convertible' already said true.
const
auto
better
=
[](
const
TType
&
from
,
const
TType
&
to1
,
const
TType
&
to2
)
{
const
auto
better
=
[](
const
TType
&
from
,
const
TType
&
to1
,
const
TType
&
to2
)
->
bool
{
// exact match is always better than mismatch
if
(
from
==
to2
)
return
from
!=
to1
;
...
...
@@ -3943,7 +3943,7 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, const TFu
// - 32 vs. 64 bit (or width in general)
// - bool vs. non bool
// - signed vs. not signed
const
auto
linearize
=
[](
const
TBasicType
&
basicType
)
{
const
auto
linearize
=
[](
const
TBasicType
&
basicType
)
->
int
{
switch
(
basicType
)
{
case
EbtBool
:
return
1
;
case
EbtInt
:
return
10
;
...
...
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