[PATCH] D125667: [pseudo] A basic implementation of compiling cxx grammar at build time.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 24 12:08:18 PDT 2022
hokein added inline comments.
================
Comment at: clang-tools-extra/pseudo/lib/cxx/CXX.cpp:17
+static const char *CxxBNF =
+#include "CXXBNF.inc"
+ ;
----------------
sammccall wrote:
> this is worth a try, but I think (some versions of?) MSVC don't like long string literals.
>
> Stackoverflow says 2k per "chunk" ("one" "two" "three") and 64k total.
> Integer arrays can be larger...
>
> So let's start with simple readable options, and make them progressively uglier if we hit limits.
ah, good point. And you're right -- the previous version raw string literal doesn't compile with MSVC v19 `<source>(397): error C2026: string too big, trailing characters truncated`. Changing to string chunks seems to work.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125667/new/
https://reviews.llvm.org/D125667
More information about the cfe-commits
mailing list