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 271289 - Clank hints: class in header file
Summary: Clank hints: class in header file
Status: RESOLVED DUPLICATE of bug 271290
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: Dev
Hardware: PC Linux
: P3 normal (vote)
Assignee: Maria Tishkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-14 12:18 UTC by soldatov
Modified: 2017-08-22 16:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample (80.00 KB, application/x-tar)
2017-08-14 12:58 UTC, soldatov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2017-08-14 12:18:01 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++ Class and press Next button
- Set Class Name = TestItem
- Press Finish button
- Add "TestItem t;" into newmain.cpp
- Close all files in editor
- Rebuild project
- Open TestItem.h
===> 'unknown type name 'class' error in editor
Comment 1 soldatov 2017-08-14 12:58:06 UTC
Created attachment 164946 [details]
sample
Comment 2 Maria Tishkova 2017-08-22 16:25:04 UTC
this is actually the duplicate of bz#271290
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

*** This bug has been marked as a duplicate of bug 271290 ***