Skip to content

Resolve some doccomment and Swift interop warnings #8308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions clang/include/clang/AST/DependentDiagnostic.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,11 @@ class DeclContext::ddiag_iterator {
return tmp;
}

#ifndef __swift__
bool operator==(ddiag_iterator Other) const {
return Ptr == Other.Ptr;
}
#endif

bool operator!=(ddiag_iterator Other) const {
return Ptr != Other.Ptr;
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Sema/CodeCompleteConsumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class CodeCompletionContext {
/// error and don't know which completions we should give.
CCC_Recovery,

/// Code completion in a `@class` forward declaration.
/// Code completion in a \c \@class forward declaration.
CCC_ObjCClassForwardDecl
};

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/IR/DIBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ namespace llvm {
/// \param UniqueIdentifier A unique identifier for the union.
/// \param OffsetInBits The offset of the variant payload in the variant
/// type.
/// \param SpareBitMask A mask of spare bits of the payload, spare bits are
/// \param SpareBitsMask A mask of spare bits of the payload, spare bits are
/// bits that aren't used in any of the variant's cases.
DICompositeType *
createVariantPart(DIScope *Scope, StringRef Name, DIFile *File,
Expand Down
4 changes: 4 additions & 0 deletions llvm/include/llvm/Transforms/IPO/Attributor.h
Original file line number Diff line number Diff line change
Expand Up @@ -5623,7 +5623,9 @@ struct AAPointerInfo : public AbstractAttribute {

unsigned size() const { return Ranges.size(); }

#ifndef __swift__
bool operator==(const RangeList &OI) const { return Ranges == OI.Ranges; }
#endif

/// Merge the ranges in \p RHS into the current ranges.
/// - Merging a list of unknown ranges makes the current list unknown.
Expand Down Expand Up @@ -5757,11 +5759,13 @@ struct AAPointerInfo : public AbstractAttribute {
Access(const Access &Other) = default;

Access &operator=(const Access &Other) = default;
#ifndef __swift__
bool operator==(const Access &R) const {
return LocalI == R.LocalI && RemoteI == R.RemoteI && Ranges == R.Ranges &&
Content == R.Content && Kind == R.Kind;
}
bool operator!=(const Access &R) const { return !(*this == R); }
#endif

Access &operator&=(const Access &R) {
assert(RemoteI == R.RemoteI && "Expected same instruction!");
Expand Down
2 changes: 2 additions & 0 deletions llvm/include/llvm/Transforms/IPO/SampleContextTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,15 @@ class SampleContextTracker {
return *this;
}

#ifndef __swift__
bool operator==(const Iterator &Other) const {
if (NodeQueue.empty() && Other.NodeQueue.empty())
return true;
if (NodeQueue.empty() || Other.NodeQueue.empty())
return false;
return NodeQueue.front() == Other.NodeQueue.front();
}
#endif

ContextTrieNode *operator*() const {
assert(!NodeQueue.empty() && "Invalid access to end iterator");
Expand Down