Skip to content

Commit 03b4a49

Browse files
committed
fixed #14357 - properly handle "!defined" in compound preprocessor checks [skip ci]
1 parent 9be339f commit 03b4a49

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/preprocessor.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,10 @@ static std::string readcondition(const simplecpp::Token *iftok, const std::set<s
432432
if (cond->op == '!') {
433433
if (!sameline(iftok,cond->next) || !cond->next->name)
434434
break;
435-
if (cond->next->str() == "defined")
435+
if (cond->next->str() == "defined") {
436+
cond = cond->next;
436437
continue;
438+
}
437439
configset.insert(cond->next->str() + "=0");
438440
continue;
439441
}

0 commit comments

Comments
 (0)