diff --git a/clang/include/clang/Lex/Lexer.h b/clang/include/clang/Lex/Lexer.h index 7ef310e957a7..94a94d3b871f 100644 --- a/clang/include/clang/Lex/Lexer.h +++ b/clang/include/clang/Lex/Lexer.h @@ -124,12 +124,12 @@ public: /// the preprocessor. void Lex(LexerToken &Result) { // Start a new token. - Result.StartToken(); + Result.startToken(); // NOTE, any changes here should also change code after calls to // Preprocessor::HandleDirective if (IsAtStartOfLine) { - Result.SetFlag(LexerToken::StartOfLine); + Result.setFlag(LexerToken::StartOfLine); IsAtStartOfLine = false; } @@ -185,8 +185,8 @@ private: /// addition, since tokens cannot overlap, this also updates BufferPtr to be /// TokEnd. void FormTokenWithChars(LexerToken &Result, const char *TokEnd) { - Result.SetLocation(getSourceLocation(BufferPtr)); - Result.SetLength(TokEnd-BufferPtr); + Result.setLocation(getSourceLocation(BufferPtr)); + Result.setLength(TokEnd-BufferPtr); BufferPtr = TokEnd; } diff --git a/clang/include/clang/Lex/LexerToken.h b/clang/include/clang/Lex/LexerToken.h index 1816b9d18a41..cf132f44bac8 100644 --- a/clang/include/clang/Lex/LexerToken.h +++ b/clang/include/clang/Lex/LexerToken.h @@ -52,45 +52,45 @@ public: }; tok::TokenKind getKind() const { return Kind; } - void SetKind(tok::TokenKind K) { Kind = K; } + void setKind(tok::TokenKind K) { Kind = K; } /// getLocation - Return a source location identifier for the specified /// offset in the current file. SourceLocation getLocation() const { return Loc; } unsigned getLength() const { return Length; } - void SetLocation(SourceLocation L) { Loc = L; } - void SetLength(unsigned Len) { Length = Len; } + void setLocation(SourceLocation L) { Loc = L; } + void setLength(unsigned Len) { Length = Len; } - /// StartToken - Reset all flags to cleared. + /// startToken - Reset all flags to cleared. /// - void StartToken() { + void startToken() { Flags = 0; IdentInfo = 0; Loc = SourceLocation(); } IdentifierInfo *getIdentifierInfo() const { return IdentInfo; } - void SetIdentifierInfo(IdentifierInfo *II) { + void setIdentifierInfo(IdentifierInfo *II) { IdentInfo = II; } - /// SetFlag - Set the specified flag. - void SetFlag(TokenFlags Flag) { + /// setFlag - Set the specified flag. + void setFlag(TokenFlags Flag) { Flags |= Flag; } - /// ClearFlag - Unset the specified flag. - void ClearFlag(TokenFlags Flag) { + /// clearFlag - Unset the specified flag. + void clearFlag(TokenFlags Flag) { Flags &= ~Flag; } - /// SetFlagValue - Set a flag to either true or false. - void SetFlagValue(TokenFlags Flag, bool Val) { + /// setFlagValue - Set a flag to either true or false. + void setFlagValue(TokenFlags Flag, bool Val) { if (Val) - SetFlag(Flag); + setFlag(Flag); else - ClearFlag(Flag); + clearFlag(Flag); } /// isAtStartOfLine - Return true if this token is at the start of a line.