Bug #18862 2013-01-06 08:26
raynebc
Casting a function call to void breaks project parser
As reported here:
http://forums.codeblocks.org/index.php/topic,17070.msg117061.html#msg117061
When a function call's return value is cast to (void) in order to prevent a return value unused warning, right clicking on the name of the function in that line of code and trying to find either the declaration or the implementation of that function reveals that the type cast has broken something in Code::Blocks and neither the declaration nor the implementation can be found.
Deleting the void cast and retrying shows that both the normal and the (void) return value prototypes are offered in the "multiple matches" window, suggesting that C::B's parser incorrectly added a new prototype because of the cast, and was using that when trying to find the declaration/implementation.
- Category
- Application::Editor
- Group
- Status
- Open
- Close date
- Assigned to
- ollydbg
History
This may helps: Index: src/plugins/codecompletion/parser/parserthread.cpp =================================================================== --- src/plugins/codecompletion/parser/parserthread.cpp (wersja 8771) +++ src/plugins/codecompletion/parser/parserthread.cpp (kopia robocza) @@ -1077,7 +1079,9 @@ else if ( (peek == ParserConsts::semicolon) || ( ( m_Options.useBuffer && (peek.GetChar(0) == ParserConsts::opbracket_chr) ) - && (!m_Str.Contains(ParserConsts::dcolon)) ) ) + && (!m_Str.Contains(ParserConsts::dcolon)) + && (!m_Str.Contains(ParserConsts::opbracket_chr)) + && (!m_Str.Contains(ParserConsts::clbracket_chr)) ) ) { if ( !m_Str.IsEmpty() && ( wxIsalpha(token.GetChar(0))
The patches looks good. Thanks.
Ok, it takes me several minutes to read the logic. I'd say the function of DoParse need a lot of comments.
It looks like this bug still occurs in the April 12 nightly build.