[cfe-commits] r130054 - in /cfe/trunk/lib: Basic/Version.cpp Sema/SemaLookup.cpp
Jay Foad
jay.foad at gmail.com
Sat Apr 23 02:06:00 PDT 2011
Author: foad
Date: Sat Apr 23 04:06:00 2011
New Revision: 130054
URL: http://llvm.org/viewvc/llvm-project?rev=130054&view=rev
Log:
Like the coding standards say, do not use "using namespace std".
Modified:
cfe/trunk/lib/Basic/Version.cpp
cfe/trunk/lib/Sema/SemaLookup.cpp
Modified: cfe/trunk/lib/Basic/Version.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Version.cpp?rev=130054&r1=130053&r2=130054&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Version.cpp (original)
+++ cfe/trunk/lib/Basic/Version.cpp Sat Apr 23 04:06:00 2011
@@ -17,8 +17,6 @@
#include <cstring>
#include <cstdlib>
-using namespace std;
-
namespace clang {
std::string getClangRepositoryPath() {
Modified: cfe/trunk/lib/Sema/SemaLookup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=130054&r1=130053&r2=130054&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Sat Apr 23 04:06:00 2011
@@ -2863,8 +2863,6 @@
}
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 @@
// 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
More information about the cfe-commits
mailing list