]> granicus.if.org Git - clang/commitdiff
Like the coding standards say, do not use "using namespace std".
authorJay Foad <jay.foad@gmail.com>
Sat, 23 Apr 2011 09:06:00 +0000 (09:06 +0000)
committerJay Foad <jay.foad@gmail.com>
Sat, 23 Apr 2011 09:06:00 +0000 (09:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130054 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Version.cpp
lib/Sema/SemaLookup.cpp

index 65cc2581dab0bcf8fc13f99c816d6c146fdf4200..86d4aa5dfbf047045f06e1ac8d23bdf531e11926 100644 (file)
@@ -17,8 +17,6 @@
 #include <cstring>
 #include <cstdlib>
 
-using namespace std;
-
 namespace clang {
   
 std::string getClangRepositoryPath() {
index 437898775a82b986313fdb7054280727b43e76ab..309c7712d4cca09c087af839d1c6182013860afb 100644 (file)
@@ -2863,8 +2863,6 @@ void TypoCorrectionConsumer::FoundDecl(NamedDecl *ND, NamedDecl *Hiding,
 }
 
 void TypoCorrectionConsumer::FoundName(llvm::StringRef Name) {
-  using namespace std;
-
   // Use a simple length-based heuristic to determine the minimum possible
   // edit distance. If the minimum isn't good enough, bail out early.
   unsigned MinED = abs((int)Name.size() - (int)Typo.size());
@@ -2873,7 +2871,8 @@ void TypoCorrectionConsumer::FoundName(llvm::StringRef Name) {
 
   // Compute an upper bound on the allowable edit distance, so that the
   // edit-distance algorithm can short-circuit.
-  unsigned UpperBound = min(unsigned((Typo.size() + 2) / 3), BestEditDistance);
+  unsigned UpperBound =
+    std::min(unsigned((Typo.size() + 2) / 3), BestEditDistance);
 
   // Compute the edit distance between the typo and the name of this
   // entity. If this edit distance is not worse than the best edit