[PATCH] D59599: [clangd] Fix a crash while printing Template Arguments
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 20 10:05:43 PDT 2019
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: clangd/AST.cpp:95
+ } else {
+ // FIXME: Cls->getTypeAsWritten might return null in some cases, e.g.
+ // clang sees first sees a friend declaration and then the specialization.
----------------
NIT: maybe shorten the comment?
Something like `// FIXME: Fix cases when getTypeAsWritten returns null, e.g. friend decls.`
================
Comment at: unittests/clangd/SymbolCollectorTests.cpp:1226
+TEST_F(SymbolCollectorTest, TemplateSpecForwardDecl) {
+ // FIXME: This should be fixed in AST to point at specialization. Exercised
+ // just to make sure we don't crash.
----------------
NIT: or something like `getTypeAsWritten` is missing for friend declaration, this should be fixed in the AST>
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59599/new/
https://reviews.llvm.org/D59599
More information about the cfe-commits
mailing list