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 243516 - inaccuracy tests (clang): unexpected token '<no text>'
Summary: inaccuracy tests (clang): unexpected token '<no text>'
Status: RESOLVED WONTFIX
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.0.1
Hardware: PC Solaris
: P2 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-03 12:35 UTC by soldatov
Modified: 2014-04-15 11:24 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 2014-04-03 12:35:51 UTC
File: CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp
Errors:
CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp 1 unexpected token: <no text>
Expected error: CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp 4 Unable to resolve identifier e1.
Expected error: CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp 6 Unable to resolve identifier e2.
Expected error: CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp 9 Unable to resolve identifier g.
Comment 1 soldatov 2014-04-03 12:36:27 UTC
Code:
// RUN: %clang_cc1 -fsyntax-only -verify %s

struct A { };
A::A (enum { e1 }) {} // expected-error{{can not be defined in a parameter}} \
// expected-error{{out-of-line definition}}
void A::f(enum { e2 }) {} // expected-error{{can not be defined in a parameter}} \
// expected-error{{out-of-line definition}}

enum { e3 } A::g() { } // expected-error{{can not be defined in the result type}} \
// expected-error{{out-of-line definition}}
Comment 2 petrk 2014-04-15 11:24:59 UTC
Probably we shouldn't fix it because enums/class/unions cannot be defined inside parameters and return types. Maybe if we are talking only about syntax there is a problem, but in the real code nothing like that could happen.