Assistant with two actions allowing you to either add a conventional macro-
based header guard or pragma-once.
Details
Details
- Reviewers
arrowd - Group Reviewers
KDevelop - Commits
- R32:a54c46524b8e: Add assistant to generate header guards
Run test_assistants testHeaderGuardAssistant
Diff Detail
Diff Detail
- Repository
- R32 KDevelop
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
plugins/clang/util/clangutils.cpp | ||
---|---|---|
465 | This method uses stuff from libclang 7, so it should be #ifdefed. |
Comment Actions
It now compiles and unit test passes, however my own quick test revealed following problem.
I created an empty file called test.h and typed
int a;
there. Now, trying (2) solution results in
#endif // TEST_H_INCLUDED#ifndef TEST_H_INCLUDED #define TEST_H_INCLUDED int a;
The (1) solution works fine, though.