HLSL: Allow macro expansions to create the 'defined' operator.
This commit is contained in:
parent
3fcb42cfa6
commit
4d5bcd3162
4 changed files with 80 additions and 1 deletions
|
|
@ -393,7 +393,7 @@ int TPpContext::eval(int token, int precedence, bool shortCircuit, int& res, boo
|
|||
TSourceLoc loc = ppToken->loc; // because we sometimes read the newline before reporting the error
|
||||
if (token == PpAtomIdentifier) {
|
||||
if (strcmp("defined", ppToken->name) == 0) {
|
||||
if (isMacroInput()) {
|
||||
if (! parseContext.isReadingHLSL() && isMacroInput()) {
|
||||
if (parseContext.relaxedErrors())
|
||||
parseContext.ppWarn(ppToken->loc, "nonportable when expanded from macros for preprocessor expression",
|
||||
"defined", "");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue