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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370664
91177308-0d34-0410-b5e6-
96231b3b80d8
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.