llvm-project/clang/unittests/Tooling/RecursiveASTVisitorTests
Johan Vikstrom d639f6dff1 [AST] No longer visiting CXXMethodDecl bodies created by compiler when method was default created.
Summary:
Clang generates function bodies and puts them in the AST for default methods if it is defaulted outside the class definition.

`
struct A {
   A &operator=(A &&O);
};

A &A::operator=(A &&O) = default;
`

This will generate a function body for the `A &A::operator=(A &&O)` and put it in the AST. This body should not be visited if implicit code is not visited as it is implicit.

This was causing SemanticHighlighting in clangd to generate duplicate tokens and putting them in weird places.

Reviewers: hokein, ilya-biryukov, gribozavr

Subscribers: mgorny, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D65938

llvm-svn: 368402
2019-08-09 07:30:28 +00:00
..
Attr.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CXXBoolLiteralExpr.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CXXMemberCall.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CXXMethodDecl.cpp [AST] No longer visiting CXXMethodDecl bodies created by compiler when method was default created. 2019-08-09 07:30:28 +00:00
CXXOperatorCallExprTraverser.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Class.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ConstructExpr.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DeclRefExpr.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ImplicitCtor.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ImplicitCtorInitializer.cpp [AST] Fix buildbot failure because of raw string inside macro from 367839. 2019-08-05 17:14:46 +00:00
InitListExprPostOrder.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InitListExprPostOrderNoQueue.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InitListExprPreOrder.cpp [AST] Treat semantic form of InitListExpr as implicit code in traversals 2019-07-22 09:58:53 +00:00
InitListExprPreOrderNoQueue.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IntegerLiteral.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LambdaDefaultCapture.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LambdaExpr.cpp Disallow most calling convention attributes on PS4 2019-07-19 21:38:34 +00:00
LambdaTemplateParams.cpp [clang][test] Add missing LambdaTemplateParams test and migrate from getLocStart 2019-06-19 17:43:58 +00:00
NestedNameSpecifiers.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ParenExpr.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TemplateArgumentLocTraverser.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TraversalScope.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00