Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Do we have any test coverage for this change? IIRC, this was one we couldn't figure out how to trigger?
lib/AST/ASTDumper.cpp | ||
---|---|---|
637 ↗ | (On Diff #181908) | Extra whitespace at the start of the string literal, or is that intentional? Also, do we want to standardize on <<<NULL>>> with three brackets instead of two? |
642 ↗ | (On Diff #181908) | You can drop getNumParams() here -- if param_begin() returns a non-null value, getNumParams() must return a non-zero value. (param_begin() is implemented in terms of parameters(), which calls getNumParams() when setting up the returned ArrayRef.) |
lib/AST/ASTDumper.cpp | ||
---|---|---|
637 ↗ | (On Diff #181908) | Ah, I understand the whitespace now, so that was intentional I believe. Question remains about whether we want to also switch to use <<< consistently remains though. |
lib/AST/ASTDumper.cpp | ||
---|---|---|
642 ↗ | (On Diff #181908) | It seems that this is needed because the situation can arise when the function is not fully constructed yet, such as when calling dump() under the debugger. I think this can be more clearly expressed as if (!D->param_empty() && !D->param_begin()), but should also have some comments explaining that this is guarding against a situation that only comes up while debugging, and thus is not covered by any existing test cases. |
With bracket and comment changes, LGTM. No need for tests on this one because the scenario changed can only occur during debugging.
lib/AST/ASTDumper.cpp | ||
---|---|---|
636 ↗ | (On Diff #182476) | Re-flow comments to 80-col. |
642 ↗ | (On Diff #182476) | Let's make this <<<NULL params x blah>>> with three brackets instead of two. |