From: Yitzhak Mandelbaum Date: Wed, 14 Aug 2019 15:20:06 +0000 (+0000) Subject: [libTooling] Fix code to avoid unused-function warning after r368681. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf6fd6db8793244be8a8f3a56cd4f0fdd0953a5a;p=clang [libTooling] Fix code to avoid unused-function warning after r368681. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@368862 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Tooling/Refactoring/Transformer.cpp b/lib/Tooling/Refactoring/Transformer.cpp index e83b757936..24f9b58897 100644 --- a/lib/Tooling/Refactoring/Transformer.cpp +++ b/lib/Tooling/Refactoring/Transformer.cpp @@ -80,12 +80,14 @@ void tooling::addInclude(RewriteRule &Rule, StringRef Header, Case.AddedIncludes.emplace_back(Header.str(), Format); } +#ifndef NDEBUG // Filters for supported matcher kinds. FIXME: Explicitly list the allowed kinds // (all node matcher types except for `QualType` and `Type`), rather than just // banning `QualType` and `Type`. static bool hasValidKind(const DynTypedMatcher &M) { return !M.canConvertTo(); } +#endif // Binds each rule's matcher to a unique (and deterministic) tag based on // `TagBase` and the id paired with the case.