summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/include-fixer
diff options
context:
space:
mode:
authorNicola Zaghen <nicola.zaghen@imgtec.com>2018-05-15 16:37:45 +0000
committerNicola Zaghen <nicola.zaghen@imgtec.com>2018-05-15 16:37:45 +0000
commit0efd52487e95f18c88f9c55791d733efccb29079 (patch)
tree9c801eb8010132407de5189c96b05c469f95bc5c /clang-tools-extra/include-fixer
parent6043fd21b6a36de96bfeafba12bcf5f52cad8fee (diff)
downloadbcm5719-llvm-0efd52487e95f18c88f9c55791d733efccb29079.tar.gz
bcm5719-llvm-0efd52487e95f18c88f9c55791d733efccb29079.zip
[clang-tools-extra] Update uses of DEBUG macro to LLVM_DEBUG.
The DEBUG() macro is very generic so it might clash with other projects. The renaming was done as follows: - git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g' - git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM Differential Revision: https://reviews.llvm.org/D44976 llvm-svn: 332371
Diffstat (limited to 'clang-tools-extra/include-fixer')
-rw-r--r--clang-tools-extra/include-fixer/IncludeFixer.cpp22
-rw-r--r--clang-tools-extra/include-fixer/SymbolIndexManager.cpp4
2 files changed, 14 insertions, 12 deletions
diff --git a/clang-tools-extra/include-fixer/IncludeFixer.cpp b/clang-tools-extra/include-fixer/IncludeFixer.cpp
index e68231b8b5e..c6dfd7fc098 100644
--- a/clang-tools-extra/include-fixer/IncludeFixer.cpp
+++ b/clang-tools-extra/include-fixer/IncludeFixer.cpp
@@ -156,7 +156,8 @@ bool IncludeFixerSemaSource::MaybeDiagnoseMissingCompleteType(
clang::ASTContext &context = CI->getASTContext();
std::string QueryString = QualType(T->getUnqualifiedDesugaredType(), 0)
.getAsString(context.getPrintingPolicy());
- DEBUG(llvm::dbgs() << "Query missing complete type '" << QueryString << "'");
+ LLVM_DEBUG(llvm::dbgs() << "Query missing complete type '" << QueryString
+ << "'");
// Pass an empty range here since we don't add qualifier in this case.
std::vector<find_all_symbols::SymbolInfo> MatchedSymbols =
query(QueryString, "", tooling::Range());
@@ -276,7 +277,8 @@ clang::TypoCorrection IncludeFixerSemaSource::CorrectTypo(
SymbolRange = CreateToolingRange(Typo.getLoc());
}
- DEBUG(llvm::dbgs() << "TypoScopeQualifiers: " << TypoScopeString << "\n");
+ LLVM_DEBUG(llvm::dbgs() << "TypoScopeQualifiers: " << TypoScopeString
+ << "\n");
std::vector<find_all_symbols::SymbolInfo> MatchedSymbols =
query(QueryString, TypoScopeString, SymbolRange);
@@ -357,12 +359,12 @@ IncludeFixerSemaSource::query(StringRef Query, StringRef ScopedQualifiers,
return {};
}
- DEBUG(llvm::dbgs() << "Looking up '" << Query << "' at ");
- DEBUG(CI->getSourceManager()
- .getLocForStartOfFile(CI->getSourceManager().getMainFileID())
- .getLocWithOffset(Range.getOffset())
- .print(llvm::dbgs(), CI->getSourceManager()));
- DEBUG(llvm::dbgs() << " ...");
+ LLVM_DEBUG(llvm::dbgs() << "Looking up '" << Query << "' at ");
+ LLVM_DEBUG(CI->getSourceManager()
+ .getLocForStartOfFile(CI->getSourceManager().getMainFileID())
+ .getLocWithOffset(Range.getOffset())
+ .print(llvm::dbgs(), CI->getSourceManager()));
+ LLVM_DEBUG(llvm::dbgs() << " ...");
llvm::StringRef FileName = CI->getSourceManager().getFilename(
CI->getSourceManager().getLocForStartOfFile(
CI->getSourceManager().getMainFileID()));
@@ -390,8 +392,8 @@ IncludeFixerSemaSource::query(StringRef Query, StringRef ScopedQualifiers,
if (MatchedSymbols.empty())
MatchedSymbols =
SymbolIndexMgr.search(Query, /*IsNestedSearch=*/true, FileName);
- DEBUG(llvm::dbgs() << "Having found " << MatchedSymbols.size()
- << " symbols\n");
+ LLVM_DEBUG(llvm::dbgs() << "Having found " << MatchedSymbols.size()
+ << " symbols\n");
// We store a copy of MatchedSymbols in a place where it's globally reachable.
// This is used by the standalone version of the tool.
this->MatchedSymbols = MatchedSymbols;
diff --git a/clang-tools-extra/include-fixer/SymbolIndexManager.cpp b/clang-tools-extra/include-fixer/SymbolIndexManager.cpp
index 31ecc613d1c..e4312bf166b 100644
--- a/clang-tools-extra/include-fixer/SymbolIndexManager.cpp
+++ b/clang-tools-extra/include-fixer/SymbolIndexManager.cpp
@@ -97,8 +97,8 @@ SymbolIndexManager::search(llvm::StringRef Identifier,
Symbols.insert(Symbols.end(), Res.begin(), Res.end());
}
- DEBUG(llvm::dbgs() << "Searching " << Names.back() << "... got "
- << Symbols.size() << " results...\n");
+ LLVM_DEBUG(llvm::dbgs() << "Searching " << Names.back() << "... got "
+ << Symbols.size() << " results...\n");
for (auto &SymAndSig : Symbols) {
const SymbolInfo &Symbol = SymAndSig.Symbol;
OpenPOWER on IntegriCloud