[PATCH] D44976: Change DEBUG() macro to LLVM_DEBUG() in clang-tools-extra
This revision was automatically updated to reflect the committed changes. Closed by commit rL332371: [clang-tools-extra] Update uses of DEBUG macro to LLVM_DEBUG. (authored by nzaghen, committed by ). Herald added subscribers: llvm-commits, klimek. Changed prior to commit: https://reviews.llvm.org/D44976?vs=140056=146860#toc Repository: rL LLVM https://reviews.llvm.org/D44976 Files: clang-tools-extra/trunk/clang-move/ClangMove.cpp clang-tools-extra/trunk/clang-move/HelperDeclRefGraph.cpp clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.cpp clang-tools-extra/trunk/clang-tidy/readability/IdentifierNamingCheck.cpp clang-tools-extra/trunk/include-fixer/IncludeFixer.cpp clang-tools-extra/trunk/include-fixer/SymbolIndexManager.cpp Index: clang-tools-extra/trunk/include-fixer/SymbolIndexManager.cpp === --- clang-tools-extra/trunk/include-fixer/SymbolIndexManager.cpp +++ clang-tools-extra/trunk/include-fixer/SymbolIndexManager.cpp @@ -97,8 +97,8 @@ 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 : Symbols) { const SymbolInfo = SymAndSig.Symbol; Index: clang-tools-extra/trunk/include-fixer/IncludeFixer.cpp === --- clang-tools-extra/trunk/include-fixer/IncludeFixer.cpp +++ clang-tools-extra/trunk/include-fixer/IncludeFixer.cpp @@ -156,7 +156,8 @@ clang::ASTContext = 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 MatchedSymbols = query(QueryString, "", tooling::Range()); @@ -276,7 +277,8 @@ SymbolRange = CreateToolingRange(Typo.getLoc()); } - DEBUG(llvm::dbgs() << "TypoScopeQualifiers: " << TypoScopeString << "\n"); + LLVM_DEBUG(llvm::dbgs() << "TypoScopeQualifiers: " << TypoScopeString + << "\n"); std::vector MatchedSymbols = query(QueryString, TypoScopeString, SymbolRange); @@ -357,12 +359,12 @@ 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 @@ 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; Index: clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.cpp === --- clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.cpp +++ clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.cpp @@ -225,7 +225,8 @@ // similar. std::vector FileOptionsProvider::getRawOptions(StringRef FileName) { - DEBUG(llvm::dbgs() << "Getting options for file " << FileName << "...\n"); + LLVM_DEBUG(llvm::dbgs() << "Getting options for file " << FileName + << "...\n"); assert(FS && "FS must be set."); llvm::SmallString<128> AbsoluteFilePath(FileName); @@ -254,8 +255,8 @@ if (Result) { // Store cached value for all intermediate directories. while (Path != CurrentPath) { -DEBUG(llvm::dbgs() << "Caching configuration for path " << Path - << ".\n"); +LLVM_DEBUG(llvm::dbgs() +
[PATCH] D44976: Change DEBUG() macro to LLVM_DEBUG() in clang-tools-extra
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D44976: Change DEBUG() macro to LLVM_DEBUG() in clang-tools-extra
Nicola added a comment. Ping? I'm not sure who to add as reviewers as it's generic change. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D44976: Change DEBUG() macro to LLVM_DEBUG() in clang-tools-extra
Nicola created this revision. Herald added subscribers: cfe-commits, ioeric. The DEBUG() macro is too generic so it might clash with other projects. This is going to be deprecated and replaced by LLVM_DEBUG() as soon as https://reviews.llvm.org/D43624 is submitted. This is the command I used to do the replacement and formatting: 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 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44976 Files: clang-move/ClangMove.cpp clang-move/HelperDeclRefGraph.cpp clang-tidy/ClangTidyOptions.cpp clang-tidy/readability/IdentifierNamingCheck.cpp include-fixer/IncludeFixer.cpp include-fixer/SymbolIndexManager.cpp Index: include-fixer/SymbolIndexManager.cpp === --- include-fixer/SymbolIndexManager.cpp +++ include-fixer/SymbolIndexManager.cpp @@ -97,8 +97,8 @@ 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 : Symbols) { const SymbolInfo = SymAndSig.Symbol; Index: include-fixer/IncludeFixer.cpp === --- include-fixer/IncludeFixer.cpp +++ include-fixer/IncludeFixer.cpp @@ -156,7 +156,8 @@ clang::ASTContext = 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 MatchedSymbols = query(QueryString, "", tooling::Range()); @@ -276,7 +277,8 @@ SymbolRange = CreateToolingRange(Typo.getLoc()); } - DEBUG(llvm::dbgs() << "TypoScopeQualifiers: " << TypoScopeString << "\n"); + LLVM_DEBUG(llvm::dbgs() << "TypoScopeQualifiers: " << TypoScopeString + << "\n"); std::vector MatchedSymbols = query(QueryString, TypoScopeString, SymbolRange); @@ -357,12 +359,12 @@ 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 @@ 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; Index: clang-tidy/readability/IdentifierNamingCheck.cpp === --- clang-tidy/readability/IdentifierNamingCheck.cpp +++ clang-tidy/readability/IdentifierNamingCheck.cpp @@ -836,10 +836,10 @@ std::string Fixup = fixupWithStyle(Name, Style); if (StringRef(Fixup).equals(Name)) { if (!IgnoreFailedSplit) { -DEBUG(llvm::dbgs() - << Decl->getLocStart().printToString(*Result.SourceManager) - << llvm::format(": unable to split words for %s '%s'\n", - KindName.c_str(), Name.str().c_str())); +LLVM_DEBUG(llvm::dbgs() + << Decl->getLocStart().printToString(*Result.SourceManager) + << llvm::format(": unable to split words for %s '%s'\n", + KindName.c_str(), Name.str().c_str())); } } else { NamingCheckFailure = NamingCheckFailures[NamingCheckId( @@ -873,10 +873,10 @@ std::string Fixup = fixupWithStyle(Name,