Fixed fix for #7042 - support hexadecimal digits
This commit is contained in:
parent
7112725d38
commit
52be380ef0
|
@ -662,7 +662,7 @@ std::string Preprocessor::removeComments(const std::string &str, const std::stri
|
|||
}
|
||||
|
||||
// C++14 digit separators
|
||||
if (ch == '\'' && std::isdigit(previous))
|
||||
if (ch == '\'' && std::isxdigit(previous))
|
||||
; // Just skip it.
|
||||
|
||||
// String or char constants..
|
||||
|
|
|
@ -338,8 +338,10 @@ private:
|
|||
}
|
||||
|
||||
void readCode5() {
|
||||
const char code[] = "int i = 0x1000'00;";
|
||||
ASSERT_EQUALS("int i = 0x100000;", preprocessorRead(code));
|
||||
ASSERT_EQUALS("int i = 0x100000;", preprocessorRead("int i = 0x1000'00;"));
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
ASSERT_EQUALS("int i = 0x0F0FFFFF;", preprocessorRead("int i = 0x0F0F'FFFF;"));
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue