[PATCH] D135972: [clang-format] Don't crash on malformed preprocessor conditions
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 24 21:10:30 PDT 2022
owenpan added inline comments.
================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1217
+ assert(PPBranchLevel >= -1);
+ if (PPBranchLevel <= -1)
+ conditionalCompilationStart(/*Unreachable=*/true);
----------------
HazardyKnusperkeks wrote:
> You assert >= -1, that means this has to be == -1.
Yep, as I suggested above.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135972/new/
https://reviews.llvm.org/D135972
More information about the cfe-commits
mailing list