mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 01:16:06 +00:00
[clang][dataflow] Add an operator<<
for OptionalTypeIdentifier
.
When tests fail in UncheckedOptionalAccessModelTest.cpp, this prints the name of the optional type instead of a blob of hex. Reviewed By: ymandel Differential Revision: https://reviews.llvm.org/D155788
This commit is contained in:
parent
781beb3de5
commit
477ee05f83
@ -1267,6 +1267,12 @@ struct OptionalTypeIdentifier {
|
||||
std::string TypeName;
|
||||
};
|
||||
|
||||
static raw_ostream &operator<<(raw_ostream &OS,
|
||||
const OptionalTypeIdentifier &TypeId) {
|
||||
OS << TypeId.NamespaceName << "::" << TypeId.TypeName;
|
||||
return OS;
|
||||
}
|
||||
|
||||
class UncheckedOptionalAccessTest
|
||||
: public ::testing::TestWithParam<OptionalTypeIdentifier> {
|
||||
protected:
|
||||
|
Loading…
x
Reference in New Issue
Block a user