Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit cbbd496

Browse files
authored
Merge pull request #218 from compnerd/r345637
Adjust for SVN r345637
2 parents e4f7210 + 3b19a7c commit cbbd496

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/Tooling/Refactor/SymbolName.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static void initNames(std::vector<std::string> &Strings, StringRef Name,
2929
}
3030

3131
OldSymbolName::OldSymbolName(StringRef Name, const LangOptions &LangOpts) {
32-
initNames(Strings, Name, LangOpts.ObjC1);
32+
initNames(Strings, Name, LangOpts.ObjC);
3333
}
3434

3535
OldSymbolName::OldSymbolName(StringRef Name, bool IsObjectiveCSelector) {

lib/Tooling/Refactor/TypeUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static QualType preferredBoolType(const Decl *FunctionLikeParentDecl,
5050
case BuiltinType::Bool:
5151
// In Objective-C[++] we want to try to use 'BOOL' when the 'BOOL' typedef
5252
// is defined.
53-
if (Ctx.getLangOpts().ObjC1 && Ctx.getBOOLDecl()) {
53+
if (Ctx.getLangOpts().ObjC && Ctx.getBOOLDecl()) {
5454
if (Ctx.getLangOpts().CPlusPlus && FunctionLikeParentDecl) {
5555
// When extracting expression from a standalone function in
5656
// Objective-C++ we should use BOOL when expression uses BOOL, otherwise
@@ -183,7 +183,7 @@ QualType findExpressionLexicalType(const Decl *FunctionLikeParentDecl,
183183
}
184184

185185
// The bool type adjustment is required only in C or Objective-C[++].
186-
if (Ctx.getLangOpts().CPlusPlus && !Ctx.getLangOpts().ObjC1)
186+
if (Ctx.getLangOpts().CPlusPlus && !Ctx.getLangOpts().ObjC)
187187
return T;
188188
E = E->IgnoreParenImpCasts();
189189
if (const auto *BinOp = dyn_cast<BinaryOperator>(E)) {

tools/clang-refactor-test/ClangRefactorTest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ int rename(CXTranslationUnit TU, CXIndex CIdx, ArrayRef<const char *> Args) {
594594

595595
// FIXME: This is a hack
596596
LangOptions LangOpts;
597-
LangOpts.ObjC1 = true;
597+
LangOpts.ObjC = true;
598598
tooling::OldSymbolName NewSymbolName(opts::rename::NewName, LangOpts);
599599

600600
if (ExpectedReplacements.empty()) {
@@ -729,7 +729,7 @@ int renameIndexedFile(CXIndex CIdx, ArrayRef<const char *> Args) {
729729
PrintFilenames = true;
730730

731731
LangOptions LangOpts;
732-
LangOpts.ObjC1 = true;
732+
LangOpts.ObjC = true;
733733
tooling::OldSymbolName ExpectedReplacementStrings(
734734
opts::rename::IndexedNewNames[0], LangOpts);
735735

@@ -750,7 +750,7 @@ int renameIndexedFile(CXIndex CIdx, ArrayRef<const char *> Args) {
750750
: SymbolIndex]
751751
.c_str();
752752
LangOptions LangOpts;
753-
LangOpts.ObjC1 = true;
753+
LangOpts.ObjC = true;
754754
tooling::OldSymbolName NewSymbolName(NewName, LangOpts);
755755

756756
outs() << occurrenceToString(FileResult.Occurrences[I], /*IsLocal*/ false,

0 commit comments

Comments
 (0)