diff options
author | Chris Lattner <sabre@nondot.org> | 2007-10-09 17:23:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-10-09 17:23:58 +0000 |
commit | 000732226610650837478cba97843d19b75f648e (patch) | |
tree | 03232fd80ed842fb3abdfb2bc6f9fbfd3884db5c /CodeGen/CodeGenFunction.cpp | |
parent | 878520b6413663a13b1b56c7e3f256b1ecbb8db4 (diff) |
Add two new Token helper functions, "is" and "isNot". This allows us to write
stuff like this:
// If we don't have a comma, it is either the end of the list (a ';') or
// an error, bail out.
if (Tok.isNot(tok::comma))
break;
instead of:
// If we don't have a comma, it is either the end of the list (a ';') or
// an error, bail out.
if (Tok.getKind() != tok::comma)
break;
There is obviously no functionality change, but the code reads a bit better and is
more terse.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42795 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions