[llvm] r370664 - [FileCheck] Make NumericVariable ctor explicit
Thomas Preud'homme via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 2 07:04:05 PDT 2019
Author: thopre
Date: Mon Sep 2 07:04:05 2019
New Revision: 370664
URL: http://llvm.org/viewvc/llvm-project?rev=370664&view=rev
Log:
[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
Modified:
llvm/trunk/include/llvm/Support/FileCheck.h
Modified: llvm/trunk/include/llvm/Support/FileCheck.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/FileCheck.h?rev=370664&r1=370663&r2=370664&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/FileCheck.h (original)
+++ llvm/trunk/include/llvm/Support/FileCheck.h Mon Sep 2 07:04:05 2019
@@ -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.
More information about the llvm-commits
mailing list