[clang] [clang][clang-scan-deps] Add LangOptions::AllowLiteralDigitSeparator to fix (#88896) (PR #158420)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 16 17:56:53 PDT 2025
================
@@ -1000,6 +1001,21 @@ int z = 128'78;
EXPECT_STREQ("#include <test.h>\n", Out.data());
}
+TEST(MinimizeSourceToDependencyDirectivesTest, CharacterLiteralInPreprocessor) {
+ SmallVector<char, 128> Out;
+ SmallVector<dependency_directives_scan::Token, 8> Tokens;
+ SmallVector<Directive, 4> Directives;
+
+ StringRef Source = R"(
+ #if 1'2 == 12
----------------
shafik wrote:
I wonder do we have the same problem w/ binary literals which was also brought in via C++14 e.g. `0b10` and then we have the `z` suffix which came in w/ C++23.
https://github.com/llvm/llvm-project/pull/158420
More information about the cfe-commits
mailing list