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
78a5a0d7
Commit
78a5a0d7
authored
Jul 20, 2015
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Front end: Prevent use of a block name, which has no other use in a shader.
parent
68965c0f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+10
-2
No files found.
glslang/MachineIndependent/ParseHelper.cpp
View file @
78a5a0d7
...
@@ -448,8 +448,16 @@ TIntermTyped* TParseContext::handleVariable(TSourceLoc loc, TSymbol* symbol, con
...
@@ -448,8 +448,16 @@ TIntermTyped* TParseContext::handleVariable(TSourceLoc loc, TSymbol* symbol, con
// The symbol table search was done in the lexical phase.
// The symbol table search was done in the lexical phase.
// See if it was a variable.
// See if it was a variable.
variable
=
symbol
?
symbol
->
getAsVariable
()
:
0
;
variable
=
symbol
?
symbol
->
getAsVariable
()
:
0
;
if
(
symbol
&&
!
variable
)
if
(
variable
)
{
error
(
loc
,
"variable name expected"
,
string
->
c_str
(),
""
);
if
((
variable
->
getType
().
getBasicType
()
==
EbtBlock
||
variable
->
getType
().
getBasicType
()
==
EbtStruct
)
&&
variable
->
getType
().
getStruct
()
==
nullptr
)
{
error
(
loc
,
"cannot be used (maybe an instance name is needed)"
,
string
->
c_str
(),
""
);
variable
=
nullptr
;
}
}
else
{
if
(
symbol
)
error
(
loc
,
"variable name expected"
,
string
->
c_str
(),
""
);
}
// Recovery, if it wasn't found or was not a variable.
// Recovery, if it wasn't found or was not a variable.
if
(
!
variable
)
if
(
!
variable
)
...
...
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