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.

View | Details | Raw Unified | Return to bug 149506
Collapse All | Expand All

(-)a/cnd.modelimpl/src/org/netbeans/modules/cnd/modelimpl/parser/cppparser.g (-2 / +2 lines)
Lines 983-994 Link Here
983
                        { #external_declaration = #(#[CSM_FUNCTION_DECLARATION, "CSM_FUNCTION_DECLARATION"], #external_declaration); }
983
                        { #external_declaration = #(#[CSM_FUNCTION_DECLARATION, "CSM_FUNCTION_DECLARATION"], #external_declaration); }
984
        |
984
        |
985
		// Function definition with return value
985
		// Function definition with return value
986
		((LITERAL___extension__)? declaration_specifiers[false, false] function_declarator[true, false] LCURLY)=> 
986
		((LITERAL___extension__)? (options {greedy=true;} :function_attribute_specification!)? declaration_specifiers[false, false] function_declarator[true, false] LCURLY)=>
987
		{if (statementTrace>=1) 
987
		{if (statementTrace>=1) 
988
			printf("external_declaration_8[%d]: Function definition\n",
988
			printf("external_declaration_8[%d]: Function definition\n",
989
				LT(1).getLine());
989
				LT(1).getLine());
990
		}
990
		}
991
		(LITERAL___extension__!)? function_definition
991
		(LITERAL___extension__!)? (options {greedy=true;} :function_attribute_specification!)? function_definition
992
		{ #external_declaration = #(#[CSM_FUNCTION_DEFINITION, "CSM_FUNCTION_DEFINITION"], #external_declaration); }
992
		{ #external_declaration = #(#[CSM_FUNCTION_DEFINITION, "CSM_FUNCTION_DEFINITION"], #external_declaration); }
993
	|
993
	|
994
		// FIXUP: Function definition without return value
994
		// FIXUP: Function definition without return value
(-)a/cnd.modelimpl/test/unit/data/goldenfiles/org/netbeans/modules/cnd/modelimpl/trace/FileModelTest/func_decl_prefix_attributes.cc.dat (+7 lines)
Lines 23-28 Link Here
23
        green [5:44/196-5:53/205]  TYPE: int TEXT=int  [5:44/196-5:47/199]  INIT: null  SCOPE: glFunction 
23
        green [5:44/196-5:53/205]  TYPE: int TEXT=int  [5:44/196-5:47/199]  INIT: null  SCOPE: glFunction 
24
        blue [5:55/207-5:63/215]  TYPE: int TEXT=int  [5:55/207-5:58/210]  INIT: null  SCOPE: glFunction 
24
        blue [5:55/207-5:63/215]  TYPE: int TEXT=int  [5:55/207-5:58/210]  INIT: null  SCOPE: glFunction 
25
    RETURNS void TEXT=void  [5:7/159-5:11/163]
25
    RETURNS void TEXT=void  [5:7/159-5:11/163]
26
FUNCTION DEFINITION foo_149506  [8:37/282-8:64/309] FunctionDDImpl SCOPE: func_decl_prefix_attributes.cc
27
    SIGNATURE foo_149506()
28
    UNIQUE NAME f:foo_149506()
29
    DECLARATION: foo_149506  [8:37/282-8:64/309]
30
    PARAMETERS:
31
    RETURNS void TEXT=void  [8:37/282-8:48/293]
32
    STATEMENT COMPOUND  [8:62/307-8:64/309] SCOPE: foo_149506 
26
33
27
========== Dumping model of PROJECT DummyProject
34
========== Dumping model of PROJECT DummyProject
28
FUNCTION glFunction [5:7/159-5:66/218] FunctionImpl SCOPE: $Global$ 
35
FUNCTION glFunction [5:7/159-5:66/218] FunctionImpl SCOPE: $Global$ 
(-)a/cnd.modelimpl/test/unit/data/org/netbeans/modules/cnd/modelimpl/trace/FileModelTest/func_decl_prefix_attributes.cc (+2 lines)
Lines 4-6 Link Here
4
4
5
GLAPI void GLAPIENTRY glFunction( int red, int green, int blue );
5
GLAPI void GLAPIENTRY glFunction( int red, int green, int blue );
6
6
7
// example from IZ#149506
8
__attribute__((format(printf,0,1))) static void foo_149506() {}

Return to bug 149506