File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -46,21 +46,17 @@ static bool translateCodePointToUTF8(unsigned CodePoint,
4646 return true ;
4747}
4848
49- void clang::EmitClangCommentHTMLNamedCharacterReferences (RecordKeeper &Records,
50- raw_ostream &OS) {
51- std::vector<Record *> Tags = Records.getAllDerivedDefinitions (" NCR" );
49+ void clang::EmitClangCommentHTMLNamedCharacterReferences (
50+ const RecordKeeper &Records, raw_ostream &OS) {
5251 std::vector<StringMatcher::StringPair> NameToUTF8;
5352 SmallString<32 > CLiteral;
54- for (std::vector<Record *>::iterator I = Tags.begin (), E = Tags.end ();
55- I != E; ++I) {
56- Record &Tag = **I;
57- std::string Spelling = std::string (Tag.getValueAsString (" Spelling" ));
58- uint64_t CodePoint = Tag.getValueAsInt (" CodePoint" );
53+ for (const Record *Tag : Records.getAllDerivedDefinitions (" NCR" )) {
54+ std::string Spelling = std::string (Tag->getValueAsString (" Spelling" ));
55+ uint64_t CodePoint = Tag->getValueAsInt (" CodePoint" );
5956 CLiteral.clear ();
6057 CLiteral.append (" return " );
6158 if (!translateCodePointToUTF8 (CodePoint, CLiteral)) {
62- SrcMgr.PrintMessage (Tag.getLoc ().front (),
63- SourceMgr::DK_Error,
59+ SrcMgr.PrintMessage (Tag->getLoc ().front (), SourceMgr::DK_Error,
6460 Twine (" invalid code point" ));
6561 continue ;
6662 }
Original file line number Diff line number Diff line change @@ -88,8 +88,8 @@ void EmitClangCommentHTMLTags(llvm::RecordKeeper &Records,
8888 llvm::raw_ostream &OS);
8989void EmitClangCommentHTMLTagsProperties (llvm::RecordKeeper &Records,
9090 llvm::raw_ostream &OS);
91- void EmitClangCommentHTMLNamedCharacterReferences (llvm::RecordKeeper &Records,
92- llvm::raw_ostream &OS);
91+ void EmitClangCommentHTMLNamedCharacterReferences (
92+ const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
9393
9494void EmitClangCommentCommandInfo (const llvm::RecordKeeper &Records,
9595 llvm::raw_ostream &OS);
You can’t perform that action at this time.
0 commit comments