MCPcopy Create free account
hub / github.com/apple/foundationdb / verify

Method verify

flow/CodeProbe.cpp:116–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114 }
115
116 void verify() const {
117 std::map<std::pair<std::string_view, std::string_view>, ICodeProbe const*> comments;
118 for (auto probe : codeProbes) {
119 auto file = probe.first.file;
120 auto comment = probe.second->comment();
121 auto commentEntry = std::make_pair(file, std::string_view(comment));
122 ASSERT(file == probe.second->filename());
123 auto iter = comments.find(commentEntry);
124 if (iter != comments.end() && probe.second->line() != iter->second->line()) {
125 fmt::print("ERROR ({}:{}): {} isn't unique in file {}. Previously seen here: {}:{}\n",
126 probe.first.file,
127 probe.first.line,
128 iter->first.second,
129 probe.second->filename(),
130 iter->second->filename(),
131 iter->second->line());
132 // ICodeProbe const& fst = *iter->second;
133 // ICodeProbe const& snd = *probe.second;
134 // fmt::print("\t1st Type: {}\n", boost::core::demangle(typeid(fst).name()));
135 // fmt::print("\t2nd Type: {}\n", boost::core::demangle(typeid(snd).name()));
136 // fmt::print("\n");
137 // fmt::print("\t1st Comment: {}\n", fst.comment());
138 // fmt::print("\t2nd Comment: {}\n", snd.comment());
139 // fmt::print("\n");
140 // fmt::print("\t1st CompUnit: {}\n", fst.compilationUnit());
141 // fmt::print("\t2nd CompUnit: {}\n", snd.compilationUnit());
142 // fmt::print("\n");
143 } else {
144 comments.emplace(commentEntry, probe.second);
145 }
146 }
147 }
148
149 void printXML() const {
150 verify();

Callers

nothing calls this directly

Calls 6

commentMethod · 0.80
lineMethod · 0.80
printFunction · 0.50
filenameMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected