mirror of
https://github.com/KhronosGroup/glslang
synced 2024-09-18 19:59:54 +00:00
Warning for #pragma once. GLSL and HLSL. Addresses #824.
This commit is contained in:
parent
b5bf536b5f
commit
23ea3db3e5
@ -0,0 +1,2 @@
|
||||
WARNING: 0:10: '#pragma once' : not implemented
|
||||
|
@ -7,6 +7,8 @@
|
||||
|
||||
#pragma undefined_pragma(x,4)
|
||||
|
||||
#pragma once
|
||||
|
||||
int main(){
|
||||
}
|
||||
|
||||
|
@ -7,5 +7,7 @@
|
||||
|
||||
#pragma undefined_pragma(x, 4)
|
||||
|
||||
#pragma once
|
||||
|
||||
int main() {
|
||||
}
|
||||
|
@ -266,6 +266,8 @@ void TParseContext::handlePragma(const TSourceLoc& loc, const TVector<TString>&
|
||||
if (tokens.size() != 1)
|
||||
error(loc, "extra tokens", "#pragma", "");
|
||||
intermediate.setUseStorageBuffer();
|
||||
} else if (tokens[0].compare("once") == 0) {
|
||||
warn(loc, "not implemented", "#pragma once", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -550,6 +550,13 @@ void HlslParseContext::handlePragma(const TSourceLoc& loc, const TVector<TString
|
||||
warn(loc, "unknown pack_matrix pragma value", tokens[2].c_str(), "");
|
||||
globalUniformDefaults.layoutMatrix = globalBufferDefaults.layoutMatrix = ElmRowMajor;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle once
|
||||
if (lowerTokens[0] == "once") {
|
||||
warn(loc, "not implemented", "#pragma once", "");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user