sema: accept an array literal of enum case references as compile-time constant

This commit is contained in:
Xi Ge
2022-03-24 20:07:23 -07:00
parent fbbfb708ec
commit 6206d7cc9d
6 changed files with 51 additions and 23 deletions

View File

@@ -2265,7 +2265,7 @@ class ConstExtractor: public ASTWalker {
void record(Expr *E, Expr *ValueProvider, StringRef ReferecedD = "") {
std::string content;
llvm::raw_string_ostream os(content);
ValueProvider->printConstExprValue(&os);
ValueProvider->printConstExprValue(&os, nullptr);
assert(!content.empty());
auto buffered = SCtx.buffer(content);
switch(ValueProvider->getKind()) {