SuccessChanges

Summary

  1. [AST] No longer visiting CXXMethodDecl bodies created by compiler when (details)
Commit d639f6dff1b38459355df7e944fe77ea541fff03 by jvikstrom
[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
The file was addedclang/unittests/Tooling/RecursiveASTVisitorTests/CXXMethodDecl.cpp
The file was modifiedclang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp
The file was modifiedclang/unittests/Tooling/CMakeLists.txt
The file was modifiedclang/include/clang/AST/RecursiveASTVisitor.h