Default args might exist but be unparsed or uninstantiated.
getDefaultArg asserts on those. This patch makes sure we don't crash in such
scenarios.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Unit tests: pass. 62330 tests passed, 0 failed and 838 were skipped.
clang-tidy: pass.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.
LGTM
clang-tools-extra/clangd/Hover.cpp | ||
---|---|---|
290 | NIT: maybe move this into a helper function? Expr* getDefaultArgForPresentation(ParmVarDecl*); I imagine this could be useful in other contexts too. PS: As usual, naming is not my strong side. |
Unit tests: pass. 62330 tests passed, 0 failed and 838 were skipped.
clang-tidy: pass.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.
NIT: maybe move this into a helper function?
I imagine this could be useful in other contexts too.
PS: As usual, naming is not my strong side.