clang
20.0.0git
lib
ARCMigrate
TransRetainReleaseDealloc.cpp
Go to the documentation of this file.
1
//===--- TransRetainReleaseDealloc.cpp - Transformations to ARC mode ------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// removeRetainReleaseDealloc:
10
//
11
// Removes retain/release/autorelease/dealloc messages.
12
//
13
// return [[foo retain] autorelease];
14
// ---->
15
// return foo;
16
//
17
//===----------------------------------------------------------------------===//
18
19
#include "
Transforms.h
"
20
#include "
Internals.h
"
21
#include "
clang/AST/ASTContext.h
"
22
#include "
clang/AST/ParentMap.h
"
23
#include "
clang/Basic/SourceManager.h
"
24
#include "
clang/Lex/Lexer.h
"
25
#include "
clang/Sema/SemaDiagnostic.h
"
26
#include "llvm/ADT/StringSwitch.h"
27
28
using namespace
clang
;
29
using namespace
arcmt;
30
using namespace
trans;