kadircet added inline comments.
================
Comment at: clangd/index/Index.h:171
+ /// See also isIndexedForCodeCompletion().
+ IsIndexedForCodeCompletion = 1 << 0,
+ /// Indicates if the symbol is deprecated.
----------------
nit: rename to IndexedForCodeCompletion, since it is more of an attribute
having is in the name doesn't seem so cool. Instead of the attributes
themselves maybe the checkers below should have "is" prefix.
================
Comment at: clangd/index/Index.h:172
+ IsIndexedForCodeCompletion = 1 << 0,
+ /// Indicates if the symbol is deprecated.
+ Deprecated = 1 << 1,
----------------
nit: Add a comment similar to above one leading to Deprecated()?
================
Comment at: clangd/index/Index.h:268
+ /// FIXME: also add deprecation message and fixit?
+ bool Deprecated() const {
+ return static_cast<bool>(Flags & SymbolFlag::Deprecated);
----------------
nit: rename to isDeprecated ?
================
Comment at: unittests/clangd/CodeCompleteTests.cpp:1359
C.Origin = SymbolOrigin::AST | SymbolOrigin::Static;
+ C.Deprecated = true;
----------------
Maybe do this on its own render so that we can have both code paths covered.
Just before rendering with `Opts.EnableSnippets = true` below. We can simply
set this one render again and check deprecated is set to true.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51724
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits