diff options
author | dim <dim@FreeBSD.org> | 2014-11-24 18:11:16 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-11-24 18:11:16 +0000 |
commit | 6148c19c738a92f344008aa3f88f4e008bada0ee (patch) | |
tree | d4426858455f04d0d8c25a2f9eb9ea5582ffe1b6 /contrib/llvm/tools/clang/lib/Edit/Commit.cpp | |
parent | 2c8643c6396b0a3db33430cf9380e70bbb9efce0 (diff) | |
parent | 173a4f43a911175643bda81ee675e8d9269056ea (diff) | |
download | FreeBSD-src-6148c19c738a92f344008aa3f88f4e008bada0ee.zip FreeBSD-src-6148c19c738a92f344008aa3f88f4e008bada0ee.tar.gz |
Merge clang 3.5.0 release from ^/vendor/clang/dist, resolve conflicts,
and preserve our customizations, where necessary.
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Edit/Commit.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Edit/Commit.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/contrib/llvm/tools/clang/lib/Edit/Commit.cpp b/contrib/llvm/tools/clang/lib/Edit/Commit.cpp index 706c732..9c08cc2 100644 --- a/contrib/llvm/tools/clang/lib/Edit/Commit.cpp +++ b/contrib/llvm/tools/clang/lib/Edit/Commit.cpp @@ -38,9 +38,7 @@ CharSourceRange Commit::Edit::getInsertFromRange(SourceManager &SM) const { Commit::Commit(EditedSource &Editor) : SourceMgr(Editor.getSourceManager()), LangOpts(Editor.getLangOpts()), PPRec(Editor.getPPCondDirectiveRecord()), - Editor(&Editor), - ForceCommitInSystemHeader(Editor.getForceCommitInSystemHeader()), - IsCommitable(true) { } + Editor(&Editor), IsCommitable(true) { } bool Commit::insert(SourceLocation loc, StringRef text, bool afterToken, bool beforePreviousInsertions) { @@ -234,7 +232,7 @@ bool Commit::canInsert(SourceLocation loc, FileOffset &offs) { if (!isAtStartOfMacroExpansion(loc, &loc)) return false; - if (SM.isInSystemHeader(loc) && ForceCommitInSystemHeader) + if (SM.isInSystemHeader(loc)) return false; std::pair<FileID, unsigned> locInfo = SM.getDecomposedLoc(loc); @@ -265,7 +263,7 @@ bool Commit::canInsertAfterToken(SourceLocation loc, FileOffset &offs, if (!isAtEndOfMacroExpansion(loc, &loc)) return false; - if (SM.isInSystemHeader(loc) && ForceCommitInSystemHeader) + if (SM.isInSystemHeader(loc)) return false; loc = Lexer::getLocForEndOfToken(loc, 0, SourceMgr, LangOpts); @@ -303,8 +301,8 @@ bool Commit::canRemoveRange(CharSourceRange range, if (range.getBegin().isMacroID() || range.getEnd().isMacroID()) return false; - if ((SM.isInSystemHeader(range.getBegin()) || - SM.isInSystemHeader(range.getEnd())) && ForceCommitInSystemHeader) + if (SM.isInSystemHeader(range.getBegin()) || + SM.isInSystemHeader(range.getEnd())) return false; if (PPRec && PPRec->rangeIntersectsConditionalDirective(range.getAsRange())) |