Use static functions instead of an unnamed namespace

llvm-svn: 174835
This commit is contained in:
Dmitri Gribenko 2013-02-10 11:54:22 +00:00
parent 0a4373058c
commit 74f4d0287f
1 changed files with 8 additions and 6 deletions

View File

@ -15,21 +15,21 @@ void Token::dump(const Lexer &L, const SourceManager &SM) const {
llvm::errs() << " " << Length << " \"" << L.getSpelling(*this, SM) << "\"\n"; llvm::errs() << " " << Length << " \"" << L.getSpelling(*this, SM) << "\"\n";
} }
namespace { static inline bool isHTMLNamedCharacterReferenceCharacter(char C) {
bool isHTMLNamedCharacterReferenceCharacter(char C) {
return isLetter(C); return isLetter(C);
} }
bool isHTMLDecimalCharacterReferenceCharacter(char C) { static inline bool isHTMLDecimalCharacterReferenceCharacter(char C) {
return isDigit(C); return isDigit(C);
} }
bool isHTMLHexCharacterReferenceCharacter(char C) { static inline bool isHTMLHexCharacterReferenceCharacter(char C) {
return isHexDigit(C); return isHexDigit(C);
} }
StringRef convertCodePointToUTF8(llvm::BumpPtrAllocator &Allocator, static inline StringRef convertCodePointToUTF8(
unsigned CodePoint) { llvm::BumpPtrAllocator &Allocator,
unsigned CodePoint) {
char *Resolved = Allocator.Allocate<char>(UNI_MAX_UTF8_BYTES_PER_CODE_POINT); char *Resolved = Allocator.Allocate<char>(UNI_MAX_UTF8_BYTES_PER_CODE_POINT);
char *ResolvedPtr = Resolved; char *ResolvedPtr = Resolved;
if (llvm::ConvertCodePointToUTF8(CodePoint, ResolvedPtr)) if (llvm::ConvertCodePointToUTF8(CodePoint, ResolvedPtr))
@ -38,6 +38,8 @@ StringRef convertCodePointToUTF8(llvm::BumpPtrAllocator &Allocator,
return StringRef(); return StringRef();
} }
namespace {
#include "clang/AST/CommentHTMLTags.inc" #include "clang/AST/CommentHTMLTags.inc"
#include "clang/AST/CommentHTMLNamedCharacterReferences.inc" #include "clang/AST/CommentHTMLNamedCharacterReferences.inc"