diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2019-09-12 12:16:43 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2019-09-12 12:16:43 +0000 |
commit | 61bc77941ca9d5c3bd3ad147b18279ecb078be88 (patch) | |
tree | f8178e447c5226a8e06efe5e974ae1244e2f581f /include/clang/Basic | |
parent | 4fa80735ed2d1f726cc88b4fd07c0e341920f673 (diff) | |
download | clang-61bc77941ca9d5c3bd3ad147b18279ecb078be88.tar.gz |
Removed some questionable default arguments from setters
Summary:
They can be confusing -- what does it mean to call a setter without a
value? Also, some setters, like `setPrintTemplateTree` had `false` as
the default value!
The callers are largely not using these default arguments anyway.
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67491
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371731 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r-- | include/clang/Basic/Diagnostic.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h index c578dc6a49..9e494aa371 100644 --- a/include/clang/Basic/Diagnostic.h +++ b/include/clang/Basic/Diagnostic.h @@ -632,24 +632,22 @@ public: /// Suppress all diagnostics, to silence the front end when we /// know that we don't want any more diagnostics to be passed along to the /// client - void setSuppressAllDiagnostics(bool Val = true) { - SuppressAllDiagnostics = Val; - } + void setSuppressAllDiagnostics(bool Val) { SuppressAllDiagnostics = Val; } bool getSuppressAllDiagnostics() const { return SuppressAllDiagnostics; } /// Set type eliding, to skip outputting same types occurring in /// template types. - void setElideType(bool Val = true) { ElideType = Val; } + void setElideType(bool Val) { ElideType = Val; } bool getElideType() { return ElideType; } /// Set tree printing, to outputting the template difference in a /// tree format. - void setPrintTemplateTree(bool Val = false) { PrintTemplateTree = Val; } + void setPrintTemplateTree(bool Val) { PrintTemplateTree = Val; } bool getPrintTemplateTree() { return PrintTemplateTree; } /// Set color printing, so the type diffing will inject color markers /// into the output. - void setShowColors(bool Val = false) { ShowColors = Val; } + void setShowColors(bool Val) { ShowColors = Val; } bool getShowColors() { return ShowColors; } /// Specify which overload candidates to show when overload resolution @@ -667,7 +665,7 @@ public: /// the middle of another diagnostic. /// /// This can be used by clients who suppress diagnostics themselves. - void setLastDiagnosticIgnored(bool Ignored = true) { + void setLastDiagnosticIgnored(bool Ignored) { if (LastDiagLevel == DiagnosticIDs::Fatal) FatalErrorOccurred = true; LastDiagLevel = Ignored ? DiagnosticIDs::Ignored : DiagnosticIDs::Warning; |