C++: Transfer noexcept specifier for refactoring actions

This applies for e.g.

* "Add Definition..." (on function decl)
* "Move Definition..." (on function decl)
* "Insert Virtual Functions of Base Class" (on class specifier)

Fixes: QTCREATORBUG-11849
Fixes: QTCREATORBUG-19699
Change-Id: I0d259bc1782470f3b3f19617230005a5594a5cca
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Nikolai Kosjar
2019-10-07 14:31:32 +02:00
parent c2aaa93408
commit 54fefd89b8
8 changed files with 49 additions and 2 deletions

View File

@@ -303,6 +303,7 @@ Function::Function(TranslationUnit *translationUnit, int sourceLocation, const N
Function::Function(Clone *clone, Subst *subst, Function *original)
: Scope(clone, subst, original)
, _returnType(clone->type(original->_returnType, subst))
, _exceptionSpecification(original->_exceptionSpecification)
, _flags(original->_flags)
{ }
@@ -534,6 +535,11 @@ bool Function::maybeValidPrototype(int actualArgumentCount) const
return true;
}
const StringLiteral *Function::exceptionSpecification()
{ return _exceptionSpecification; }
void Function::setExceptionSpecification(const StringLiteral *spec)
{ _exceptionSpecification = spec; }
Block::Block(TranslationUnit *translationUnit, int sourceLocation)
: Scope(translationUnit, sourceLocation, /*name = */ nullptr)