summaryrefslogtreecommitdiffstats
path: root/unittests
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-10-11 23:54:34 +0000
committerZachary Turner <zturner@google.com>2017-10-11 23:54:34 +0000
commit6c57331175c84f06b8adbae858043ab5c782355f (patch)
tree9d07627aba9a099b475c89dcee4646829fe9d30b /unittests
parentc353732a31ce095efe760f57c16249790508aa4f (diff)
Revert "[ADT] Make Twine's copy constructor private."
This reverts commit 4e4ee1c507e2707bb3c208e1e1b6551c3015cbf5. This is failing due to some code that isn't built on MSVC so I didn't catch. Not immediately obvious how to fix this at first glance, so I'm reverting for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315536 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Tooling/TestVisitor.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/unittests/Tooling/TestVisitor.h b/unittests/Tooling/TestVisitor.h
index a3a50cf0d4..fb6a76ccad 100644
--- a/unittests/Tooling/TestVisitor.h
+++ b/unittests/Tooling/TestVisitor.h
@@ -128,7 +128,7 @@ public:
/// \brief Expect 'Match' *not* to occur at the given 'Line' and 'Column'.
///
/// Any number of matches can be disallowed.
- void DisallowMatch(const Twine &Match, unsigned Line, unsigned Column) {
+ void DisallowMatch(Twine Match, unsigned Line, unsigned Column) {
DisallowedMatches.push_back(MatchCandidate(Match, Line, Column));
}
@@ -138,7 +138,7 @@ public:
/// Each is expected to be matched 'Times' number of times. (This is useful in
/// cases in which different AST nodes can match at the same source code
/// location.)
- void ExpectMatch(const Twine &Match, unsigned Line, unsigned Column,
+ void ExpectMatch(Twine Match, unsigned Line, unsigned Column,
unsigned Times = 1) {
ExpectedMatches.push_back(ExpectedMatch(Match, Line, Column, Times));
}
@@ -180,10 +180,10 @@ protected:
unsigned LineNumber;
unsigned ColumnNumber;
- MatchCandidate(const Twine &Name, unsigned LineNumber,
- unsigned ColumnNumber)
- : ExpectedName(Name.str()), LineNumber(LineNumber),
- ColumnNumber(ColumnNumber) {}
+ MatchCandidate(Twine Name, unsigned LineNumber, unsigned ColumnNumber)
+ : ExpectedName(Name.str()), LineNumber(LineNumber),
+ ColumnNumber(ColumnNumber) {
+ }
bool Matches(StringRef Name, FullSourceLoc const &Location) const {
return MatchesName(Name) && MatchesLocation(Location);
@@ -211,7 +211,7 @@ protected:
};
struct ExpectedMatch {
- ExpectedMatch(const Twine &Name, unsigned LineNumber, unsigned ColumnNumber,
+ ExpectedMatch(Twine Name, unsigned LineNumber, unsigned ColumnNumber,
unsigned Times)
: Candidate(Name, LineNumber, ColumnNumber), TimesExpected(Times),
TimesSeen(0) {}