Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/clangd/Selection.cpp | ||
---|---|---|
39 | this deserves a comment about what we're tracking and why. | |
40 | just realized a slightly more elegant(?) way to measure this: Metric SelectionUsedRecovery("selection_recovery", Distribution); ... for (...) { if (...) { SelectionUsedRecovery.record(1); // used return; } } SelectionUsedRecovery.record(0); // not used Now the count is the total number of selections, and the average is the fraction that used recovery. | |
48 | FWIW, my original RecoveryExpr proposal included a StmtClass for the type of expr that was "supposed" to be here. (e.g. CallExpr for a failed overload resolution). It was dropped to keep the scope minimal. I'm not sure if that exact idea generalizes to all the places that RecoveryExpr is used, but it would be great to somehow keep track of the semantic context where recovery was used. And I think it would make a great label here. Maybe this would be better as a dedicated enum, or just a string literal (e.g. "variable initializer"). Anyway, an idea for another time... | |
48 | not clear quite what you mean by this - the *actual* type isn't a suitable label, as it's a large unbounded set. I'm not sure this is a FIXME, it seems most likely we decide not to fix it. |
clang-tools-extra/clangd/unittests/SelectionTests.cpp | ||
---|---|---|
454 | delete commented code |
this deserves a comment about what we're tracking and why.
Like "measure the fraction of selections that were enabled by recovery AST"