[PATCH] D65938: [AST] No longer visiting CXXMethodDecl bodies created by compiler when method was default created.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 8 05:42:16 PDT 2019
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
looks good from my side.
================
Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp:262
+ struct $Class[[A]] {
+ $Class[[B]] $Field[[BB]];
+ $Class[[A]] &operator=($Class[[A]] &&$Variable[[O]]);
----------------
nit: the indent should be 2 spaces.
================
Comment at: clang/include/clang/AST/RecursiveASTVisitor.h:2033
+ // generates the method body and adds it to the AST.
+ if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D))
+ VisitBody &= !MD->isDefaulted() || getDerived().shouldVisitImplicitCode();
----------------
nit: use auto, as type in RHS is obvious.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65938/new/
https://reviews.llvm.org/D65938
More information about the cfe-commits
mailing list