Fix a -Wunused-variable diagnostic.
authorAlexander Kornienko <alexfh@google.com>
Tue, 23 Feb 2016 10:29:04 +0000 (10:29 +0000)
committerAlexander Kornienko <alexfh@google.com>
Tue, 23 Feb 2016 10:29:04 +0000 (10:29 +0000)
llvm-svn: 261626

clang/lib/ASTMatchers/ASTMatchersInternal.cpp

index ed48d77..107052e 100644 (file)
@@ -307,8 +307,10 @@ HasNameMatcher::HasNameMatcher(std::vector<std::string> N)
           N.begin(), N.end(),
           [](StringRef Name) { return Name.find("::") == Name.npos; })),
       Names(std::move(N)) {
+#ifndef NDEBUG
   for (StringRef Name : Names)
     assert(!Name.empty());
+#endif
 }
 
 namespace {