================ @@ -125,25 +123,42 @@ llvm::Error ScopifyEnum::addClassKeywordToDeclarations() { } llvm::Error ScopifyEnum::scopifyEnumValues() { - std::string PrefixToInsert(D->getName()); - PrefixToInsert += "::"; + StringRef EnumName(D->getName()); + bool StripPrefix = true; + for (auto E : D->enumerators()) { + if (!E->getName().starts_with(EnumName)) { + StripPrefix = false; + break; + } + } for (auto E : D->enumerators()) { ---------------- 5chmidti wrote:
This is not in your changed lines, but please change this `auto` to `const EnumConstantDecl *` as well. https://github.com/llvm/llvm-project/pull/83412 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits