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
91b977e1
Commit
91b977e1
authored
Jul 25, 2015
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #39: Prevent problem of inserting a zero-length symbol after cascading errors.
parent
aead93aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+7
-6
No files found.
glslang/MachineIndependent/ParseHelper.cpp
View file @
91b977e1
...
@@ -365,7 +365,7 @@ void C_DECL TParseContext::error(TSourceLoc loc, const char* szReason, const cha
...
@@ -365,7 +365,7 @@ void C_DECL TParseContext::error(TSourceLoc loc, const char* szReason, const cha
const
char
*
szExtraInfoFormat
,
...)
const
char
*
szExtraInfoFormat
,
...)
{
{
if
(
messages
&
EShMsgOnlyPreprocessor
)
if
(
messages
&
EShMsgOnlyPreprocessor
)
return
;
return
;
va_list
args
;
va_list
args
;
va_start
(
args
,
szExtraInfoFormat
);
va_start
(
args
,
szExtraInfoFormat
);
outputMessage
(
loc
,
szReason
,
szToken
,
szExtraInfoFormat
,
EPrefixError
,
args
);
outputMessage
(
loc
,
szReason
,
szToken
,
szExtraInfoFormat
,
EPrefixError
,
args
);
...
@@ -1626,12 +1626,13 @@ void TParseContext::variableCheck(TIntermTyped*& nodePtr)
...
@@ -1626,12 +1626,13 @@ void TParseContext::variableCheck(TIntermTyped*& nodePtr)
error
(
symbol
->
getLoc
(),
"undeclared identifier"
,
symbol
->
getName
().
c_str
(),
""
);
error
(
symbol
->
getLoc
(),
"undeclared identifier"
,
symbol
->
getName
().
c_str
(),
""
);
// Add to symbol table to prevent future error messages on the same name
// Add to symbol table to prevent future error messages on the same name
if
(
symbol
->
getName
().
size
()
>
0
)
{
TVariable
*
fakeVariable
=
new
TVariable
(
&
symbol
->
getName
(),
TType
(
EbtFloat
));
symbolTable
.
insert
(
*
fakeVariable
);
TVariable
*
fakeVariable
=
new
TVariable
(
&
symbol
->
getName
(),
TType
(
EbtFloat
));
// substitute a symbol node for this new variable
symbolTable
.
insert
(
*
fakeVariable
);
nodePtr
=
intermediate
.
addSymbol
(
*
fakeVariable
,
symbol
->
getLoc
());
}
// substitute a symbol node for this new variable
nodePtr
=
intermediate
.
addSymbol
(
*
fakeVariable
,
symbol
->
getLoc
());
}
else
{
}
else
{
switch
(
symbol
->
getQualifier
().
storage
)
{
switch
(
symbol
->
getQualifier
().
storage
)
{
case
EvqPointCoord
:
case
EvqPointCoord
:
...
...
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