summaryrefslogtreecommitdiff
path: root/lib/AST/CXXInheritance.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-05-12 05:36:57 +0000
committerCraig Topper <craig.topper@gmail.com>2014-05-12 05:36:57 +0000
commit613c4e1cde9bc967e9610869c5eacc6ec74c39ef (patch)
treea827c7967a1adf7c2d9665ccc1fe1983754788dc /lib/AST/CXXInheritance.cpp
parent1a751e402717efb1b1321ab310700ce79a302da8 (diff)
downloadclang-613c4e1cde9bc967e9610869c5eacc6ec74c39ef.tar.gz
[C++11] Use 'nullptr'. AST edition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208517 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/CXXInheritance.cpp')
-rw-r--r--lib/AST/CXXInheritance.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/AST/CXXInheritance.cpp b/lib/AST/CXXInheritance.cpp
index eef043cc5a..6e80ee7c28 100644
--- a/lib/AST/CXXInheritance.cpp
+++ b/lib/AST/CXXInheritance.cpp
@@ -58,7 +58,7 @@ void CXXBasePaths::clear() {
Paths.clear();
ClassSubobjects.clear();
ScratchPath.clear();
- DetectedVirtual = 0;
+ DetectedVirtual = nullptr;
}
/// @brief Swaps the contents of this CXXBasePaths structure with the
@@ -203,7 +203,7 @@ bool CXXBasePaths::lookupInBases(ASTContext &Context,
if (BaseSpec.isVirtual()) {
VisitBase = !Subobjects.first;
Subobjects.first = true;
- if (isDetectingVirtual() && DetectedVirtual == 0) {
+ if (isDetectingVirtual() && DetectedVirtual == nullptr) {
// If this is the first virtual we find, remember it. If it turns out
// there is no base path here, we'll reset it later.
DetectedVirtual = BaseType->getAs<RecordType>();
@@ -286,7 +286,7 @@ bool CXXBasePaths::lookupInBases(ASTContext &Context,
// If we set a virtual earlier, and this isn't a path, forget it again.
if (SetVirtual && !FoundPathThroughBase) {
- DetectedVirtual = 0;
+ DetectedVirtual = nullptr;
}
}
@@ -325,7 +325,7 @@ bool CXXRecordDecl::lookupInBases(BaseMatchesCallback *BaseMatches,
for (CXXBasePath::iterator PE = P->begin(), PEEnd = P->end();
PE != PEEnd && !Hidden; ++PE) {
if (PE->Base->isVirtual()) {
- CXXRecordDecl *VBase = 0;
+ CXXRecordDecl *VBase = nullptr;
if (const RecordType *Record = PE->Base->getType()->getAs<RecordType>())
VBase = cast<CXXRecordDecl>(Record->getDecl());
if (!VBase)
@@ -339,7 +339,7 @@ bool CXXRecordDecl::lookupInBases(BaseMatchesCallback *BaseMatches,
HidingPEnd = Paths.end();
HidingP != HidingPEnd;
++HidingP) {
- CXXRecordDecl *HidingClass = 0;
+ CXXRecordDecl *HidingClass = nullptr;
if (const RecordType *Record
= HidingP->back().Base->getType()->getAs<RecordType>())
HidingClass = cast<CXXRecordDecl>(Record->getDecl());
@@ -625,7 +625,7 @@ FinalOverriderCollector::~FinalOverriderCollector() {
void
CXXRecordDecl::getFinalOverriders(CXXFinalOverriderMap &FinalOverriders) const {
FinalOverriderCollector Collector;
- Collector.Collect(this, false, 0, FinalOverriders);
+ Collector.Collect(this, false, nullptr, FinalOverriders);
// Weed out any final overriders that come from virtual base class
// subobjects that were hidden by other subobjects along any path.