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 271290 - Clank hints: C++ standard headers in header file
Summary: Clank hints: C++ standard headers in header file
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: Dev
Hardware: PC Linux
: P3 normal (vote)
Assignee: Maria Tishkova
URL:
Keywords:
: 271289 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-08-14 12:25 UTC by soldatov
Modified: 2017-08-30 02:23 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 soldatov 2017-08-14 12:25:03 UTC
Scenario:
- Switch off 'Possible Compile Issues', 'General', 'Suggestions' and 'C Library Functions' hints
- Switch on 'Clank Diagnostics (Experimental)' hints
- Create C/C++ project with newmain.cpp
- Create New File wizard
- Select C++/C++ Header File and press Next button
- Press Finish button
- Add '#include "newfile.h"' into newmain.cpp
- Add '#include <vector>' into newfile.h
- Close all files in editor
- Rebuild project
- Open newfile.h
===> 'vector' file not found
Comment 1 Maria Tishkova 2017-08-22 16:25:04 UTC
*** Bug 271289 has been marked as a duplicate of this bug. ***
Comment 2 Maria Tishkova 2017-08-22 16:26:10 UTC
The problem is in the defaults GCC and clang use. Need to understand the correct fix.

the fix is to send -std=c++11 -stdlib=libstdc++ to the clang.
Not sure how I will implement it yet but fix workaround with adding it these options to the Editor->Hints->C/C++->Clank Diagnostics (Experimental) fixes the problem
Comment 3 Maria Tishkova 2017-08-28 17:38:28 UTC
fixed in cnd-main

changeset:   304478:2a5e6093d25e
tag:         tip
user:        Maria Dalmatova <mromashova@netbeans.org>
date:        Mon Aug 28 20:37:24 2017 +0300
summary:     fixed bz#271290 - Clank hints: C++ standard headers in header fil
Comment 4 Quality Engineering 2017-08-30 02:23:06 UTC
Integrated into 'main-silver', will be available in build *201708300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/2a5e6093d25e
User: Maria Dalmatova <mromashova@netbeans.org>
Log: fixed bz#271290 - Clank hints: C++ standard headers in header file
send standard as an argument to the clank