[cfe-dev] Help with Command-Line Validation

Uri Mann via cfe-dev cfe-dev at lists.llvm.org
Tue Nov 24 08:47:52 PST 2015


I'm updating from CLANG 3.5.0 to 3.7.0. In the 3.5.0 version I have a std::string option with validation.
struct ProjectParser : public llvm::cl::parser<std::string> {
    bool parse(llvm::cl::Option& option,
                          llvm::StringRef argName,
                          const std::string& argValue,
                          std::string& project);
};

llvm::cl::opt<std::string, false, ProjectParser> Project;

This no longer compiles since the llvm::cl::parser<std::string> template was specialized and made 'final'. The docs don't address this issue.

Any help will be appreciated. Thanks in advance.
-Uri

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151124/01183903/attachment.html>


More information about the cfe-dev mailing list