Re: [CEDET-devel] Semantic cannot consistently resolve default parameter value
Brought to you by:
zappo
From: David E. <de...@ra...> - 2013-09-21 16:02:15
|
Kiwon Um writes: > Thanks for your quick fix. However, the fix causes another problem. If > I do semantic-analyze-proto-impl-toggle, semantic fails to find > correct implementation/prototype. The previous fix which just dropped > the defaults had no problem. Yes, indeed. We need to ignore default values when searching for prototypes. I added that now. > // Test.hpp //////////////////////// test: toggle to implementation > class A { A(); }; > class Test { > public: > enum {BB = 1}; > > void funcA(const int a=1); // fail > void funcB(const char *b="test"); // fail > void funcC(const bool c=true); // fail > void funcD(const int d=BB); // fail > void funcE(const A e=A()); // fail > void funcF(const int f); // fail (somewhat strange here) > }; > > // Test.cpp //////////////////////// test: toggle to prototype > void Test::funcA(const int a) {} // fail > void Test::funcB(const char *b) {} // fail > void Test::funcC(const bool c) {} // fail > void Test::funcD(const int d) {} // fail > void Test::funcE(const A e) {} // fail > void Test::funcF(const int f) {} // success All of those are working now for me (but remember that you have to include the test.hpp file in test.cpp). -David |