Added std:: qualifier to find() invocation
authorDmitri Gribenko <gribozavr@gmail.com>
Mon, 2 Sep 2013 01:18:56 +0000 (01:18 +0000)
committerDmitri Gribenko <gribozavr@gmail.com>
Mon, 2 Sep 2013 01:18:56 +0000 (01:18 +0000)
Iterator of std::vector may be implemented as a raw pointer. In
this case ADL does not find the find() function in the std namespace.
For example, this is the case with STDCXX implementation of vector.

Patch by Konstantin Tokarev.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189733 91177308-0d34-0410-b5e6-96231b3b80d8

tools/bugpoint/CrashDebugger.cpp

index c8b4f6f73e92b77daa6797f4e39d8048a2001d30..b90fc61ff9cd264c2db6366a800f5ed321b14045 100644 (file)
@@ -195,10 +195,10 @@ namespace {
 }
 
 bool ReduceCrashingFunctions::TestFuncs(std::vector<Function*> &Funcs) {
-
-  //if main isn't present, claim there is no problem
-  if (KeepMain && find(Funcs.begin(), Funcs.end(),
-                       BD.getProgram()->getFunction("main")) == Funcs.end())
+  // If main isn't present, claim there is no problem.
+  if (KeepMain && std::find(Funcs.begin(), Funcs.end(),
+                            BD.getProgram()->getFunction("main")) ==
+                      Funcs.end())
     return false;
 
   // Clone the program to try hacking it apart...