[PATCH] D82310: Add `BoolLiteralExpression` to SyntaxTree

Eduardo Caldas via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 22 09:39:47 PDT 2020


eduucaldas marked 3 inline comments as done.
eduucaldas added inline comments.


================
Comment at: clang/include/clang/Tooling/Syntax/Nodes.h:268
 
+/// Expression for boolean literals. C++ [lex.bool]
+class BoolLiteralExpression final : public Expression {
----------------
Homogenize this comments for other literals, and possibly other expressions. To be done in future change


================
Comment at: clang/include/clang/Tooling/Syntax/Nodes.h:269
+/// Expression for boolean literals. C++ [lex.bool]
+class BoolLiteralExpression final : public Expression {
+public:
----------------
Unify Literals under a Literal class, following the grammar, [lex.literal]
To be done in a future change


================
Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:54
 
+  bool isC() const { return Language == Lang_C89 || Language == Lang_C99; }
   bool isC99OrLater() const { return Language == Lang_C99; }
----------------
We could use this to extend the coverage of our tests from `isCXX` to `!isC`. 
To be done in a future change


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82310/new/

https://reviews.llvm.org/D82310





More information about the cfe-commits mailing list