r368862 - [libTooling] Fix code to avoid unused-function warning after r368681.

Yitzhak Mandelbaum via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 14 08:20:06 PDT 2019

Author: ymandel
Date: Wed Aug 14 08:20:06 2019
New Revision: 368862

URL: http://llvm.org/viewvc/llvm-project?rev=368862&view=rev
[libTooling] Fix code to avoid unused-function warning after r368681.


Modified: cfe/trunk/lib/Tooling/Refactoring/Transformer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Refactoring/Transformer.cpp?rev=368862&r1=368861&r2=368862&view=diff
--- cfe/trunk/lib/Tooling/Refactoring/Transformer.cpp (original)
+++ cfe/trunk/lib/Tooling/Refactoring/Transformer.cpp Wed Aug 14 08:20:06 2019
@@ -80,12 +80,14 @@ void tooling::addInclude(RewriteRule &Ru
     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>();
 // Binds each rule's matcher to a unique (and deterministic) tag based on
 // `TagBase` and the id paired with the case.

More information about the cfe-commits mailing list