diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-04-23 09:06:00 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-04-23 09:06:00 +0000 |
commit | f1cc1d0efddc40a76ab70b074792dcd7e5ca4315 (patch) | |
tree | 5b0f8144b42c61a2ee5c432e21c8a089347d2872 /lib/Sema/SemaLookup.cpp | |
parent | f3babb93eba416ff30c4408d843b7408221e1d4e (diff) |
Like the coding standards say, do not use "using namespace std".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130054 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r-- | lib/Sema/SemaLookup.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index 437898775a..309c7712d4 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -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 |