This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Working on Qt 4.7.4 (tests/auto/tst_qaccessibility.cpp), the IDE says that "EXPECT(entry == 0 && iface->object() == parent->object());" expands to "do { if (!errorAt && !( entry == 0 && iface->object() == parent->object() )) { errorAt = ; qWarning("level: %d, middle: %d, role: %d (%s)", treelevel, middle, iface->role(0), "entry==0&&iface->object()==parent->object()" ); } } while (0);" and because of the "errorAt = ;" marks the line as error. This is wrong as EXPECT is defined as #define EXPECT(cond) \ do { \ if (!errorAt && !(cond)) { \ errorAt = __LINE__; \ qWarning("level: %d, middle: %d, role: %d (%s)", treelevel, middle, iface->role(0), #cond); \ } \ } while (0) The only problem is the IDE does not handle the __LINE__macro well
Code model should know compile-time macros. Code model should ignore compile-time macro values from tool collection.
hajma, in fact we do support __LINE__ (and other proprocessor built-in macros). The issue you've faced most probable is due to the fact that you use Solaris Studio C++ compiler which reports in it's predefined macro values __LINE__ macro with empty expansion. Workaround would be go to Tools->Options->C++->Code Assistance and in C++ Compiler tab in list of macro values delete __LINE__, __FILE__, ...
Alexander, please, try to do that on toolchain side. Code Model uses provided macro info as is.
fixed, change set: http://hg.netbeans.org/cnd-main/rev/864a9bf831cd
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/864a9bf831cd User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed Bug #205815 __LINE__ breaks macro expansion