Bug 170683 - valid c++-code marked as error
Summary: valid c++-code marked as error
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (other bugs)
Version First Reported In: 3.4.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-08 15:08 UTC by Andreas Buchenrieder
Modified: 2009-07-24 19:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Buchenrieder 2008-09-08 15:08:33 UTC
Version:           3.4.1 (using KDE 3.5.9)
OS:                Linux
Installed from:    I Don't Know

following (definitive valid) C++Code is marked as an error:

if ( a < foo || a > bar.b() ) {...} // i think it's because the <...>

following works as excepted:

if ( a < foo || a > bar ) {...} // without the method-call

if ( a < foo || a >= bar ) {...} // different relational operator

noone of above code-pieces lead to a compiler-warning (or -error)

Bug found in kdevelop 3.4.1, but should also be in current version
Comment 1 Andreas Pakulat 2008-09-08 17:40:25 UTC
In the future please consider checking existing already closed bugreports.

*** This bug has been marked as a duplicate of bug 133504 ***
Comment 2 David Nolden 2009-07-24 19:33:13 UTC
This is not actually a duplicate of the said bug. Still present in kdev4.
Comment 3 David Nolden 2009-07-24 19:38:37 UTC
SVN commit 1001981 by zwabel:

- Solve some problems in the parser where expressions were falsely recognized as template parameters when '<' and '>' operators had the template-like order.
Example: "if(a < b && c > d)"
- Add test
BUG: 170683


 M  +27 -0     cppduchain/tests/test_duchain.cpp  
 M  +1 -0      cppduchain/tests/test_duchain.h  
 M  +17 -5     parser/parser.cpp  
 M  +3 -0      parser/parser.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1001981
Comment 4 Andreas Pakulat 2009-07-24 19:42:04 UTC
Ooops, sorry seems I was too fast with the duplicate closing, need to read more closely apparently.