cmGeneratorTarget: Protect macro code layout from clang-format
The `IMPLEMENT_VISIT_IMPL` macro must preserve a space before the `>` character in case the `DATATYPE` is a template type ending in `>`. Manually format the macro layout as clang-format would except for this space. Then add markup to tell clang-format not to format this macro.
This commit is contained in:
parent
d082810949
commit
c7006d2ef1
|
@ -559,18 +559,18 @@ static void handleSystemIncludesDep(cmLocalGenerator *lg,
|
|||
}
|
||||
}
|
||||
|
||||
#define IMPLEMENT_VISIT_IMPL(DATA, DATATYPE) \
|
||||
{ \
|
||||
std::vector<cmSourceFile*> sourceFiles; \
|
||||
this->GetSourceFiles(sourceFiles, config); \
|
||||
TagVisitor< DATA##Tag DATATYPE > visitor(this, data); \
|
||||
for(std::vector<cmSourceFile*>::const_iterator si = sourceFiles.begin(); \
|
||||
si != sourceFiles.end(); ++si) \
|
||||
{ \
|
||||
visitor.Accept(*si); \
|
||||
} \
|
||||
} \
|
||||
|
||||
/* clang-format off */
|
||||
#define IMPLEMENT_VISIT_IMPL(DATA, DATATYPE) \
|
||||
{ \
|
||||
std::vector<cmSourceFile*> sourceFiles; \
|
||||
this->GetSourceFiles(sourceFiles, config); \
|
||||
TagVisitor< DATA##Tag DATATYPE > visitor(this, data); \
|
||||
for (std::vector<cmSourceFile*>::const_iterator si = sourceFiles.begin(); \
|
||||
si != sourceFiles.end(); ++si) { \
|
||||
visitor.Accept(*si); \
|
||||
} \
|
||||
}
|
||||
/* clang-format on */
|
||||
|
||||
#define IMPLEMENT_VISIT(DATA) \
|
||||
IMPLEMENT_VISIT_IMPL(DATA, EMPTY) \
|
||||
|
|
Loading…
Reference in New Issue