Go to file
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
clang [AST] No longer visiting CXXMethodDecl bodies created by compiler when method was default created. 2019-08-09 07:30:28 +00:00
clang-tools-extra [AST] No longer visiting CXXMethodDecl bodies created by compiler when method was default created. 2019-08-09 07:30:28 +00:00
compiler-rt [asan_symbolize] Fix bug where the frame counter was not incremented. 2019-08-09 00:52:07 +00:00
debuginfo-tests Make nrvo-string test more robust. 2019-06-27 20:38:37 +00:00
libclc Revert "Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC" 2019-08-05 17:23:23 +00:00
libcxx [libc++] Fix environment variable passing in libc++'s `SSHExecutor` `lit` utility 2019-08-08 17:33:35 +00:00
libcxxabi [libc++abi] Fix tests when pstl is enabled 2019-08-08 12:43:20 +00:00
libunwind [runtimes] Don't depend on libpthread on Android 2019-07-22 20:41:03 +00:00
lld [ELF] Expand regions for gaps due to explicit address 2019-08-09 01:25:49 +00:00
lldb [lldb][NFC] Modernize IRForTarget::CreateResultVariable 2019-08-08 22:19:16 +00:00
llgo IR: Support parsing numeric block ids, and emit them in textual output. 2019-03-22 18:27:13 +00:00
llvm [InstSimplify] Report "Changed" also when only deleting dead instructions 2019-08-09 07:08:25 +00:00
openmp [OpenMP][libomptarget] Add support for unified memory for regular maps 2019-08-07 17:29:45 +00:00
parallel-libs Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
polly [NFC][ScopBuilder] Move buildDomains and its callees to ScopBuilder. 2019-08-06 21:51:18 +00:00
pstl [NFC][pstl] Run clang-format 2019-08-08 17:10:45 +00:00
.arcconfig Update monorepo .arcconfig with new project callsign. 2019-01-31 14:34:59 +00:00
.clang-format Add .clang-tidy and .clang-format files to the toplevel of the 2019-01-29 16:43:16 +00:00
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +00:00
.gitignore Change /build to /build* in top-level .gitignore. 2019-08-02 02:14:08 +00:00
README.md

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.