From dcfba33481e0c52b07fe2d72833c229840e4cfd5 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Tue, 6 Oct 2015 23:40:43 +0000 Subject: Fix Clang-tidy modernize-use-nullptr warnings in source directories; other minor cleanups Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13406 llvm-svn: 249484 --- clang/lib/Sema/SemaLookup.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'clang/lib/Sema/SemaLookup.cpp') diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index 05a347ecdf3..55ca678a5fa 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/lib/Sema/SemaLookup.cpp @@ -1,4 +1,4 @@ -//===--------------------- SemaLookup.cpp - Name Lookup ------------------===// +//===--------------------- SemaLookup.cpp - Name Lookup --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -11,6 +11,7 @@ // Objective-C++. // //===----------------------------------------------------------------------===// + #include "clang/Sema/Lookup.h" #include "clang/AST/ASTContext.h" #include "clang/AST/ASTMutationListener.h" @@ -204,7 +205,7 @@ namespace { UnqualUsingEntry::Comparator())); } }; -} +} // end anonymous namespace // Retrieve the set of identifier namespaces that correspond to a // specific kind of name lookup. @@ -967,7 +968,7 @@ struct FindLocalExternScope { LookupResult &R; bool OldFindLocalExtern; }; -} +} // end anonymous namespace bool Sema::CppLookupName(LookupResult &R, Scope *S) { assert(getLangOpts().CPlusPlus && "Can perform only C++ lookup"); @@ -2234,7 +2235,7 @@ namespace { Sema::AssociatedClassSet &Classes; SourceLocation InstantiationLoc; }; -} +} // end anonymous namespace static void addAssociatedClassesAndNamespaces(AssociatedLookup &Result, QualType T); @@ -3920,7 +3921,8 @@ void TypoCorrectionConsumer::performQualifiedLookups() { // current correction candidate is the name of that class, then skip // it as it is unlikely a qualified version of the class' constructor // is an appropriate correction. - if (CXXRecordDecl *NSDecl = NSType ? NSType->getAsCXXRecordDecl() : 0) { + if (CXXRecordDecl *NSDecl = NSType ? NSType->getAsCXXRecordDecl() : + nullptr) { if (NSDecl->getIdentifier() == QR.getCorrectionAsIdentifierInfo()) continue; } -- cgit v1.2.3