diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-04-28 02:38:51 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-04-28 02:38:51 +0000 |
commit | 7dd31334336c1659682703d2568f2bbac09591db (patch) | |
tree | 6dd0c0b406b81cb79ebe72a0868311f75e495636 /clang/lib/Edit/Commit.cpp | |
parent | 2b99f2f7a48ede04f52b9dcd8cb62e0d144b749f (diff) | |
download | llvm-7dd31334336c1659682703d2568f2bbac09591db.zip llvm-7dd31334336c1659682703d2568f2bbac09591db.tar.gz llvm-7dd31334336c1659682703d2568f2bbac09591db.tar.bz2 |
[objcmt] Revert r191796, it's not needed anymore.
rdar://16223810
llvm-svn: 207391
Diffstat (limited to 'clang/lib/Edit/Commit.cpp')
-rw-r--r-- | clang/lib/Edit/Commit.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/lib/Edit/Commit.cpp b/clang/lib/Edit/Commit.cpp index 706c732..9c08cc2 100644 --- a/clang/lib/Edit/Commit.cpp +++ b/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())) |