[PATCH] D72508: [clangd] Support pseudo-obj expr, opaque values, and property references in findExplicitReferences()
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 26 22:12:36 PST 2020
ilya-biryukov added inline comments.
================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:794
+ // Not clear why the source expression is skipped by default...
+ return RecursiveASTVisitor::TraverseStmt(OVE->getSourceExpr());
+ }
----------------
Should this be done by `RecursiveASTVisitor` instead (when `shouldVisitImplicitCode()` is false)?
If yes, maybe add a FIXME to this patch and try fixing in `RAV` in a follow-up?
================
Comment at: clang-tools-extra/clangd/unittests/FindTargetTests.cpp:700
$2^Typedef $3^y;
- static_cast<$4^Struct*>(0);
+ (void) static_cast<$4^Struct*>(0);
}
----------------
Why is this necessary? Making tests more complicated to avoid warnings does not look right.
================
Comment at: clang-tools-extra/clangd/unittests/FindTargetTests.cpp:711
namespace a { namespace b { struct S { typedef int type; }; } }
- void foo() {
+ int foo() {
$0^a::$1^b::$2^S $3^x;
----------------
See the comment about making tests more complicated to avoid warnings. Same question here and in other instances.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72508/new/
https://reviews.llvm.org/D72508
More information about the cfe-commits
mailing list