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 252425 - unnamed enum with typedef based strong type breaks parser
Summary: unnamed enum with typedef based strong type breaks parser
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-15 16:55 UTC by Vladimir Voskresensky
Modified: 2015-05-30 10:05 UTC (History)
0 users

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 Vladimir Voskresensky 2015-05-15 16:55:49 UTC
INFO [cnd.logger]: incomplete enum [";",<SEMICOLON>,line=64,col=4],offset=2639,file=null
java.lang.Exception: incomplete enum [";",<SEMICOLON>,line=64,col=4],offset=2639,file=null
[catch] at org.netbeans.modules.cnd.utils.CndUtils.assertTrueInConsole(CndUtils.java:212)
	at org.netbeans.modules.cnd.utils.CndUtils.assertTrueInConsole(CndUtils.java:239)
	at org.netbeans.modules.cnd.modelimpl.csm.EnumImpl.isStronglyTypedEnum(EnumImpl.java:253)
	at org.netbeans.modules.cnd.modelimpl.csm.EnumImpl.<init>(EnumImpl.java:77)
	at org.netbeans.modules.cnd.modelimpl.csm.EnumImpl.create(EnumImpl.java:97)
	at org.netbeans.modules.cnd.modelimpl.csm.ClassImpl$ClassAstRenderer.createEnum(ClassImpl.java:967)
	at org.netbeans.modules.cnd.modelimpl.csm.ClassImpl$ClassAstRenderer.render(ClassImpl.java:758)
	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.createClass(AstRenderer.java:1345)
	at org.netbeans.modules.cnd.modelimpl.csm.core.AstRenderer.render(AstRenderer.java:159)
	at org.netbeans.modules.cnd.modelimpl.csm.core.AstRenderer.render(AstRenderer.java:138)
	at org.netbeans.modules.cnd.modelimpl.csm.core.AstRenderer.render(AstRenderer.java:122)
	at org.netbeans.modules.cnd.modelimpl.parser.ParserProviderImpl$Antlr2CppParser.render(ParserProviderImpl.java:240)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl._parse(FileImpl.java:1109)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.ensureParsedImpl(FileImpl.java:692)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.ensureParsed(FileImpl.java:618)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThread._run(ParserThread.java:148)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThread.run(ParserThread.java:74)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThreadManager$Wrapper.run(ParserThreadManager.java:92)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1425)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2038)


LLVM36/llvm/include/llvm/ADT/PointerIntPair.h: line 50
  enum : uintptr_t {
    /// PointerBitMask - The bits that come from the pointer.
    PointerBitMask =
      ~(uintptr_t)(((intptr_t)1 << PtrTraits::NumLowBitsAvailable)-1),

    /// IntShift - The number of low bits that we reserve for other uses, and
    /// keep zero.
    IntShift = (uintptr_t)PtrTraits::NumLowBitsAvailable-IntBits,
    
    /// IntMask - This is the unshifted mask for valid bits of the int type.
    IntMask = (uintptr_t)(((intptr_t)1 << IntBits)-1),
    
    // ShiftedIntMask - This is the bits for the integer shifted in place.
    ShiftedIntMask = (uintptr_t)(IntMask << IntShift)
  }; // <= line 64
Comment 1 Vladimir Voskresensky 2015-05-15 16:59:39 UTC
another one for 
LLVM36/llvm/include/llvm/IR/Intrinsics.h: line 43

INFO [cnd.logger]: incomplete enum CSM_ENUM_DECLARATION
java.lang.Exception: incomplete enum CSM_ENUM_DECLARATION
[catch] at org.netbeans.modules.cnd.utils.CndUtils.assertTrueInConsole(CndUtils.java:212)
	at org.netbeans.modules.cnd.utils.CndUtils.assertTrueInConsole(CndUtils.java:239)
	at org.netbeans.modules.cnd.modelimpl.csm.EnumImpl.isStronglyTypedEnum(EnumImpl.java:245)
	at org.netbeans.modules.cnd.modelimpl.csm.EnumImpl.<init>(EnumImpl.java:77)
	at org.netbeans.modules.cnd.modelimpl.csm.EnumImpl.create(EnumImpl.java:97)
	at org.netbeans.modules.cnd.modelimpl.csm.core.AstRenderer.createEnum(AstRenderer.java:1355)
	at org.netbeans.modules.cnd.modelimpl.csm.core.AstRenderer.render(AstRenderer.java:185)
	at org.netbeans.modules.cnd.modelimpl.csm.core.AstRenderer.render(AstRenderer.java:138)
	at org.netbeans.modules.cnd.modelimpl.csm.core.AstRenderer.render(AstRenderer.java:138)
	at org.netbeans.modules.cnd.modelimpl.csm.core.AstRenderer.render(AstRenderer.java:122)
	at org.netbeans.modules.cnd.modelimpl.parser.ParserProviderImpl$Antlr2CppParser.render(ParserProviderImpl.java:240)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl._parse(FileImpl.java:1109)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.ensureParsedImpl(FileImpl.java:692)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.ensureParsed(FileImpl.java:618)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThread._run(ParserThread.java:148)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThread.run(ParserThread.java:74)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThreadManager$Wrapper.run(ParserThreadManager.java:92)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1425)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2038)

  enum ID {
    not_intrinsic = 0,   // Must be zero

    // Get the intrinsic enums generated from Intrinsics.td
#define GET_INTRINSIC_ENUM_VALUES
#include "llvm/IR/Intrinsics.gen"
#undef GET_INTRINSIC_ENUM_VALUES
    , num_intrinsics
  };
Comment 2 petrk 2015-05-25 17:57:26 UTC
Fixed in http://hg.netbeans.org/cnd-main/rev/a6e159b64b8e
Comment 3 Vladimir Voskresensky 2015-05-28 19:05:06 UTC
extracted remaining case into issue https://netbeans.org/bugzilla/show_bug.cgi?id=252660
Comment 4 Quality Engineering 2015-05-30 10:05:25 UTC
Integrated into 'main-silver', will be available in build *201505300811* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a6e159b64b8e
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Fixed #252425 - unnamed enum with typedef based strong type breaks parser