hokein added inline comments.
================
Comment at: clang-tools-extra/clangd/AST.cpp:434
+ for (AttributedTypeLoc ATL = *ATLPtr; !ATL.isNull();
+ ATL = ATL.getNextTypeLoc().getAs<AttributedTypeLoc>())
+ Result.push_back(ATL.getAttr());
----------------
this looks like not safe, `getNextTypeLoc()` may return a null TypeLoc.
================
Comment at: clang-tools-extra/clangd/unittests/ASTTests.cpp:233
+ };
+ ASSERT_THAT(DeclAttrs("X"), Each(implicitAttr()));
+ ASSERT_THAT(DeclAttrs("Y"), Contains(attrKind(attr::WarnUnusedResult)));
----------------
sorry, I'm not familiar with attributes, what is an implicit attr? It is
unclear to me why there is an attr for `class X`, the source code doesn't have
any attribute label for X (the same question for f and a)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89785/new/
https://reviews.llvm.org/D89785
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits