Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352258 - Generate Getters and Setters can generate code containing reserved keywords
Summary: Generate Getters and Setters can generate code containing reserved keywords
Status: VERIFIED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-refactoring (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: 8.0.2   Edit
Assignee: Sergey Prigogin CLA
QA Contact: Sergey Prigogin CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-15 20:07 EDT by Marc-André Laperle CLA
Modified: 2012-02-29 13:22 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc-André Laperle CLA 2011-07-15 20:07:19 EDT
Using CDT 8.0.0.201107150206

1. Open Name Style preferences, for class field, set 
Prefix: m
Capitalization: Camel Case
2. Execute Generate Getters and Setters on a class containing int mClass;
4. void setClass(int class); is generated and contains the reserved 'class' keyword.
Comment 1 Sergey Prigogin CLA 2011-12-28 21:57:26 EST
Fixed in cdt_8_0 and master.
Comment 2 Marc-André Laperle CLA 2012-01-25 01:02:30 EST
This is still really minor but it looks like it can still generate some reserved keywords:

class Test {
	int mInt;
	char mChar;
	float mFloat;
	double mDouble;
	bool mBool;
	int mUnsigned;
	long mLong;
	short mShort;
	signed int mSigned;
};
Comment 3 Sergey Prigogin CLA 2012-01-25 19:16:02 EST
Fixed in cdt_8_0 and master.
Comment 4 Marc-André Laperle CLA 2012-02-03 22:57:39 EST
Verified in 8.0.2 RC2, thanks!
Comment 5 CDT Genie CLA 2012-02-29 13:22:17 EST
*** cdt git genie on behalf of Sergey Prigogin ***

    Bug 352258 - Generate Getters and Setters can generate code containing
    reserved keywords.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=ee0eb1bb4811d40bb9380f743421122d9cafa635
Comment 6 CDT Genie CLA 2012-02-29 13:22:19 EST
*** cdt git genie on behalf of Sergey Prigogin ***

    Bug 352258 - Generate Getters and Setters can generate code containing
    reserved keywords.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=8a91fc9ed2cfbc341b5b62e80d114c08b1268f9e