Add warning-suppression flag. Combined with relaxed errors, so an enum can be used instead of many bools.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20818 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
4055816bc9
commit
37827023c4
7 changed files with 26 additions and 17 deletions
|
|
@ -572,7 +572,7 @@ int PaIdentOrReserved(bool reserved, TParseContext& pc, int line, const char* te
|
|||
|
||||
pyylval->lex.line = line;
|
||||
pyylval->lex.string = NewPoolTString(text);
|
||||
if (pc.futureCompatibility) {
|
||||
if (pc.futureCompatibility && ! (pc.messages & EShMsgSuppressWarnings)) {
|
||||
pc.infoSink.info.message(EPrefixWarning, pyylval->lex.string->c_str(), yylineno);
|
||||
pc.infoSink.info.message(EPrefixWarning, "using future reserved keyword", yylineno);
|
||||
}
|
||||
|
|
@ -586,7 +586,7 @@ int PaES30ReservedFromGLSL(int version, TParseContext& pc, int line, const char*
|
|||
pc.profile != EEsProfile && pc.version < version) {
|
||||
pyylval->lex.line = yylineno;
|
||||
pyylval->lex.string = NewPoolTString(yytext);
|
||||
if (pc.futureCompatibility) {
|
||||
if (pc.futureCompatibility && ! (pc.messages & EShMsgSuppressWarnings)) {
|
||||
pc.infoSink.info.message(EPrefixWarning, pyylval->lex.string->c_str(), yylineno);
|
||||
pc.infoSink.info.message(EPrefixWarning, "future reserved word in ES 300 and keyword in GLSL", yylineno);
|
||||
}
|
||||
|
|
@ -609,7 +609,7 @@ int PaPrecisionKeyword(TParseContext& pc, int line, const char* text, YYSTYPE* p
|
|||
|
||||
pyylval->lex.line = line;
|
||||
pyylval->lex.string = NewPoolTString(text);
|
||||
if (pc.futureCompatibility) {
|
||||
if (pc.futureCompatibility && ! (pc.messages & EShMsgSuppressWarnings)) {
|
||||
pc.infoSink.info.message(EPrefixWarning, pyylval->lex.string->c_str(), yylineno);
|
||||
pc.infoSink.info.message(EPrefixWarning, "using ES precision qualifier keyword", yylineno);
|
||||
}
|
||||
|
|
@ -624,7 +624,7 @@ int PaMatNxM(TParseContext& pc, int line, const char* text, YYSTYPE* pyylval, in
|
|||
|
||||
pyylval->lex.line = line;
|
||||
pyylval->lex.string = NewPoolTString(text);
|
||||
if (pc.futureCompatibility) {
|
||||
if (pc.futureCompatibility && ! (pc.messages & EShMsgSuppressWarnings)) {
|
||||
pc.infoSink.info.message(EPrefixWarning, pyylval->lex.string->c_str(), yylineno);
|
||||
pc.infoSink.info.message(EPrefixWarning, "using future non-square matrix type keyword", yylineno);
|
||||
}
|
||||
|
|
@ -644,7 +644,7 @@ int PaDMat(TParseContext& pc, int line, const char* text, YYSTYPE* pyylval, int
|
|||
|
||||
pyylval->lex.line = line;
|
||||
pyylval->lex.string = NewPoolTString(text);
|
||||
if (pc.futureCompatibility) {
|
||||
if (pc.futureCompatibility && ! (pc.messages & EShMsgSuppressWarnings)) {
|
||||
pc.infoSink.info.message(EPrefixWarning, pyylval->lex.string->c_str(), yylineno);
|
||||
pc.infoSink.info.message(EPrefixWarning, "using future type keyword", yylineno);
|
||||
}
|
||||
|
|
@ -695,7 +695,7 @@ void CPPWarningToInfoLog(const char *msg)
|
|||
{
|
||||
TParseContext& pc = *((TParseContext *)cpp->pC);
|
||||
|
||||
if (! pc.relaxedChecking)
|
||||
if (! (pc.messages & EShMsgSuppressWarnings))
|
||||
pc.infoSink.info.message(EPrefixWarning, msg, yylineno);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue