From 385a45184482495c9a9bbac6591205816d6767ff Mon Sep 17 00:00:00 2001 From: Yitzhak Mandelbaum Date: Wed, 14 Aug 2019 15:20:06 +0000 Subject: [PATCH] [libTooling] Fix code to avoid unused-function warning after r368681. llvm-svn: 368862 --- clang/lib/Tooling/Refactoring/Transformer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang/lib/Tooling/Refactoring/Transformer.cpp b/clang/lib/Tooling/Refactoring/Transformer.cpp index e83b757..24f9b58 100644 --- a/clang/lib/Tooling/Refactoring/Transformer.cpp +++ b/clang/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. -- 2.7.4