At the top of clang/Parse/ParseExpr.cpp, there's a comment describing the file:
//===----------------------------------------------------------------------===//
///
/// \file
/// Provides the Expression parsing implementation.
///
/// Expressions in C99 basically consist of a bunch of binary operators with
/// unary operators and other random stuff at the leaves.
///
/// In the C99 grammar, these unary operators bind tightest and are represented
/// as the 'cast-expression' production. Everything else is either a binary
/// operator (e.g. '/') or a ternary operator ("?:"). The unary leaves are
/// handled by ParseCastExpression, the higher level pieces are handled by
/// ParseBinaryExpression.
///
//===----------------------------------------------------------------------===//
But the function ParseBinaryExpression doesn't exist anywhere in the LLVM codebase except in this comment:
$ cd /vol/lec/cc/llvm-project/
$ grep -rIi "ParseBinaryExpression"
clang/lib/Parse/ParseExpr.cpp:/// ParseBinaryExpression.
$
(Searching in github directly also only showed this comment).
This comment was added by Lattner in 2006 in commit cde626a where he introduced both of those functions, but a few commits later (d35c34f) he renames ParseBinaryExpression to ParseExpression (since you can't tell if it's a binary or just a unary until after you parse the first unary expression) but forgets to update the header comment and it remains to this day.
This is a bit of a nothingburger but since it's a header comment it shows up at the top of the doxygen documentation too. Newbies like me who are checking the parser for the first time will see this comment first and get a bit confused for about 5 minutes searching for a non-existent function.
I'll add a pull request that changes that one word in the comment.
At the top of clang/Parse/ParseExpr.cpp, there's a comment describing the file:
But the function ParseBinaryExpression doesn't exist anywhere in the LLVM codebase except in this comment:
(Searching in github directly also only showed this comment).
This comment was added by Lattner in 2006 in commit cde626a where he introduced both of those functions, but a few commits later (d35c34f) he renames ParseBinaryExpression to ParseExpression (since you can't tell if it's a binary or just a unary until after you parse the first unary expression) but forgets to update the header comment and it remains to this day.
This is a bit of a nothingburger but since it's a header comment it shows up at the top of the doxygen documentation too. Newbies like me who are checking the parser for the first time will see this comment first and get a bit confused for about 5 minutes searching for a non-existent function.
I'll add a pull request that changes that one word in the comment.