[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
This commit is contained in:
Thomas Preud'homme 2019-09-02 14:04:05 +00:00
parent a291b950db
commit efa1ca2c25
1 changed files with 2 additions and 2 deletions

View File

@ -109,8 +109,8 @@ private:
public: public:
/// Constructor for a variable \p Name defined at line \p DefLineNumber or /// Constructor for a variable \p Name defined at line \p DefLineNumber or
/// defined before input is parsed if \p DefLineNumber is None. /// defined before input is parsed if \p DefLineNumber is None.
FileCheckNumericVariable(StringRef Name, explicit FileCheckNumericVariable(StringRef Name,
Optional<size_t> DefLineNumber = None) Optional<size_t> DefLineNumber = None)
: Name(Name), DefLineNumber(DefLineNumber) {} : Name(Name), DefLineNumber(DefLineNumber) {}
/// \returns name of this numeric variable. /// \returns name of this numeric variable.