It appears that the cl::bits options are not used anywhere in-tree. In
the recent addition to add Callback's to the options, the Callback was
missing from this one. This fixes it by adding the same code from the
other classes.
It also adds a simple test, of sorts, just to make sure these continue
compiling.
apply(this, Ms...);
done();
}
+
+ void setCallback(
+ std::function<void(const typename ParserClass::parser_data_type &)> CB) {
+ Callback = CB;
+ }
+
+ std::function<void(const typename ParserClass::parser_data_type &)> Callback =
+ [](const typename ParserClass::parser_data_type &) {};
};
//===----------------------------------------------------------------------===//
cl::ResetAllOptionOccurrences();
}
+
+enum Enum { Val1, Val2 };
+static cl::bits<Enum> ExampleBits(
+ cl::desc("An example cl::bits to ensure it compiles"),
+ cl::values(
+ clEnumValN(Val1, "bits-val1", "The Val1 value"),
+ clEnumValN(Val1, "bits-val2", "The Val2 value")));
+
} // anonymous namespace