[cfe-commits] r132146 - /cfe/trunk/lib/Parse/ParseDeclCXX.cpp
Benjamin Kramer
benny.kra at googlemail.com
Thu May 26 14:32:30 PDT 2011
Author: d0k
Date: Thu May 26 16:32:30 2011
New Revision: 132146
URL: http://llvm.org/viewvc/llvm-project?rev=132146&view=rev
Log:
Silence sign compare warning.
Modified:
cfe/trunk/lib/Parse/ParseDeclCXX.cpp
Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=132146&r1=132145&r2=132146&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Thu May 26 16:32:30 2011
@@ -128,17 +128,17 @@
Diag(ExtraNamespaceLoc[0], diag::err_nested_namespaces_with_double_colon)
<< SourceRange(ExtraNamespaceLoc.front(), ExtraIdentLoc.back());
} else {
-
- std::string NamespaceFix = "";
+ std::string NamespaceFix;
for (std::vector<IdentifierInfo*>::iterator I = ExtraIdent.begin(),
E = ExtraIdent.end(); I != E; ++I) {
NamespaceFix += " { namespace ";
NamespaceFix += (*I)->getName();
}
+
std::string RBraces;
- for (int i = 0; i < ExtraIdent.size(); ++i) {
+ for (unsigned i = 0, e = ExtraIdent.size(); i != e; ++i)
RBraces += "} ";
- }
+
Diag(ExtraNamespaceLoc[0], diag::err_nested_namespaces_with_double_colon)
<< FixItHint::CreateReplacement(SourceRange(ExtraNamespaceLoc.front(),
ExtraIdentLoc.back()),
More information about the cfe-commits
mailing list