diff options
| author | Shaurya Gupta <shauryab98@gmail.com> | 2019-08-13 20:21:00 +0000 |
|---|---|---|
| committer | Shaurya Gupta <shauryab98@gmail.com> | 2019-08-13 20:21:00 +0000 |
| commit | 52d0cfc91e075658546e5f6f5804855de68a89a3 (patch) | |
| tree | ff9451f340c645be9704abb4f4d3a394e61cd15d /clang/lib/Tooling | |
| parent | 235339357d3c2cf454e59a994686b45f8190671f (diff) | |
| download | bcm5719-llvm-52d0cfc91e075658546e5f6f5804855de68a89a3.tar.gz bcm5719-llvm-52d0cfc91e075658546e5f6f5804855de68a89a3.zip | |
[Refactor] Moving SourceExtraction header from lib to include
Summary:
- Moved the SourceExtraction header from lib to include so that it can be used in clangd.
Reviewers: arphaman
Subscribers: ilya-biryukov, dexonsmith, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D65878
llvm-svn: 368743
Diffstat (limited to 'clang/lib/Tooling')
| -rw-r--r-- | clang/lib/Tooling/Refactoring/Extract/Extract.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/Tooling/Refactoring/Extract/SourceExtraction.h | 51 |
3 files changed, 2 insertions, 53 deletions
diff --git a/clang/lib/Tooling/Refactoring/Extract/Extract.cpp b/clang/lib/Tooling/Refactoring/Extract/Extract.cpp index f5b94a46210..402b5610905 100644 --- a/clang/lib/Tooling/Refactoring/Extract/Extract.cpp +++ b/clang/lib/Tooling/Refactoring/Extract/Extract.cpp @@ -13,12 +13,12 @@ //===----------------------------------------------------------------------===// #include "clang/Tooling/Refactoring/Extract/Extract.h" -#include "SourceExtraction.h" #include "clang/AST/ASTContext.h" #include "clang/AST/DeclCXX.h" #include "clang/AST/Expr.h" #include "clang/AST/ExprObjC.h" #include "clang/Rewrite/Core/Rewriter.h" +#include "clang/Tooling/Refactoring/Extract/SourceExtraction.h" namespace clang { namespace tooling { diff --git a/clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp b/clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp index 9b0c37b1709..09c89c15a97 100644 --- a/clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp +++ b/clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "SourceExtraction.h" +#include "clang/Tooling/Refactoring/Extract/SourceExtraction.h" #include "clang/AST/Stmt.h" #include "clang/AST/StmtCXX.h" #include "clang/AST/StmtObjC.h" diff --git a/clang/lib/Tooling/Refactoring/Extract/SourceExtraction.h b/clang/lib/Tooling/Refactoring/Extract/SourceExtraction.h deleted file mode 100644 index 545eb6c1a11..00000000000 --- a/clang/lib/Tooling/Refactoring/Extract/SourceExtraction.h +++ /dev/null @@ -1,51 +0,0 @@ -//===--- SourceExtraction.cpp - Clang refactoring library -----------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CLANG_LIB_TOOLING_REFACTORING_EXTRACT_SOURCE_EXTRACTION_H -#define LLVM_CLANG_LIB_TOOLING_REFACTORING_EXTRACT_SOURCE_EXTRACTION_H - -#include "clang/Basic/LLVM.h" - -namespace clang { - -class LangOptions; -class SourceManager; -class SourceRange; -class Stmt; - -namespace tooling { - -/// Determines which semicolons should be inserted during extraction. -class ExtractionSemicolonPolicy { -public: - bool isNeededInExtractedFunction() const { - return IsNeededInExtractedFunction; - } - - bool isNeededInOriginalFunction() const { return IsNeededInOriginalFunction; } - - /// Returns the semicolon insertion policy that is needed for extraction of - /// the given statement from the given source range. - static ExtractionSemicolonPolicy compute(const Stmt *S, - SourceRange &ExtractedRange, - const SourceManager &SM, - const LangOptions &LangOpts); - -private: - ExtractionSemicolonPolicy(bool IsNeededInExtractedFunction, - bool IsNeededInOriginalFunction) - : IsNeededInExtractedFunction(IsNeededInExtractedFunction), - IsNeededInOriginalFunction(IsNeededInOriginalFunction) {} - bool IsNeededInExtractedFunction; - bool IsNeededInOriginalFunction; -}; - -} // end namespace tooling -} // end namespace clang - -#endif // LLVM_CLANG_LIB_TOOLING_REFACTORING_EXTRACT_SOURCE_EXTRACTION_H |

