diff options
| author | Thomas Preud'homme <thomasp@graphcore.ai> | 2019-09-02 14:04:05 +0000 |
|---|---|---|
| committer | Thomas Preud'homme <thomasp@graphcore.ai> | 2019-09-02 14:04:05 +0000 |
| commit | efa1ca2c25de362a52b7356529c6203fe21cb120 (patch) | |
| tree | b9348a9cf82d57409f3d781423fd2cb9070bcfd5 | |
| parent | a291b950dbd9887e3b9162951b81fcdd71927756 (diff) | |
| download | bcm5719-llvm-efa1ca2c25de362a52b7356529c6203fe21cb120.tar.gz bcm5719-llvm-efa1ca2c25de362a52b7356529c6203fe21cb120.zip | |
[FileCheck] Make NumericVariable ctor explicit
Summary:
Make FileCheckNumericVariable constructor explicit to avoid implicit
conversions from StringRef.
Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66640
llvm-svn: 370664
| -rw-r--r-- | llvm/include/llvm/Support/FileCheck.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/Support/FileCheck.h b/llvm/include/llvm/Support/FileCheck.h index 149666157a6..34301f92bcb 100644 --- a/llvm/include/llvm/Support/FileCheck.h +++ b/llvm/include/llvm/Support/FileCheck.h @@ -109,8 +109,8 @@ private: public: /// Constructor for a variable \p Name defined at line \p DefLineNumber or /// defined before input is parsed if \p DefLineNumber is None. - FileCheckNumericVariable(StringRef Name, - Optional<size_t> DefLineNumber = None) + explicit FileCheckNumericVariable(StringRef Name, + Optional<size_t> DefLineNumber = None) : Name(Name), DefLineNumber(DefLineNumber) {} /// \returns name of this numeric variable. |

