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.

Bug 231216 - IDE doesn't recognize operator~
Summary: IDE doesn't recognize operator~
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.4
Hardware: All All
: P2 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
: 231836 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-06-13 13:39 UTC by soldatov
Modified: 2013-06-28 02:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2013-06-13 13:39:22 UTC
AstRendererException in /opt/csw/include/c++/4.8.0/bits/ios_base.h

Simple scenario:
#include <iostream>

class A {
public:
    int i;
    A(int a) {i = a;}
    int operator~ () {return 1 + i;}
    int operator! () {return 2 + i;}
};

int main(int argc, char**argv) {
    A a(2);
    std::cout << ~a << std::endl;
    std::cout << !a << std::endl;
    return 0;
}

Check messages.log:
org.netbeans.modules.cnd.modelimpl.csm.AstRendererException: 
/export/files/NB/Welcome_2/welcome.cc:8:5: error: Empty function name.
	at org.netbeans.modules.cnd.modelimpl.csm.AstRendererException.throwAstRendererException(AstRendererException.java:65)
	at org.netbeans.modules.cnd.modelimpl.csm.MethodDDImpl.create(MethodDDImpl.java:103)
	at org.netbeans.modules.cnd.modelimpl.csm.ClassImpl$ClassAstRenderer.render(ClassImpl.java:962)
	at org.netbeans.modules.cnd.modelimpl.csm.ClassImpl.render(ClassImpl.java:181)
	at org.netbeans.modules.cnd.modelimpl.csm.ClassImpl.init(ClassImpl.java:142)
	at org.netbeans.modules.cnd.modelimpl.csm.ClassImpl.create(ClassImpl.java:228)
	at org.netbeans.modules.cnd.modelimpl.csm.core.AstRenderer.render(AstRenderer.java:154)
	at org.netbeans.modules.cnd.modelimpl.csm.core.AstRenderer.render(AstRenderer.java:117)
	at org.netbeans.modules.cnd.modelimpl.parser.ParserProviderImpl$Antlr2CppParser.render(ParserProviderImpl.java:215)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl._reparse(FileImpl.java:898)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.ensureParsed(FileImpl.java:677)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThread._run(ParserThread.java:149)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThread.run(ParserThread.java:75)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThreadManager$Wrapper.run(ParserThreadManager.java:92)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)
Comment 1 Alexander Simon 2013-06-26 15:32:39 UTC
The bug is a root cause of failing LiteSqlTestCase.testLiteSql unit test that is failing for the past 148 builds (Since #7950 ).
Comment 2 Vladimir Voskresensky 2013-06-27 14:40:45 UTC
http://hg.netbeans.org/cnd-main/rev/0b00977490af
Comment 3 Vladimir Voskresensky 2013-06-27 15:08:07 UTC
*** Bug 231836 has been marked as a duplicate of this bug. ***
Comment 4 Quality Engineering 2013-06-28 02:19:36 UTC
Integrated into 'main-silver', will be available in build *201306272300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/0b00977490af
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #231216 - IDE doesn't recognize operator~
- tilde operator is not destructor