[libTooling] Fix code to avoid unused-function warning after r368681.
authorYitzhak Mandelbaum <yitzhakm@google.com>
Wed, 14 Aug 2019 15:20:06 +0000 (15:20 +0000)
committerYitzhak Mandelbaum <yitzhakm@google.com>
Wed, 14 Aug 2019 15:20:06 +0000 (15:20 +0000)
llvm-svn: 368862

clang/lib/Tooling/Refactoring/Transformer.cpp

index e83b757..24f9b58 100644 (file)
@@ -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<QualType>();
 }
+#endif
 
 // Binds each rule's matcher to a unique (and deterministic) tag based on
 // `TagBase` and the id paired with the case.