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

Summary: Netbeans fails to see beyond a std::unique_ptr on gcc 7
Product: cnd Reporter: PolesApart
Component: Code CompletionAssignee: petrk
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Testcase

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.