summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2009-04-20 15:30:28 -0230
committerDwayne Boone <dwayne@zeroc.com>2009-04-20 15:30:28 -0230
commitb0089ca4d5998548dbbfbc1dec8414fe8f7c557f (patch)
treea5d50a3d1d57454293a93789de5423db53b512e8 /cpp
parentbug 3961 - change Application classes to use process logger (diff)
downloadice-b0089ca4d5998548dbbfbc1dec8414fe8f7c557f.tar.bz2
ice-b0089ca4d5998548dbbfbc1dec8414fe8f7c557f.tar.xz
ice-b0089ca4d5998548dbbfbc1dec8414fe8f7c557f.zip
Bug 1535 - remove --case-sensitive option form slice compilers
Diffstat (limited to 'cpp')
-rw-r--r--cpp/include/Slice/Parser.h6
-rw-r--r--cpp/src/FreezeScript/DumpDB.cpp6
-rw-r--r--cpp/src/FreezeScript/transformdb.cpp8
-rw-r--r--cpp/src/Slice/Parser.cpp248
-rw-r--r--cpp/src/slice2cpp/Main.cpp8
-rw-r--r--cpp/src/slice2cs/Main.cpp8
-rw-r--r--cpp/src/slice2docbook/Main.cpp6
-rw-r--r--cpp/src/slice2freeze/Main.cpp6
-rw-r--r--cpp/src/slice2freezej/Main.cpp6
-rw-r--r--cpp/src/slice2html/Main.cpp2
-rw-r--r--cpp/src/slice2java/Main.cpp8
-rw-r--r--cpp/src/slice2py/Main.cpp6
-rw-r--r--cpp/src/slice2rb/Main.cpp6
-rw-r--r--cpp/test/Slice/errorDetection/CaseSensitive.err3
-rw-r--r--cpp/test/Slice/errorDetection/CaseSensitive.ice152
-rwxr-xr-xcpp/test/Slice/errorDetection/run.py5
16 files changed, 122 insertions, 362 deletions
diff --git a/cpp/include/Slice/Parser.h b/cpp/include/Slice/Parser.h
index a3db93ab5e4..ab2bc56dc6f 100644
--- a/cpp/include/Slice/Parser.h
+++ b/cpp/include/Slice/Parser.h
@@ -929,12 +929,11 @@ class SLICE_API Unit : virtual public Container
{
public:
- static UnitPtr createUnit(bool, bool, bool, bool, const StringList& = StringList());
+ static UnitPtr createUnit(bool, bool, bool, const StringList& = StringList());
bool ignRedefs() const;
bool allowIcePrefix() const;
- bool caseSensitive() const;
void setComment(const std::string&);
std::string currentComment(); // Not const, as this function removes the current comment.
@@ -997,13 +996,12 @@ public:
private:
- Unit(bool, bool, bool, bool, const StringList&);
+ Unit(bool, bool, bool, const StringList&);
static void eraseWhiteSpace(::std::string&);
bool _ignRedefs;
bool _all;
bool _allowIcePrefix;
- bool _caseSensitive;
StringList _defaultGlobalMetaData;
int _errors;
std::string _currentComment;
diff --git a/cpp/src/FreezeScript/DumpDB.cpp b/cpp/src/FreezeScript/DumpDB.cpp
index bf377926f8b..b528837369c 100644
--- a/cpp/src/FreezeScript/DumpDB.cpp
+++ b/cpp/src/FreezeScript/DumpDB.cpp
@@ -104,7 +104,6 @@ usage(const char* n)
"-c, --catalog Display information about the databases in an\n"
" environment, or about a particular database.\n"
;
- // Note: --case-sensitive is intentionally not shown here!
}
static void
@@ -136,7 +135,6 @@ run(int argc, char** argv, const Ice::CommunicatorPtr& communicator)
string keyTypeName;
string valueTypeName;
string selectExpr;
- bool caseSensitive;
string dbEnvName, dbName;
IceUtilInternal::Options opts;
@@ -155,7 +153,6 @@ run(int argc, char** argv, const Ice::CommunicatorPtr& communicator)
opts.addOpt("", "value", IceUtilInternal::Options::NeedArg);
opts.addOpt("", "select", IceUtilInternal::Options::NeedArg);
opts.addOpt("c", "catalog");
- opts.addOpt("", "case-sensitive");
vector<string> args;
try
@@ -293,7 +290,6 @@ run(int argc, char** argv, const Ice::CommunicatorPtr& communicator)
{
selectExpr = opts.optArg("select");
}
- caseSensitive = opts.isSet("case-sensitive");
if(outputFile.empty() && args.size() != 2)
{
@@ -321,7 +317,7 @@ run(int argc, char** argv, const Ice::CommunicatorPtr& communicator)
return EXIT_FAILURE;
}
- Slice::UnitPtr unit = Slice::Unit::createUnit(true, true, ice, caseSensitive);
+ Slice::UnitPtr unit = Slice::Unit::createUnit(true, true, ice);
FreezeScript::Destroyer<Slice::UnitPtr> unitD(unit);
if(!FreezeScript::parseSlice(argv[0], unit, slice, cppArgs, debug))
{
diff --git a/cpp/src/FreezeScript/transformdb.cpp b/cpp/src/FreezeScript/transformdb.cpp
index 98ebebb0537..5865a89f6f5 100644
--- a/cpp/src/FreezeScript/transformdb.cpp
+++ b/cpp/src/FreezeScript/transformdb.cpp
@@ -85,7 +85,6 @@ usage(const char* n)
"-w Suppress duplicate warnings during migration.\n"
"-f FILE Execute the transformation descriptors in the file FILE.\n"
;
- // Note: --case-sensitive is intentionally not shown here!
}
static Slice::TypePtr
@@ -228,7 +227,6 @@ run(int argc, char** argv, const Ice::CommunicatorPtr& communicator)
vector<string> oldSlice;
vector<string> newSlice;
bool evictor;
- bool caseSensitive;
string keyTypeNames;
string valueTypeNames;
string dbEnvName, dbName, dbEnvNameNew;
@@ -254,7 +252,6 @@ run(int argc, char** argv, const Ice::CommunicatorPtr& communicator)
opts.addOpt("e");
opts.addOpt("", "key", IceUtilInternal::Options::NeedArg);
opts.addOpt("", "value", IceUtilInternal::Options::NeedArg);
- opts.addOpt("", "case-sensitive");
vector<string> args;
try
@@ -354,7 +351,6 @@ run(int argc, char** argv, const Ice::CommunicatorPtr& communicator)
{
valueTypeNames = opts.optArg("value");
}
- caseSensitive = opts.isSet("case-sensitive");
if(outputFile.empty())
{
@@ -419,14 +415,14 @@ run(int argc, char** argv, const Ice::CommunicatorPtr& communicator)
return EXIT_FAILURE;
}
- Slice::UnitPtr oldUnit = Slice::Unit::createUnit(true, true, ice, caseSensitive);
+ Slice::UnitPtr oldUnit = Slice::Unit::createUnit(true, true, ice);
FreezeScript::Destroyer<Slice::UnitPtr> oldD(oldUnit);
if(!FreezeScript::parseSlice(argv[0], oldUnit, oldSlice, oldCppArgs, debug))
{
return EXIT_FAILURE;
}
- Slice::UnitPtr newUnit = Slice::Unit::createUnit(true, true, ice, caseSensitive);
+ Slice::UnitPtr newUnit = Slice::Unit::createUnit(true, true, ice);
FreezeScript::Destroyer<Slice::UnitPtr> newD(newUnit);
if(!FreezeScript::parseSlice(argv[0], newUnit, newSlice, newCppArgs, debug))
{
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp
index 433fad185d6..6e6d7c3e894 100644
--- a/cpp/src/Slice/Parser.cpp
+++ b/cpp/src/Slice/Parser.cpp
@@ -485,7 +485,7 @@ Slice::Container::createModule(const string& name)
for(ContainedList::const_iterator p = matches.begin(); p != matches.end(); ++p)
{
- bool differsOnlyInCase = !_unit->caseSensitive() && matches.front()->name() != name;
+ bool differsOnlyInCase = matches.front()->name() != name;
ModulePtr module = ModulePtr::dynamicCast(*p);
if(module)
{
@@ -540,7 +540,7 @@ Slice::Container::createClassDef(const string& name, bool intf, const ClassList&
return 0;
}
- bool differsOnlyInCase = !_unit->caseSensitive() && matches.front()->name() != name;
+ bool differsOnlyInCase = matches.front()->name() != name;
ClassDefPtr def = ClassDefPtr::dynamicCast(*p);
if(def)
{
@@ -565,7 +565,7 @@ Slice::Container::createClassDef(const string& name, bool intf, const ClassList&
_unit->error(msg);
}
}
- else if(!_unit->caseSensitive() && differsOnlyInCase)
+ else if(differsOnlyInCase)
{
string msg = intf ? "interface" : "class";
msg = " definition `" + name + "' differs only in capitalization from ";
@@ -645,7 +645,7 @@ Slice::Container::createClassDecl(const string& name, bool intf, bool local)
return 0;
}
- bool differsOnlyInCase = !_unit->caseSensitive() && matches.front()->name() != name;
+ bool differsOnlyInCase = matches.front()->name() != name;
if(differsOnlyInCase)
{
string msg = "class declaration `" + name + "' differs only in capitalization from ";
@@ -727,7 +727,7 @@ Slice::Container::createException(const string& name, const ExceptionPtr& base,
msg += "' as exception";
_unit->error(msg);
}
- else if(!_unit->caseSensitive())
+ else
{
string msg = "exception `" + name + "' differs only in capitalization from ";
msg += matches.front()->kindOf() + " `" + matches.front()->name() + "'";
@@ -778,7 +778,7 @@ Slice::Container::createStruct(const string& name, bool local, NodeType nt)
msg += "' as struct";
_unit->error(msg);
}
- else if(!_unit->caseSensitive())
+ else
{
string msg = "struct `" + name + "' differs only in capitalization from ";
msg += matches.front()->kindOf() + " `" + matches.front()->name() + "'";
@@ -833,7 +833,7 @@ Slice::Container::createSequence(const string& name, const TypePtr& type, const
msg += "' as sequence";
_unit->error(msg);
}
- else if(!_unit->caseSensitive())
+ else
{
string msg = "sequence `" + name + "' differs only in capitalization from ";
msg += matches.front()->kindOf() + " `" + matches.front()->name() + "'";
@@ -898,7 +898,7 @@ Slice::Container::createDictionary(const string& name, const TypePtr& keyType, c
msg += "' as dictionary";
_unit->error(msg);
}
- else if(!_unit->caseSensitive())
+ else
{
string msg = "dictionary `" + name + "' differs only in capitalization from ";
msg += matches.front()->kindOf() + " `" + matches.front()->name() + "'";
@@ -969,7 +969,7 @@ Slice::Container::createEnum(const string& name, bool local, NodeType nt)
msg += "' as enumeration";
_unit->error(msg);
}
- else if(!_unit->caseSensitive())
+ else
{
string msg = "enumeration `" + name + "' differs only in capitalization from ";
msg += matches.front()->kindOf() + " `" + matches.front()->name() + "'";
@@ -1012,7 +1012,7 @@ Slice::Container::createEnumerator(const string& name)
msg += "' as enumerator";
_unit->error(msg);
}
- else if(!_unit->caseSensitive())
+ else
{
string msg = "enumerator `" + name + "' differs only in capitalization from ";
msg += matches.front()->kindOf() + " `" + matches.front()->name() + "'";
@@ -1052,7 +1052,7 @@ Slice::Container::createConst(const string name, const TypePtr& constType, const
msg += "' as constant";
_unit->error(msg);
}
- else if(!_unit->caseSensitive())
+ else
{
string msg = "constant `" + name + "' differs only in capitalization from ";
msg += matches.front()->kindOf() + " `" + matches.front()->name() + "'";
@@ -1164,7 +1164,7 @@ Slice::Container::lookupTypeNoBuiltin(const string& scoped, bool printError)
continue; // Ignore class definitions.
}
- if(printError && !_unit->caseSensitive() && matches.front()->scoped() != (thisScope() + sc))
+ if(printError && matches.front()->scoped() != (thisScope() + sc))
{
string msg = (*p)->kindOf() + " name `" + scoped;
msg += "' is capitalized inconsistently with its previous name: `";
@@ -1201,7 +1201,7 @@ Slice::Container::lookupTypeNoBuiltin(const string& scoped, bool printError)
continue; // Ignore class definitions.
}
- if(printError && !_unit->caseSensitive() && matches.front()->scoped() != (thisScope() + sc))
+ if(printError && matches.front()->scoped() != (thisScope() + sc))
{
string msg = (*p)->kindOf() + " name `" + scoped;
msg += "' is capitalized inconsistently with its previous name: `";
@@ -1290,7 +1290,7 @@ Slice::Container::lookupContained(const string& scoped, bool printError)
{
results.push_back(*p);
- if(printError && !_unit->caseSensitive() && (*p)->scoped() != (thisScope() + sc))
+ if(printError && (*p)->scoped() != (thisScope() + sc))
{
string msg = (*p)->kindOf() + " name `" + scoped;
msg += "' is capitalized inconsistently with its previous name: `" + (*p)->scoped() + "'";
@@ -2013,7 +2013,7 @@ Slice::Container::checkIntroduced(const string& scoped, ContainedPtr namedThing)
// We've previously introduced the first component to the current scope,
// check that it has not changed meaning.
//
- if(!_unit->caseSensitive() && it->second != namedThing)
+ if(it->second != namedThing)
{
_unit->error("`" + firstComponent + "' has changed meaning");
return false;
@@ -2039,19 +2039,18 @@ Slice::Container::nameIsLegal(const string& newName, const char* newConstruct)
_unit->error(msg);
return false;
}
- if(!_unit->caseSensitive())
+
+ string name = IceUtilInternal::toLower(newName);
+ string thisName = IceUtilInternal::toLower(module->name());
+ if(name == thisName)
{
- string name = IceUtilInternal::toLower(newName);
- string thisName = IceUtilInternal::toLower(module->name());
- if(name == thisName)
- {
- string msg = newConstruct;
- msg += " name `" + name + "' cannot differ only in capitalization from its immediately enclosing "
- "module name `" + module->name() + "'";
- _unit->error(msg);
- return false;
- }
+ string msg = newConstruct;
+ msg += " name `" + name + "' cannot differ only in capitalization from its immediately enclosing "
+ "module name `" + module->name() + "'";
+ _unit->error(msg);
+ return false;
}
+
module = ModulePtr::dynamicCast(module->container()); // Get enclosing module for test below.
}
@@ -2068,19 +2067,18 @@ Slice::Container::nameIsLegal(const string& newName, const char* newConstruct)
_unit->error(msg);
return false;
}
- if(!_unit->caseSensitive())
+
+ string name = IceUtilInternal::toLower(newName);
+ string thisName = IceUtilInternal::toLower(module->name());
+ if(name == thisName)
{
- string name = IceUtilInternal::toLower(newName);
- string thisName = IceUtilInternal::toLower(module->name());
- if(name == thisName)
- {
- string msg = newConstruct;
- msg += " name `" + name + "' cannot differ only in capitalization from enclosing module `"
- + module->name() + "' (first defined at " + module->file() + ":" + module->line() + ")";
- _unit->error(msg);
- return false;
- }
+ string msg = newConstruct;
+ msg += " name `" + name + "' cannot differ only in capitalization from enclosing module `"
+ + module->name() + "' (first defined at " + module->file() + ":" + module->line() + ")";
+ _unit->error(msg);
+ return false;
}
+
module = ModulePtr::dynamicCast(module->container());
}
@@ -2568,8 +2566,7 @@ Slice::ClassDecl::checkPairIntersections(const StringPartitionList& l, const str
unit->error(msg);
reported.insert(*s1);
}
- else if(!unit->caseSensitive() &&
- !CICompare()(*s1, *s2) && !CICompare()(*s2, *s1) &&
+ else if(!CICompare()(*s1, *s2) && !CICompare()(*s2, *s1) &&
reported.find(*s1) == reported.end() && reported.find(*s2) == reported.end())
{
string msg = "ambiguous multiple inheritance: `" + name;
@@ -2616,7 +2613,7 @@ Slice::ClassDef::createOperation(const string& name,
return p;
}
}
- if(!_unit->caseSensitive() && matches.front()->name() != name)
+ if(matches.front()->name() != name)
{
string msg = "operation `" + name + "' differs only in capitalization from ";
msg += matches.front()->kindOf() + " `" + matches.front()->name() + "'";
@@ -2638,17 +2635,15 @@ Slice::ClassDef::createOperation(const string& name,
_unit->error(msg);
return 0;
}
- if(!_unit->caseSensitive())
+
+ string newName = IceUtilInternal::toLower(name);
+ string thisName = IceUtilInternal::toLower(this->name());
+ if(newName == thisName)
{
- string newName = IceUtilInternal::toLower(name);
- string thisName = IceUtilInternal::toLower(this->name());
- if(newName == thisName)
- {
- string msg = "operation `" + name + "' differs only in capitalization from enclosing ";
- msg += isInterface() ? "interface" : "class";
- msg += " name `" + this->name() + "'";
- _unit->error(msg);
- }
+ string msg = "operation `" + name + "' differs only in capitalization from enclosing ";
+ msg += isInterface() ? "interface" : "class";
+ msg += " name `" + this->name() + "'";
+ _unit->error(msg);
}
//
@@ -2677,16 +2672,14 @@ Slice::ClassDef::createOperation(const string& name,
_unit->error(msg);
return 0;
}
- if(!_unit->caseSensitive())
+
+ string baseName = IceUtilInternal::toLower((*q)->name());
+ string newName = IceUtilInternal::toLower(name);
+ if(baseName == newName)
{
- string baseName = IceUtilInternal::toLower((*q)->name());
- string newName = IceUtilInternal::toLower(name);
- if(baseName == newName)
- {
- string msg = "operation `" + name + "' differs only in capitalization from " + (*q)->kindOf();
- msg += " `" + (*q)->name() + "', which is defined in a base interface or class";
- _unit->error(msg);
- }
+ string msg = "operation `" + name + "' differs only in capitalization from " + (*q)->kindOf();
+ msg += " `" + (*q)->name() + "', which is defined in a base interface or class";
+ _unit->error(msg);
}
}
}
@@ -2747,7 +2740,7 @@ Slice::ClassDef::createDataMember(const string& name, const TypePtr& type)
return p;
}
}
- if(!_unit->caseSensitive() && matches.front()->name() != name)
+ if(matches.front()->name() != name)
{
string msg = "data member `" + name + "' differs only in capitalization from ";
msg += matches.front()->kindOf() + " `" + matches.front()->name() + "'";
@@ -2773,16 +2766,14 @@ Slice::ClassDef::createDataMember(const string& name, const TypePtr& type)
_unit->error(msg);
return 0;
}
- if(!_unit->caseSensitive())
+
+ string newName = IceUtilInternal::toLower(name);
+ string thisName = IceUtilInternal::toLower(this->name());
+ if(newName == thisName)
{
- string newName = IceUtilInternal::toLower(name);
- string thisName = IceUtilInternal::toLower(this->name());
- if(newName == thisName)
- {
- string msg = "data member `" + name + "' differs only in capitalization from enclosing class name `";
- msg += this->name() + "'";
- _unit->error(msg);
- }
+ string msg = "data member `" + name + "' differs only in capitalization from enclosing class name `";
+ msg += this->name() + "'";
+ _unit->error(msg);
}
//
@@ -2811,16 +2802,14 @@ Slice::ClassDef::createDataMember(const string& name, const TypePtr& type)
_unit->error(msg);
return 0;
}
- if(!_unit->caseSensitive())
+
+ string baseName = IceUtilInternal::toLower((*q)->name());
+ string newName = IceUtilInternal::toLower(name);
+ if(baseName == newName)
{
- string baseName = IceUtilInternal::toLower((*q)->name());
- string newName = IceUtilInternal::toLower(name);
- if(baseName == newName)
- {
- string msg = "data member `" + name + "' differs only in capitalization from " + (*q)->kindOf();
- msg += " `" + (*q)->name() + "', which is defined in a base interface or class";
- _unit->error(msg);
- }
+ string msg = "data member `" + name + "' differs only in capitalization from " + (*q)->kindOf();
+ msg += " `" + (*q)->name() + "', which is defined in a base interface or class";
+ _unit->error(msg);
}
}
}
@@ -3222,7 +3211,7 @@ Slice::Exception::createDataMember(const string& name, const TypePtr& type)
return p;
}
}
- if(!_unit->caseSensitive() && matches.front()->name() != name)
+ if(matches.front()->name() != name)
{
string msg = "exception member `" + name + "' differs only in capitalization from ";
msg += "exception member `" + matches.front()->name() + "'";
@@ -3247,16 +3236,14 @@ Slice::Exception::createDataMember(const string& name, const TypePtr& type)
_unit->error(msg);
return 0;
}
- if(!_unit->caseSensitive())
+
+ string newName = IceUtilInternal::toLower(name);
+ string thisName = IceUtilInternal::toLower(this->name());
+ if(newName == thisName)
{
- string newName = IceUtilInternal::toLower(name);
- string thisName = IceUtilInternal::toLower(this->name());
- if(newName == thisName)
- {
- string msg = "exception member `" + name + "' differs only in capitalization ";
- msg += "from enclosing exception name `" + this->name() + "'";
- _unit->error(msg);
- }
+ string msg = "exception member `" + name + "' differs only in capitalization ";
+ msg += "from enclosing exception name `" + this->name() + "'";
+ _unit->error(msg);
}
//
@@ -3276,16 +3263,14 @@ Slice::Exception::createDataMember(const string& name, const TypePtr& type)
_unit->error(msg);
return 0;
}
- if(!_unit->caseSensitive())
+
+ string baseName = IceUtilInternal::toLower((*r)->name());
+ string newName = IceUtilInternal::toLower(name);
+ if(baseName == newName)
{
- string baseName = IceUtilInternal::toLower((*r)->name());
- string newName = IceUtilInternal::toLower(name);
- if(baseName == newName)
- {
- string msg = "exception member `" + name + "' differs only in capitalization from exception member `";
- msg += (*r)->name() + "', which is defined in a base exception";
- _unit->error(msg);
- }
+ string msg = "exception member `" + name + "' differs only in capitalization from exception member `";
+ msg += (*r)->name() + "', which is defined in a base exception";
+ _unit->error(msg);
}
}
}
@@ -3530,7 +3515,7 @@ Slice::Struct::createDataMember(const string& name, const TypePtr& type)
return p;
}
}
- if(!_unit->caseSensitive() && matches.front()->name() != name)
+ if(matches.front()->name() != name)
{
string msg = "member `" + name + "' differs only in capitalization from ";
msg += "member `" + matches.front()->name() + "'";
@@ -3555,16 +3540,14 @@ Slice::Struct::createDataMember(const string& name, const TypePtr& type)
_unit->error(msg);
return 0;
}
- if(!_unit->caseSensitive())
+
+ string newName = IceUtilInternal::toLower(name);
+ string thisName = IceUtilInternal::toLower(this->name());
+ if(newName == thisName)
{
- string newName = IceUtilInternal::toLower(name);
- string thisName = IceUtilInternal::toLower(this->name());
- if(newName == thisName)
- {
- string msg = "struct member `" + name + "' differs only in capitalization from enclosing struct name `";
- msg += this->name() + "'";
- _unit->error(msg);
- }
+ string msg = "struct member `" + name + "' differs only in capitalization from enclosing struct name `";
+ msg += this->name() + "'";
+ _unit->error(msg);
}
//
@@ -4453,7 +4436,7 @@ Slice::Operation::createParamDecl(const string& name, const TypePtr& type, bool
return p;
}
}
- if(!_unit->caseSensitive() && matches.front()->name() != name)
+ if(matches.front()->name() != name)
{
string msg = "parameter `" + name + "' differs only in capitalization from ";
msg += "parameter `" + matches.front()->name() + "'";
@@ -4478,16 +4461,14 @@ Slice::Operation::createParamDecl(const string& name, const TypePtr& type, bool
_unit->error(msg);
return 0;
}
- if(!_unit->caseSensitive())
+
+ string newName = IceUtilInternal::toLower(name);
+ string thisName = IceUtilInternal::toLower(this->name());
+ if(newName == thisName)
{
- string newName = IceUtilInternal::toLower(name);
- string thisName = IceUtilInternal::toLower(this->name());
- if(newName == thisName)
- {
- string msg = "parameter `" + name + "' differs only in capitalization from operation name `";
- msg += this->name() + "'";
- _unit->error(msg);
- }
+ string msg = "parameter `" + name + "' differs only in capitalization from operation name `";
+ msg += this->name() + "'";
+ _unit->error(msg);
}
//
@@ -4924,10 +4905,9 @@ Slice::DataMember::DataMember(const ContainerPtr& container, const string& name,
// ----------------------------------------------------------------------
UnitPtr
-Slice::Unit::createUnit(bool ignRedefs, bool all, bool allowIcePrefix, bool caseSensitive,
- const StringList& defaultGlobalMetadata)
+Slice::Unit::createUnit(bool ignRedefs, bool all, bool allowIcePrefix, const StringList& defaultGlobalMetadata)
{
- return new Unit(ignRedefs, all, allowIcePrefix, caseSensitive, defaultGlobalMetadata);
+ return new Unit(ignRedefs, all, allowIcePrefix, defaultGlobalMetadata);
}
bool
@@ -4942,11 +4922,6 @@ Slice::Unit::allowIcePrefix() const
return _allowIcePrefix;
}
-bool
-Slice::Unit::caseSensitive() const
-{
- return _caseSensitive;
-}
void
Slice::Unit::setComment(const string& comment)
{
@@ -5250,22 +5225,14 @@ Slice::Unit::findDefinitionContext(const string& file) const
void
Slice::Unit::addContent(const ContainedPtr& contained)
{
- string scoped = contained->scoped();
- if(!caseSensitive())
- {
- scoped = IceUtilInternal::toLower(scoped);
- }
+ string scoped = IceUtilInternal::toLower(contained->scoped());
_contentMap[scoped].push_back(contained);
}
void
Slice::Unit::removeContent(const ContainedPtr& contained)
{
- string scoped = contained->scoped();
- if(!caseSensitive())
- {
- scoped = IceUtilInternal::toLower(scoped);
- }
+ string scoped = IceUtilInternal::toLower(contained->scoped());
map<string, ContainedList>::iterator p = _contentMap.find(scoped);
assert(p != _contentMap.end());
ContainedList::iterator q;
@@ -5286,12 +5253,7 @@ Slice::Unit::findContents(const string& scoped) const
assert(!scoped.empty());
assert(scoped[0] == ':');
- string name = scoped;
- if(!_unit->caseSensitive())
- {
- name = IceUtilInternal::toLower(name);
- }
-
+ string name = IceUtilInternal::toLower(scoped);
map<string, ContainedList>::const_iterator p = _contentMap.find(name);
if(p != _contentMap.end())
{
@@ -5546,14 +5508,12 @@ Slice::Unit::builtin(Builtin::Kind kind)
return builtin;
}
-Slice::Unit::Unit(bool ignRedefs, bool all, bool allowIcePrefix, bool caseSensitive,
- const StringList& defaultGlobalMetadata) :
+Slice::Unit::Unit(bool ignRedefs, bool all, bool allowIcePrefix, const StringList& defaultGlobalMetadata) :
SyntaxTreeBase(0),
Container(0),
_ignRedefs(ignRedefs),
_all(all),
_allowIcePrefix(allowIcePrefix),
- _caseSensitive(caseSensitive),
_defaultGlobalMetaData(defaultGlobalMetadata),
_errors(0)
diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp
index 6e181a6c429..b7474780fd8 100644
--- a/cpp/src/slice2cpp/Main.cpp
+++ b/cpp/src/slice2cpp/Main.cpp
@@ -55,7 +55,6 @@ usage(const char* n)
"--checksum Generate checksums for Slice definitions.\n"
"--stream Generate marshaling support for public stream API.\n"
;
- // Note: --case-sensitive is intentionally not shown here!
}
int
@@ -80,7 +79,6 @@ main(int argc, char* argv[])
opts.addOpt("", "ice");
opts.addOpt("", "checksum");
opts.addOpt("", "stream");
- opts.addOpt("", "case-sensitive");
vector<string> args;
try
@@ -155,8 +153,6 @@ main(int argc, char* argv[])
bool stream = opts.isSet("stream");
- bool caseSensitive = opts.isSet("case-sensitive");
-
if(args.empty())
{
getErrorStream() << argv[0] << ": error: no input file" << endl;
@@ -181,7 +177,7 @@ main(int argc, char* argv[])
return EXIT_FAILURE;
}
- UnitPtr u = Unit::createUnit(false, false, ice, caseSensitive);
+ UnitPtr u = Unit::createUnit(false, false, ice);
int parseStatus = u->parse(*i, cppHandle, debug);
u->destroy();
@@ -227,7 +223,7 @@ main(int argc, char* argv[])
}
else
{
- UnitPtr u = Unit::createUnit(false, false, ice, caseSensitive);
+ UnitPtr u = Unit::createUnit(false, false, ice);
int parseStatus = u->parse(*i, cppHandle, debug);
if(!icecpp.close())
diff --git a/cpp/src/slice2cs/Main.cpp b/cpp/src/slice2cs/Main.cpp
index 191fe622450..f7f873a5232 100644
--- a/cpp/src/slice2cs/Main.cpp
+++ b/cpp/src/slice2cs/Main.cpp
@@ -52,7 +52,6 @@ usage(const char* n)
"--checksum Generate checksums for Slice definitions.\n"
"--stream Generate marshaling support for public stream API.\n"
;
- // Note: --case-sensitive is intentionally not shown here!
}
int
@@ -74,7 +73,6 @@ main(int argc, char* argv[])
opts.addOpt("", "ice");
opts.addOpt("", "checksum");
opts.addOpt("", "stream");
- opts.addOpt("", "case-sensitive");
vector<string> args;
try
@@ -143,8 +141,6 @@ main(int argc, char* argv[])
bool stream = opts.isSet("stream");
- bool caseSensitive = opts.isSet("case-sensitive");
-
if(args.empty())
{
getErrorStream() << argv[0] << ": error: no input file" << endl;
@@ -176,7 +172,7 @@ main(int argc, char* argv[])
return EXIT_FAILURE;
}
- UnitPtr u = Unit::createUnit(false, false, ice, caseSensitive);
+ UnitPtr u = Unit::createUnit(false, false, ice);
int parseStatus = u->parse(*i, cppHandle, debug);
u->destroy();
@@ -221,7 +217,7 @@ main(int argc, char* argv[])
}
else
{
- UnitPtr p = Unit::createUnit(false, false, ice, caseSensitive);
+ UnitPtr p = Unit::createUnit(false, false, ice);
int parseStatus = p->parse(*i, cppHandle, debug);
if(!icecpp.close())
diff --git a/cpp/src/slice2docbook/Main.cpp b/cpp/src/slice2docbook/Main.cpp
index e7cca665ef7..48e2f0a6183 100644
--- a/cpp/src/slice2docbook/Main.cpp
+++ b/cpp/src/slice2docbook/Main.cpp
@@ -52,7 +52,6 @@ usage(const char* n)
"-d, --debug Print debug messages.\n"
"--ice Permit `Ice' prefix (for building Ice source code only)\n"
;
- // Note: --case-sensitive is intentionally not shown here!
}
int
@@ -71,7 +70,6 @@ main(int argc, char* argv[])
opts.addOpt("", "sort-fields");
opts.addOpt("d", "debug");
opts.addOpt("", "ice");
- opts.addOpt("", "case-sensitive");
vector<string> args;
try
@@ -134,8 +132,6 @@ main(int argc, char* argv[])
bool ice = opts.isSet("ice");
- bool caseSensitive = opts.isSet("case-sensitive");
-
if(args.empty())
{
getErrorStream() << argv[0] << ": error: no docbook file specified" << endl;
@@ -163,7 +159,7 @@ main(int argc, char* argv[])
return EXIT_FAILURE;
}
- UnitPtr p = Unit::createUnit(true, false, ice, caseSensitive);
+ UnitPtr p = Unit::createUnit(true, false, ice);
int status = EXIT_SUCCESS;
diff --git a/cpp/src/slice2freeze/Main.cpp b/cpp/src/slice2freeze/Main.cpp
index 4978f0a699a..8ba2400f060 100644
--- a/cpp/src/slice2freeze/Main.cpp
+++ b/cpp/src/slice2freeze/Main.cpp
@@ -217,7 +217,6 @@ usage(const char* n)
"-d, --debug Print debug messages.\n"
"--ice Permit `Ice' prefix (for building Ice source code only)\n"
;
- // Note: --case-sensitive is intentionally not shown here!
}
void
@@ -1498,7 +1497,6 @@ main(int argc, char* argv[])
opts.addOpt("", "output-dir", IceUtilInternal::Options::NeedArg);
opts.addOpt("d", "debug");
opts.addOpt("", "ice");
- opts.addOpt("", "case-sensitive");
vector<string> args;
try
@@ -1899,8 +1897,6 @@ main(int argc, char* argv[])
bool ice = opts.isSet("ice");
- bool caseSensitive = opts.isSet("case-sensitive");
-
if(dicts.empty() && indices.empty())
{
getErrorStream() << argv[0] << ": error: no Freeze types specified" << endl;
@@ -1915,7 +1911,7 @@ main(int argc, char* argv[])
return EXIT_FAILURE;
}
- UnitPtr u = Unit::createUnit(true, false, ice, caseSensitive);
+ UnitPtr u = Unit::createUnit(true, false, ice);
StringList includes;
diff --git a/cpp/src/slice2freezej/Main.cpp b/cpp/src/slice2freezej/Main.cpp
index b061dd3d32e..df70e3d8267 100644
--- a/cpp/src/slice2freezej/Main.cpp
+++ b/cpp/src/slice2freezej/Main.cpp
@@ -1142,7 +1142,6 @@ usage(const char* n)
"--ice Permit `Ice' prefix (for building Ice source code only)\n"
"--meta META Define global metadata directive META.\n"
;
- // Note: --case-sensitive is intentionally not shown here!
}
int
@@ -1164,7 +1163,6 @@ main(int argc, char* argv[])
opts.addOpt("d", "debug");
opts.addOpt("", "ice");
opts.addOpt("", "meta", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat);
- opts.addOpt("", "case-sensitive");
vector<string> args;
try
@@ -1428,8 +1426,6 @@ main(int argc, char* argv[])
vector<string> v = opts.argVec("meta");
copy(v.begin(), v.end(), back_inserter(globalMetadata));
- bool caseSensitive = opts.isSet("case-sensitive");
-
if(dicts.empty() && indices.empty())
{
getErrorStream() << argv[0] << ": error: no Freeze types specified" << endl;
@@ -1437,7 +1433,7 @@ main(int argc, char* argv[])
return EXIT_FAILURE;
}
- UnitPtr u = Unit::createUnit(true, false, ice, caseSensitive, globalMetadata);
+ UnitPtr u = Unit::createUnit(true, false, ice, globalMetadata);
int status = EXIT_SUCCESS;
diff --git a/cpp/src/slice2html/Main.cpp b/cpp/src/slice2html/Main.cpp
index a939d6c8b67..d9de5ceeef8 100644
--- a/cpp/src/slice2html/Main.cpp
+++ b/cpp/src/slice2html/Main.cpp
@@ -188,7 +188,7 @@ main(int argc, char* argv[])
return EXIT_FAILURE;
}
- UnitPtr p = Unit::createUnit(true, false, ice, false);
+ UnitPtr p = Unit::createUnit(true, false, ice);
int status = EXIT_SUCCESS;
diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp
index b21e9d1a47d..24dc67d4b77 100644
--- a/cpp/src/slice2java/Main.cpp
+++ b/cpp/src/slice2java/Main.cpp
@@ -59,7 +59,6 @@ usage(const char* n)
"--stream Generate marshaling support for public stream API.\n"
"--meta META Define global metadata directive META.\n"
;
- // Note: --case-sensitive is intentionally not shown here!
}
int
@@ -84,7 +83,6 @@ main(int argc, char* argv[])
opts.addOpt("", "checksum", IceUtilInternal::Options::NeedArg);
opts.addOpt("", "stream");
opts.addOpt("", "meta", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat);
- opts.addOpt("", "case-sensitive");
vector<string>args;
try
@@ -160,8 +158,6 @@ main(int argc, char* argv[])
vector<string> v = opts.argVec("meta");
copy(v.begin(), v.end(), back_inserter(globalMetadata));
- bool caseSensitive = opts.isSet("case-sensitive");
-
if(args.empty())
{
getErrorStream() << argv[0] << ": error: no input file" << endl;
@@ -200,7 +196,7 @@ main(int argc, char* argv[])
return EXIT_FAILURE;
}
- UnitPtr u = Unit::createUnit(false, false, ice, caseSensitive);
+ UnitPtr u = Unit::createUnit(false, false, ice);
int parseStatus = u->parse(*i, cppHandle, debug);
u->destroy();
@@ -256,7 +252,7 @@ main(int argc, char* argv[])
}
else
{
- UnitPtr p = Unit::createUnit(false, false, ice, caseSensitive, globalMetadata);
+ UnitPtr p = Unit::createUnit(false, false, ice, globalMetadata);
int parseStatus = p->parse(*i, cppHandle, debug, Ice);
if(!icecpp.close())
diff --git a/cpp/src/slice2py/Main.cpp b/cpp/src/slice2py/Main.cpp
index 31eaf5fc784..334aa0cf714 100644
--- a/cpp/src/slice2py/Main.cpp
+++ b/cpp/src/slice2py/Main.cpp
@@ -379,7 +379,6 @@ usage(const char* n)
"--checksum Generate checksums for Slice definitions.\n"
"--prefix PREFIX Prepend filenames of Python modules with PREFIX.\n"
;
- // Note: --case-sensitive is intentionally not shown here!
}
int
@@ -399,7 +398,6 @@ main(int argc, char* argv[])
opts.addOpt("", "no-package");
opts.addOpt("", "checksum");
opts.addOpt("", "prefix", IceUtilInternal::Options::NeedArg);
- opts.addOpt("", "case-sensitive");
vector<string> args;
try
@@ -464,8 +462,6 @@ main(int argc, char* argv[])
string prefix = opts.optArg("prefix");
- bool caseSensitive = opts.isSet("case-sensitive");
-
if(args.empty())
{
getErrorStream() << argv[0] << ": error: no input file" << endl;
@@ -506,7 +502,7 @@ main(int argc, char* argv[])
}
else
{
- UnitPtr u = Unit::createUnit(false, all, ice, caseSensitive);
+ UnitPtr u = Unit::createUnit(false, all, ice);
int parseStatus = u->parse(*i, cppHandle, debug);
if(!icecpp.close())
diff --git a/cpp/src/slice2rb/Main.cpp b/cpp/src/slice2rb/Main.cpp
index fdaf0466da0..25ae8098742 100644
--- a/cpp/src/slice2rb/Main.cpp
+++ b/cpp/src/slice2rb/Main.cpp
@@ -65,7 +65,6 @@ usage(const char* n)
"--all Generate code for Slice definitions in included files.\n"
"--checksum Generate checksums for Slice definitions.\n"
;
- // Note: --case-sensitive is intentionally not shown here!
}
int
@@ -83,7 +82,6 @@ main(int argc, char* argv[])
opts.addOpt("", "ice");
opts.addOpt("", "all");
opts.addOpt("", "checksum");
- opts.addOpt("", "case-sensitive");
vector<string> args;
try
@@ -144,8 +142,6 @@ main(int argc, char* argv[])
bool checksum = opts.isSet("checksum");
- bool caseSensitive = opts.isSet("case-sensitive");
-
if(args.empty())
{
getErrorStream() << argv[0] << ": error: no input file" << endl;
@@ -186,7 +182,7 @@ main(int argc, char* argv[])
}
else
{
- UnitPtr u = Unit::createUnit(false, all, ice, caseSensitive);
+ UnitPtr u = Unit::createUnit(false, all, ice);
int parseStatus = u->parse(*i, cppHandle, debug);
if(!icecpp.close())
diff --git a/cpp/test/Slice/errorDetection/CaseSensitive.err b/cpp/test/Slice/errorDetection/CaseSensitive.err
deleted file mode 100644
index 061df53b85a..00000000000
--- a/cpp/test/Slice/errorDetection/CaseSensitive.err
+++ /dev/null
@@ -1,3 +0,0 @@
-CaseSensitive.ice:30: redefinition of struct `m2' as class
-CaseSensitive.ice:72: `I8' is not defined
-CaseSensitive.ice:78: `I10' is not defined
diff --git a/cpp/test/Slice/errorDetection/CaseSensitive.ice b/cpp/test/Slice/errorDetection/CaseSensitive.ice
deleted file mode 100644
index 927b52552b9..00000000000
--- a/cpp/test/Slice/errorDetection/CaseSensitive.ice
+++ /dev/null
@@ -1,152 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-
-
-module Test
-{
-
-module M1
-{
-};
-module m1
-{
-};
-
-struct m2
-{
- int i;
-};
-module M2
-{
-};
-class m2
-{
-};
-
-interface i1
-{
-};
-interface I1
-{
-};
-interface i1;
-
-exception e1
-{
-};
-exception E1
-{
-};
-
-interface i2;
-struct I2
-{
- int i;
-};
-
-interface i3;
-sequence<int> I3;
-
-interface i4;
-dictionary<int, int> I4;
-
-interface i5;
-enum I5 { x };
-
-interface i6;
-enum e { I6 };
-
-interface i7;
-const long I7 = 1;
-
-interface i8;
-interface i9
-{
- I8* op();
-};
-
-interface i10;
-interface i11
-{
- I10 op();
-};
-
-interface b1
-{
- void op();
-};
-interface b2
-{
- void OP();
-};
-interface D extends b1, b2
-{
-};
-
-interface i12
-{
- void op();
- void OP();
-};
-
-interface i13
-{
- void I13();
-};
-
-class c1
-{
- int i;
- int I;
-};
-
-class c2
-{
- int C2;
-};
-
-class c3 extends c2
-{
- int c2;
-};
-
-exception e2
-{
- int i;
- int I;
-};
-
-exception e3
-{
- int E3;
-};
-
-struct s1
-{
- int i;
- int I;
-};
-
-struct s2
-{
- int S2;
-};
-
-interface i14
-{
- void op(int i, int I);
-};
-
-interface i15
-{
- void op(int Op);
-};
-
-};
diff --git a/cpp/test/Slice/errorDetection/run.py b/cpp/test/Slice/errorDetection/run.py
index ed1000b8dc6..1cca143dcd0 100755
--- a/cpp/test/Slice/errorDetection/run.py
+++ b/cpp/test/Slice/errorDetection/run.py
@@ -34,10 +34,7 @@ for file in files:
print file + "...",
- if file == "CaseSensitive.ice":
- command = slice2cpp + " --case-sensitive -I. " + os.path.join(os.getcwd(), file);
- else:
- command = slice2cpp + " -I. " + os.path.join(os.getcwd(), file);
+ command = slice2cpp + " -I. " + os.path.join(os.getcwd(), file);
stdin, stdout, stderr = os.popen3(command)
lines1 = stderr.readlines()
lines2 = open(os.path.join(os.getcwd(), regex1.sub(".err", file)), "r").readlines()