[PATCH] D66640: [FileCheck] Make NumericVariable ctor explicit
Thomas Preud'homme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 23 04:07:53 PDT 2019
thopre created this revision.
thopre added reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk.
thopre added a project: LLVM.
thopre added a parent revision: D66141: [FileCheck] Forbid using var defined on same line.
Make FileCheckNumericVariable constructor explicit to avoid implicit
conversions from StringRef.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D66640
Files:
llvm/include/llvm/Support/FileCheck.h
Index: llvm/include/llvm/Support/FileCheck.h
===================================================================
--- llvm/include/llvm/Support/FileCheck.h
+++ llvm/include/llvm/Support/FileCheck.h
@@ -109,8 +109,8 @@
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) {
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66640.216800.patch
Type: text/x-patch
Size: 670 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190823/edd70253/attachment.bin>
More information about the llvm-commits
mailing list