Skip to content

Commit 3a99f3b

Browse files
authored
Merge pull request swiftlang#16312 from compnerd/disambiguation
Disambiguation
2 parents 0717678 + fd4a16a commit 3a99f3b

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

include/swift/AST/ClangNode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class ClangNode {
111111
namespace llvm {
112112
template <typename T>
113113
struct PointerLikeTypeTraits<swift::detail::ClangNodeBox<T>> {
114-
using Box = swift::detail::ClangNodeBox<T>;
114+
using Box = ::swift::detail::ClangNodeBox<T>;
115115

116116
static inline void *getAsVoidPointer(Box P) {
117117
return const_cast<void *>(static_cast<const void *>(P.value));

include/swift/SIL/SILInstruction.h

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ class SILInstructionResultArray {
153153

154154
class iterator;
155155

156+
friend bool operator==(iterator, iterator);
157+
friend bool operator!=(iterator, iterator);
158+
156159
iterator begin() const;
157160
iterator end() const;
158161

@@ -997,17 +1000,16 @@ class NonValueInstruction : public SILInstruction {
9971000
}
9981001

9991002
/// A helper class for defining some basic boilerplate.
1000-
template <SILInstructionKind Kind, typename Base,
1003+
template <SILInstructionKind Kind, typename InstBase,
10011004
bool IsSingleResult =
1002-
std::is_base_of<SingleValueInstruction, Base>::value>
1005+
std::is_base_of<SingleValueInstruction, InstBase>::value>
10031006
class InstructionBase;
10041007

1005-
template <SILInstructionKind Kind, typename Base>
1006-
class InstructionBase<Kind, Base, /*HasResult*/ true> : public Base {
1008+
template <SILInstructionKind Kind, typename InstBase>
1009+
class InstructionBase<Kind, InstBase, /*HasResult*/ true> : public InstBase {
10071010
protected:
10081011
template <typename... As>
1009-
InstructionBase(As &&...args)
1010-
: Base(Kind, std::forward<As>(args)...) {}
1012+
InstructionBase(As &&... args) : InstBase(Kind, std::forward<As>(args)...) {}
10111013

10121014
public:
10131015
/// Override to statically return the kind.
@@ -1023,12 +1025,11 @@ class InstructionBase<Kind, Base, /*HasResult*/ true> : public Base {
10231025
}
10241026
};
10251027

1026-
template <SILInstructionKind Kind, typename Base>
1027-
class InstructionBase<Kind, Base, /*HasResult*/ false> : public Base {
1028+
template <SILInstructionKind Kind, typename InstBase>
1029+
class InstructionBase<Kind, InstBase, /*HasResult*/ false> : public InstBase {
10281030
protected:
10291031
template <typename... As>
1030-
InstructionBase(As &&...args)
1031-
: Base(Kind, std::forward<As>(args)...) {}
1032+
InstructionBase(As &&... args) : InstBase(Kind, std::forward<As>(args)...) {}
10321033

10331034
public:
10341035
static constexpr SILInstructionKind getKind() {

0 commit comments

Comments
 (0)