forked from qt-creator/qt-creator
CppEditor: Ensure a space between ref qualifier and exception spec
Task-number: QTCREATORBUG-27132 Change-Id: Iedb983f58ece345d5997607d2e557e36c951750f Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -531,7 +531,10 @@ void TypePrettyPrinter::visit(Function *type)
|
|||||||
|
|
||||||
// add exception specifier
|
// add exception specifier
|
||||||
if (const StringLiteral *spec = type->exceptionSpecification()) {
|
if (const StringLiteral *spec = type->exceptionSpecification()) {
|
||||||
appendSpace();
|
if (type->refQualifier() != Function::NoRefQualifier)
|
||||||
|
_text.append(' ');
|
||||||
|
else
|
||||||
|
appendSpace();
|
||||||
_text += QLatin1String(spec->chars());
|
_text += QLatin1String(spec->chars());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -6137,7 +6137,7 @@ struct Derived : public Base {
|
|||||||
original = "#include \"file.h\"\n";
|
original = "#include \"file.h\"\n";
|
||||||
expected = R"DELIM(#include "file.h"
|
expected = R"DELIM(#include "file.h"
|
||||||
|
|
||||||
auto Derived::func() const &&noexcept -> void {}
|
auto Derived::func() const && noexcept -> void {}
|
||||||
)DELIM";
|
)DELIM";
|
||||||
testDocuments << CppTestDocument::create("file.cpp", original, expected);
|
testDocuments << CppTestDocument::create("file.cpp", original, expected);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user