Skip to content

Commit 9a9d663

Browse files
committed
add assert
1 parent 13fdc4b commit 9a9d663

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/lib/Lex/PPExpressions.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,8 @@ std::optional<unsigned> Preprocessor::getStdLibCxxVersion() {
10191019
}
10201020

10211021
bool Preprocessor::NeedsStdLibCxxWorkaroundBefore(unsigned FixedVersion) {
1022+
assert(FixedVersion >= 2000'00'00 && FixedVersion <= 2100'00'00 &&
1023+
"invalid value for __GLIBCXX__");
10221024
std::optional<unsigned> Ver = getStdLibCxxVersion();
10231025
if (!Ver)
10241026
return false;

0 commit comments

Comments
 (0)