summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/CXXInheritance.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2018-07-30 19:24:48 +0000
committerFangrui Song <maskray@google.com>2018-07-30 19:24:48 +0000
commit6907ce2f8f7410b179beb6e2db9c8d16a257ce9f (patch)
tree31081ac1b3df5965102999757410e052925e03af /clang/lib/AST/CXXInheritance.cpp
parentce9b3e084c43e99fbcfeb730ddb5fd0e575d5237 (diff)
downloadbcm5719-llvm-6907ce2f8f7410b179beb6e2db9c8d16a257ce9f.tar.gz
bcm5719-llvm-6907ce2f8f7410b179beb6e2db9c8d16a257ce9f.zip
Remove trailing space
sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h} llvm-svn: 338291
Diffstat (limited to 'clang/lib/AST/CXXInheritance.cpp')
-rw-r--r--clang/lib/AST/CXXInheritance.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/clang/lib/AST/CXXInheritance.cpp b/clang/lib/AST/CXXInheritance.cpp
index 2825329775e..a0b22b6a85e 100644
--- a/clang/lib/AST/CXXInheritance.cpp
+++ b/clang/lib/AST/CXXInheritance.cpp
@@ -99,7 +99,7 @@ bool CXXRecordDecl::isDerivedFrom(const CXXRecordDecl *Base,
CXXBasePaths &Paths) const {
if (getCanonicalDecl() == Base->getCanonicalDecl())
return false;
-
+
Paths.setOrigin(const_cast<CXXRecordDecl*>(this));
const CXXRecordDecl *BaseDecl = Base->getCanonicalDecl();
@@ -120,7 +120,7 @@ bool CXXRecordDecl::isVirtuallyDerivedFrom(const CXXRecordDecl *Base) const {
if (getCanonicalDecl() == Base->getCanonicalDecl())
return false;
-
+
Paths.setOrigin(const_cast<CXXRecordDecl*>(this));
const CXXRecordDecl *BaseDecl = Base->getCanonicalDecl();
@@ -165,7 +165,7 @@ bool CXXRecordDecl::forallBases(ForallBasesCallback BaseMatches,
continue;
}
- CXXRecordDecl *Base =
+ CXXRecordDecl *Base =
cast_or_null<CXXRecordDecl>(Ty->getDecl()->getDefinition());
if (!Base ||
(Base->isDependentContext() &&
@@ -174,7 +174,7 @@ bool CXXRecordDecl::forallBases(ForallBasesCallback BaseMatches,
AllMatches = false;
continue;
}
-
+
Queue.push_back(Base);
if (!BaseMatches(Base)) {
if (AllowShortCircuit) return false;
@@ -209,12 +209,12 @@ bool CXXBasePaths::lookupInBases(ASTContext &Context,
// C++ [temp.dep]p3:
// In the definition of a class template or a member of a class template,
// if a base class of the class template depends on a template-parameter,
- // the base class scope is not examined during unqualified name lookup
- // either at the point of definition of the class template or member or
+ // the base class scope is not examined during unqualified name lookup
+ // either at the point of definition of the class template or member or
// during an instantiation of the class tem- plate or member.
if (!LookupInDependent && BaseType->isDependentType())
continue;
-
+
// Determine whether we need to visit this base class at all,
// updating the count of subobjects appropriately.
IsVirtBaseAndNumberNonVirtBases &Subobjects = ClassSubobjects[BaseType];
@@ -261,13 +261,13 @@ bool CXXBasePaths::lookupInBases(ASTContext &Context,
if (IsFirstStep)
ScratchPath.Access = BaseSpec.getAccessSpecifier();
else
- ScratchPath.Access = CXXRecordDecl::MergeAccess(AccessToHere,
+ ScratchPath.Access = CXXRecordDecl::MergeAccess(AccessToHere,
BaseSpec.getAccessSpecifier());
}
-
+
// Track whether there's a path involving this specific base.
bool FoundPathThroughBase = false;
-
+
if (BaseMatches(&BaseSpec, ScratchPath)) {
// We've found a path that terminates at this base.
FoundPath = FoundPathThroughBase = true;
@@ -313,15 +313,15 @@ bool CXXBasePaths::lookupInBases(ASTContext &Context,
// a sub-object A if A is a base class sub-object of B. Any
// declarations that are so hidden are eliminated from
// consideration.
-
- // There is a path to a base class that meets the criteria. If we're
+
+ // There is a path to a base class that meets the criteria. If we're
// not collecting paths or finding ambiguities, we're done.
FoundPath = FoundPathThroughBase = true;
if (!isFindingAmbiguities())
return FoundPath;
}
}
-
+
// Pop this base specifier off the current path (if we're
// collecting paths).
if (isRecordingPaths()) {
@@ -336,7 +336,7 @@ bool CXXBasePaths::lookupInBases(ASTContext &Context,
// Reset the scratch path access.
ScratchPath.Access = AccessToHere;
-
+
return FoundPath;
}
@@ -352,7 +352,7 @@ bool CXXRecordDecl::lookupInBases(BaseMatchesCallback BaseMatches,
// we're done.
if (!Paths.isRecordingPaths() || !Paths.isFindingAmbiguities())
return true;
-
+
// C++ [class.member.lookup]p6:
// When virtual base classes are used, a hidden declaration can be
// reached along a path through the sub-object lattice that does
@@ -396,7 +396,7 @@ bool CXXRecordDecl::lookupInBases(BaseMatchesCallback BaseMatches,
return true;
}
-bool CXXRecordDecl::FindBaseClass(const CXXBaseSpecifier *Specifier,
+bool CXXRecordDecl::FindBaseClass(const CXXBaseSpecifier *Specifier,
CXXBasePath &Path,
const CXXRecordDecl *BaseRecord) {
assert(BaseRecord->getCanonicalDecl() == BaseRecord &&
@@ -405,7 +405,7 @@ bool CXXRecordDecl::FindBaseClass(const CXXBaseSpecifier *Specifier,
->getCanonicalDecl() == BaseRecord;
}
-bool CXXRecordDecl::FindVirtualBaseClass(const CXXBaseSpecifier *Specifier,
+bool CXXRecordDecl::FindVirtualBaseClass(const CXXBaseSpecifier *Specifier,
CXXBasePath &Path,
const CXXRecordDecl *BaseRecord) {
assert(BaseRecord->getCanonicalDecl() == BaseRecord &&
@@ -415,7 +415,7 @@ bool CXXRecordDecl::FindVirtualBaseClass(const CXXBaseSpecifier *Specifier,
->getCanonicalDecl() == BaseRecord;
}
-bool CXXRecordDecl::FindTagMember(const CXXBaseSpecifier *Specifier,
+bool CXXRecordDecl::FindTagMember(const CXXBaseSpecifier *Specifier,
CXXBasePath &Path,
DeclarationName Name) {
RecordDecl *BaseRecord =
@@ -490,12 +490,12 @@ bool CXXRecordDecl::FindOMPReductionMember(const CXXBaseSpecifier *Specifier,
}
bool CXXRecordDecl::
-FindNestedNameSpecifierMember(const CXXBaseSpecifier *Specifier,
+FindNestedNameSpecifierMember(const CXXBaseSpecifier *Specifier,
CXXBasePath &Path,
DeclarationName Name) {
RecordDecl *BaseRecord =
Specifier->getType()->castAs<RecordType>()->getDecl();
-
+
for (Path.Decls = BaseRecord->lookup(Name);
!Path.Decls.empty();
Path.Decls = Path.Decls.slice(1)) {
@@ -504,7 +504,7 @@ FindNestedNameSpecifierMember(const CXXBaseSpecifier *Specifier,
Path.Decls.front()->isInIdentifierNamespace(IDNS_Tag))
return true;
}
-
+
return false;
}
@@ -538,20 +538,20 @@ std::vector<const NamedDecl *> CXXRecordDecl::lookupDependentName(
return Results;
}
-void OverridingMethods::add(unsigned OverriddenSubobject,
+void OverridingMethods::add(unsigned OverriddenSubobject,
UniqueVirtualMethod Overriding) {
SmallVectorImpl<UniqueVirtualMethod> &SubobjectOverrides
= Overrides[OverriddenSubobject];
- if (std::find(SubobjectOverrides.begin(), SubobjectOverrides.end(),
+ if (std::find(SubobjectOverrides.begin(), SubobjectOverrides.end(),
Overriding) == SubobjectOverrides.end())
SubobjectOverrides.push_back(Overriding);
}
void OverridingMethods::add(const OverridingMethods &Other) {
for (const_iterator I = Other.begin(), IE = Other.end(); I != IE; ++I) {
- for (overriding_const_iterator M = I->second.begin(),
+ for (overriding_const_iterator M = I->second.begin(),
MEnd = I->second.end();
- M != MEnd;
+ M != MEnd;
++M)
add(I->first, *M);
}
@@ -586,7 +586,7 @@ public:
} // namespace
-void FinalOverriderCollector::Collect(const CXXRecordDecl *RD,
+void FinalOverriderCollector::Collect(const CXXRecordDecl *RD,
bool VirtualBase,
const CXXRecordDecl *InVirtualSubobject,
CXXFinalOverriderMap &Overriders) {
@@ -633,7 +633,7 @@ void FinalOverriderCollector::Collect(const CXXRecordDecl *RD,
// Merge the overriders from this base class into our own set of
// overriders.
- for (CXXFinalOverriderMap::iterator OM = BaseOverriders->begin(),
+ for (CXXFinalOverriderMap::iterator OM = BaseOverriders->begin(),
OMEnd = BaseOverriders->end();
OM != OMEnd;
++OM) {
@@ -656,7 +656,7 @@ void FinalOverriderCollector::Collect(const CXXRecordDecl *RD,
if (OverriddenMethods.begin() == OverriddenMethods.end()) {
// This is a new virtual function that does not override any
// other virtual function. Add it to the map of virtual
- // functions for which we are tracking overridders.
+ // functions for which we are tracking overridders.
// C++ [class.virtual]p2:
// For convenience we say that any virtual function overrides itself.
@@ -711,12 +711,12 @@ void FinalOverriderCollector::Collect(const CXXRecordDecl *RD,
FinalOverriderCollector::~FinalOverriderCollector() {
for (llvm::DenseMap<const CXXRecordDecl *, CXXFinalOverriderMap *>::iterator
VO = VirtualOverriders.begin(), VOEnd = VirtualOverriders.end();
- VO != VOEnd;
+ VO != VOEnd;
++VO)
delete VO->second;
}
-void
+void
CXXRecordDecl::getFinalOverriders(CXXFinalOverriderMap &FinalOverriders) const {
FinalOverriderCollector Collector;
Collector.Collect(this, false, nullptr, FinalOverriders);
@@ -754,7 +754,7 @@ CXXRecordDecl::getFinalOverriders(CXXFinalOverriderMap &FinalOverriders) const {
}
}
-static void
+static void
AddIndirectPrimaryBases(const CXXRecordDecl *RD, ASTContext &Context,
CXXIndirectPrimaryBaseSet& Bases) {
// If the record has a virtual primary base class, add it to our set.
@@ -777,7 +777,7 @@ AddIndirectPrimaryBases(const CXXRecordDecl *RD, ASTContext &Context,
}
-void
+void
CXXRecordDecl::getIndirectPrimaryBases(CXXIndirectPrimaryBaseSet& Bases) const {
ASTContext &Context = getASTContext();
OpenPOWER on IntegriCloud