Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggle Function Definition Misbehavior when toggling first member in cpp file #33

Open
PeterSommerlad opened this issue Sep 12, 2019 · 1 comment
Labels
bug Something isn't working upstream-cdt Issue in Eclipse CDT

Comments

@PeterSommerlad
Copy link

Expected Behavior

#ifndef SRC_NAUGHTY_H_
#define SRC_NAUGHTY_H_

class Naughty {
public:
	Naughty() {
		// TODO Auto-generated constructor stub
	}
	virtual ~Naughty() {
		// TODO Auto-generated destructor stub
	}
	Naughty(Naughty const &other) {
		// TODO Auto-generated constructor stub
	}
	Naughty(Naughty &&other) {
		// TODO Auto-generated constructor stub
	}
	Naughty& operator=(const Naughty &other); // TOGGLE FUNCTION DEFINITION
	Naughty& operator=(Naughty &&other);
};

#endif /* SRC_NAUGHTY_H_ */

.cpp file

#include "Naughty.h"

Naughty& Naughty::operator=(const Naughty &other) {
	// TODO Auto-generated method stub
}
Naughty& Naughty::operator=(Naughty &&other) {
	// TODO Auto-generated method stub
}

should just work...

Actual Behavior

#ifndef SRC_NAUGHTY_H_
#define SRC_NAUGHTY_H_

class Naughty {
public:
	Naughty() {
		// TODO Auto-generated constructor stub
	}
	virtual ~Naughty() {
		// TODO Auto-generated destructor stub
	}
	Naughty(Naughty const &other) {
		// TODO Auto-generated constructor stub
	}
	Naughty(Naughty &&other) {
		// TODO Auto-generated constructor stub
	}
	SRC_NAUGHTY_H_ Naughty& operator =(Naughty const &other) {
		// TODO Auto-generated method stub
	}
	Naughty& operator=(Naughty &&other);
};

#endif /* SRC_NAUGHTY_H_ */

Where does the macro come from. Computation of tokens wrong? .cpp file is ok

starting from the last member to the top works. seems to be special interaction between toggling the first member left in the .cpp file and somehow spuriously picking up the include gaurd macro name.

Cevelop Version, Operating System and Compiler

Cevelop C++ IDE

Version: 1.12.1-201907081203

@tcorbat
Copy link
Contributor

tcorbat commented Sep 12, 2019 via email

@fmorgner fmorgner transferred this issue from Cevelop/Issues Feb 23, 2021
@fmorgner fmorgner added bug Something isn't working upstream-cdt Issue in Eclipse CDT labels Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream-cdt Issue in Eclipse CDT
Projects
None yet
Development

No branches or pull requests

3 participants