forked from OSchip/llvm-project
[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:
parent
a291b950db
commit
efa1ca2c25
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue