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 270937 - Netbeans fails to see beyond a std::unique_ptr on gcc 7
Summary: Netbeans fails to see beyond a std::unique_ptr on gcc 7
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-22 21:24 UTC by PolesApart
Modified: 2017-09-28 19:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Testcase (28.28 KB, application/x-xz)
2017-09-28 19:55 UTC, PolesApart
Details

Note You need to log in before you can comment on or make changes to this bug.
Description PolesApart 2017-06-22 21:24:31 UTC
On a C++ project, using std::unique_ptr with gcc 7.1 leads to netbeans being unable to see properties of object. This hurts specially if there are a lot of classes with pImpl idiom where the pImpl is a unique_ptr. Not only code completion fails but also method usage.

Trying to ctrl+click on a method e.g. ptr_obj->method() opens gcc's unique_ptr.h  on line 328 which reads:

      /// Return the stored pointer.
      pointer
      operator->() const noexcept
      {
	_GLIBCXX_DEBUG_PEDASSERT(get() != pointer());
	return get();
      }


This file diverges quite significantly from Gcc 6 .

The c++11/14/17 flags and netbeans settings seems to have the same effect (the code is effectively c++14 and compiles and navigates fine with gcc 6, netbeans 8.2 and -std=gnu++14).
Comment 1 PolesApart 2017-09-28 19:55:23 UTC
Created attachment 165203 [details]
Testcase

This is a small test case. With gcc 7 as the default compiler, code completion fails to see beyond the unique_ptr. With gcc 6 all works.