зеркало из https://github.com/microsoft/clang-1.git
Pass PrintingPolicy by reference, copying it isn't cheap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164781 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
cc59e91a50
Коммит
023bd7d6ff
|
@ -393,9 +393,11 @@ public:
|
|||
OwningPtr<ExternalASTSource> ExternalSource;
|
||||
ASTMutationListener *Listener;
|
||||
|
||||
clang::PrintingPolicy getPrintingPolicy() const { return PrintingPolicy; }
|
||||
const clang::PrintingPolicy &getPrintingPolicy() const {
|
||||
return PrintingPolicy;
|
||||
}
|
||||
|
||||
void setPrintingPolicy(clang::PrintingPolicy Policy) {
|
||||
void setPrintingPolicy(const clang::PrintingPolicy &Policy) {
|
||||
PrintingPolicy = Policy;
|
||||
}
|
||||
|
||||
|
|
|
@ -3033,9 +3033,9 @@ public:
|
|||
|
||||
// FIXME: Remove the string version.
|
||||
void printExceptionSpecification(std::string &S,
|
||||
PrintingPolicy Policy) const;
|
||||
const PrintingPolicy &Policy) const;
|
||||
void printExceptionSpecification(raw_ostream &OS,
|
||||
PrintingPolicy Policy) const;
|
||||
const PrintingPolicy &Policy) const;
|
||||
|
||||
static bool classof(const Type *T) {
|
||||
return T->getTypeClass() == FunctionProto;
|
||||
|
|
|
@ -556,7 +556,8 @@ void TypePrinter::printExtVectorAfter(const ExtVectorType *T, raw_ostream &OS) {
|
|||
|
||||
void
|
||||
FunctionProtoType::printExceptionSpecification(raw_ostream &OS,
|
||||
PrintingPolicy Policy) const {
|
||||
const PrintingPolicy &Policy)
|
||||
const {
|
||||
|
||||
if (hasDynamicExceptionSpec()) {
|
||||
OS << " throw(";
|
||||
|
@ -1343,7 +1344,8 @@ PrintTemplateArgumentList(raw_ostream &OS,
|
|||
|
||||
void
|
||||
FunctionProtoType::printExceptionSpecification(std::string &S,
|
||||
PrintingPolicy Policy) const {
|
||||
const PrintingPolicy &Policy)
|
||||
const {
|
||||
|
||||
if (hasDynamicExceptionSpec()) {
|
||||
S += " throw(";
|
||||
|
|
Загрузка…
Ссылка в новой задаче