diff options
| author | Craig Topper <craig.topper@gmail.com> | 2014-05-07 06:21:57 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2014-05-07 06:21:57 +0000 |
| commit | 8ae12039925631052e0da159782e7513b8e7d450 (patch) | |
| tree | 03a5aea5a563602644c69b72ef3c8b27fb076c09 /clang/utils | |
| parent | 15007ba94a581bac1cf167db0f18ea607823477f (diff) | |
| download | bcm5719-llvm-8ae12039925631052e0da159782e7513b8e7d450.tar.gz bcm5719-llvm-8ae12039925631052e0da159782e7513b8e7d450.zip | |
[C++11] Use 'nullptr'.
llvm-svn: 208163
Diffstat (limited to 'clang/utils')
| -rw-r--r-- | clang/utils/TableGen/ClangASTNodesEmitter.cpp | 2 | ||||
| -rw-r--r-- | clang/utils/TableGen/ClangAttrEmitter.cpp | 8 | ||||
| -rw-r--r-- | clang/utils/TableGen/ClangDiagnosticsEmitter.cpp | 7 | ||||
| -rw-r--r-- | clang/utils/TableGen/ClangSACheckersEmitter.cpp | 2 | ||||
| -rw-r--r-- | clang/utils/TableGen/NeonEmitter.cpp | 2 |
5 files changed, 11 insertions, 10 deletions
diff --git a/clang/utils/TableGen/ClangASTNodesEmitter.cpp b/clang/utils/TableGen/ClangASTNodesEmitter.cpp index 682f9c7ba11..b17a4a374a2 100644 --- a/clang/utils/TableGen/ClangASTNodesEmitter.cpp +++ b/clang/utils/TableGen/ClangASTNodesEmitter.cpp @@ -77,7 +77,7 @@ std::pair<Record *, Record *> ClangASTNodesEmitter::EmitNode( ChildIterator i = Tree.lower_bound(Base), e = Tree.upper_bound(Base); - Record *First = 0, *Last = 0; + Record *First = nullptr, *Last = nullptr; // This might be the pseudo-node for Stmt; don't assume it has an Abstract // bit if (Base->getValue("Abstract") && !Base->getValueAsBit("Abstract")) diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp index b4dc56a6dca..6aca97ac743 100644 --- a/clang/utils/TableGen/ClangAttrEmitter.cpp +++ b/clang/utils/TableGen/ClangAttrEmitter.cpp @@ -132,7 +132,7 @@ static StringRef NormalizeAttrSpelling(StringRef AttrSpelling) { typedef std::vector<std::pair<std::string, Record *>> ParsedAttrMap; static ParsedAttrMap getParsedAttrList(const RecordKeeper &Records, - ParsedAttrMap *Dupes = 0) { + ParsedAttrMap *Dupes = nullptr) { std::vector<Record *> Attrs = Records.getAllDerivedDefinitions("Attr"); std::set<std::string> Seen; ParsedAttrMap R; @@ -959,11 +959,11 @@ namespace { } static std::unique_ptr<Argument> createArgument(Record &Arg, StringRef Attr, - Record *Search = 0) { + Record *Search = nullptr) { if (!Search) Search = &Arg; - Argument *Ptr = 0; + Argument *Ptr = nullptr; llvm::StringRef ArgName = Search->getName(); if (ArgName == "AlignedArgument") Ptr = new AlignedArgument(Arg, Attr); @@ -2503,7 +2503,7 @@ void EmitClangAttrParsedAttrKinds(RecordKeeper &Records, raw_ostream &OS) { std::vector<FlattenedSpelling> Spellings = GetFlattenedSpellings(Attr); for (const auto &S : Spellings) { std::string RawSpelling = S.name(); - std::vector<StringMatcher::StringPair> *Matches = 0; + std::vector<StringMatcher::StringPair> *Matches = nullptr; std::string Spelling, Variety = S.variety(); if (Variety == "CXX11") { Matches = &CXX11; diff --git a/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp b/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp index 58472a97659..b4cc70669eb 100644 --- a/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp +++ b/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp @@ -135,7 +135,7 @@ namespace { const Record *ExplicitDef; - GroupInfo() : ExplicitDef(0) {} + GroupInfo() : ExplicitDef(nullptr) {} }; } // end anonymous namespace. @@ -170,7 +170,8 @@ static void groupDiagnostics(const std::vector<Record*> &Diags, for (unsigned i = 0, e = Diags.size(); i != e; ++i) { const Record *R = Diags[i]; DefInit *DI = dyn_cast<DefInit>(R->getValueInit("Group")); - if (DI == 0) continue; + if (!DI) + continue; assert(R->getValueAsDef("Class")->getName() != "CLASS_NOTE" && "Note can't be in a DiagGroup"); std::string GroupName = DI->getDef()->getValueAsString("GroupName"); @@ -507,7 +508,7 @@ void EmitClangDiagsDefs(RecordKeeper &Records, raw_ostream &OS, // Compute the set of diagnostics that are in -Wpedantic. RecordSet DiagsInPedantic; InferPedantic inferPedantic(DGParentMap, Diags, DiagGroups, DiagsInGroup); - inferPedantic.compute(&DiagsInPedantic, (RecordVec*)0); + inferPedantic.compute(&DiagsInPedantic, (RecordVec*)nullptr); for (unsigned i = 0, e = Diags.size(); i != e; ++i) { const Record &R = *Diags[i]; diff --git a/clang/utils/TableGen/ClangSACheckersEmitter.cpp b/clang/utils/TableGen/ClangSACheckersEmitter.cpp index 8c74064a636..115527ae330 100644 --- a/clang/utils/TableGen/ClangSACheckersEmitter.cpp +++ b/clang/utils/TableGen/ClangSACheckersEmitter.cpp @@ -129,7 +129,7 @@ void EmitClangSACheckers(RecordKeeper &Records, raw_ostream &OS) { for (unsigned i = 0, e = checkers.size(); i != e; ++i) { Record *R = checkers[i]; - Record *package = 0; + Record *package = nullptr; if (DefInit * DI = dyn_cast<DefInit>(R->getValueInit("ParentPackage"))) package = DI->getDef(); diff --git a/clang/utils/TableGen/NeonEmitter.cpp b/clang/utils/TableGen/NeonEmitter.cpp index 165e749b334..6dfdcb30ff2 100644 --- a/clang/utils/TableGen/NeonEmitter.cpp +++ b/clang/utils/TableGen/NeonEmitter.cpp @@ -2655,7 +2655,7 @@ void NeonEmitter::run(raw_ostream &OS) { std::string TypedefTypes( "cQcsQsiQilQlUcQUcUsQUsUiQUiUlQUlhQhfQfdQdPcQPcPsQPsPlQPl"); SmallVector<StringRef, 24> TDTypeVec; - ParseTypes(0, TypedefTypes, TDTypeVec); + ParseTypes(nullptr, TypedefTypes, TDTypeVec); // Emit vector typedefs. bool isA64 = false; |

