diff options
author | Michi Henning <michi@zeroc.com> | 2009-01-28 06:54:53 +1000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2009-01-28 06:54:53 +1000 |
commit | d316cdad7d0a850a8a7828d5b9a7519123bbc29d (patch) | |
tree | 17f8eafb7b547f2a45e5061821b32fc74bfaf685 /cpp | |
parent | Squashed commit of the following: (diff) | |
download | ice-d316cdad7d0a850a8a7828d5b9a7519123bbc29d.tar.bz2 ice-d316cdad7d0a850a8a7828d5b9a7519123bbc29d.tar.xz ice-d316cdad7d0a850a8a7828d5b9a7519123bbc29d.zip |
Squashed commit of the following:
commit cf1aad9f7f2ef0df6dff5300249e2f6683a3ab66
Author: michi <michi@michi.local>
Date: Wed Jan 28 06:47:55 2009 +1000
Added test to C++ to include class with name that is a C++ keyword. The keyword tests
for the other language mappings all already contained a class named with a keyword.
commit 9dd664f3b3ac11c06936fbb5cf51bd8c2b6f87dd
Author: michi <michi@michi.local>
Date: Wed Jan 28 06:34:39 2009 +1000
Bug 3677: slice2cpp generates bad code for class named with C++ keyword
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 2 | ||||
-rw-r--r-- | cpp/test/Slice/keyword/Client.cpp | 12 | ||||
-rw-r--r-- | cpp/test/Slice/keyword/Key.ice | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 51ea19f40d2..22a033421c6 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -3857,7 +3857,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) H << sp << nl << scoped << " _init;"; H << eb << ';'; _doneStaticSymbol = true; - H << sp << nl << "static " << scoped << "__staticInit _" << p->name() << "_init;"; + H << sp << nl << "static " << p->name() << "__staticInit _" << p->name() << "_init;"; } if(p->isLocal()) diff --git a/cpp/test/Slice/keyword/Client.cpp b/cpp/test/Slice/keyword/Client.cpp index d96b6a8694a..5eaf65563a8 100644 --- a/cpp/test/Slice/keyword/Client.cpp +++ b/cpp/test/Slice/keyword/Client.cpp @@ -31,7 +31,7 @@ public: } }; -class complI: public _cpp_and::_cpp_compl +class switchI: public _cpp_and::_cpp_switch { public: virtual void foo(const _cpp_and::charPrx&, Ice::Int&, const ::Ice::Current&) @@ -58,15 +58,15 @@ class friendI : public _cpp_and::_cpp_friend public: virtual _cpp_and::_cpp_auto _cpp_goto(_cpp_and::_cpp_continue, const _cpp_and::_cpp_auto&, const _cpp_and::deletePtr&, - const _cpp_and::complPtr&, const _cpp_and::doPtr&, const _cpp_and::breakPrx&, - const _cpp_and::charPrx&, const _cpp_and::complPrx&, const _cpp_and::doPrx&, + const _cpp_and::switchPtr&, const _cpp_and::doPtr&, const _cpp_and::breakPrx&, + const _cpp_and::charPrx&, const _cpp_and::switchPrx&, const _cpp_and::doPrx&, ::Ice::Int, ::Ice::Int, ::Ice::Int, ::Ice::Int) { return _cpp_and::_cpp_auto(); } }; -class fooI : public _cpp_and::AMI_compl_foo +class fooI : public _cpp_and::AMI_switch_foo { public: @@ -99,9 +99,9 @@ testtypes() e->_cpp_explicit(); _cpp_and::charPtr e1 = new charI(); - _cpp_and::complPrx f; + _cpp_and::switchPrx f; f->foo_async(new fooI(), e); - _cpp_and::complPtr f1 = new complI(); + _cpp_and::switchPtr f1 = new switchI(); _cpp_and::doPrx g; g->_cpp_case(0, d2); diff --git a/cpp/test/Slice/keyword/Key.ice b/cpp/test/Slice/keyword/Key.ice index 2c4238c688c..bb1d0a8e311 100644 --- a/cpp/test/Slice/keyword/Key.ice +++ b/cpp/test/Slice/keyword/Key.ice @@ -35,12 +35,12 @@ interface char void explicit(); }; -class compl +class switch { ["ami"] void foo(char* export, out int volatile); }; -class do extends compl implements char, break +class do extends switch implements char, break { }; @@ -60,8 +60,8 @@ exception sizeof extends return local interface friend { - auto goto(continue if, auto d, delete inline, compl private, do mutable, break* namespace, - char* new, compl* not, do* operator, int or, int protected, int public, int register) + auto goto(continue if, auto d, delete inline, switch private, do mutable, break* namespace, + char* new, switch* not, do* operator, int or, int protected, int public, int register) throws return, sizeof; }; |