[PATCH] D149904: Generic selection expressions that accept a type operand
Mariya Podchishchaeva via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 5 04:54:20 PDT 2023
Fznamznon added inline comments.
================
Comment at: clang/lib/AST/ASTImporter.cpp:7033-7036
+ if (E->isExprPredicate())
+ ToControllingExpr = importChecked(Err, E->getControllingExpr());
+ else
+ ToControllingType = importChecked(Err, E->getControllingType());
----------------
Just a NIT: would something like
```
ToControllingExpr = importChecked(Err, E->isExprPredicate()? E->getControllingExpr() : E->getControllingType());
```
look a bit more elegant (when also formatted properly)?
================
Comment at: clang/lib/Parse/ParseExpr.cpp:3308
+ return ExprError();
+ } else {
+ const auto *LIT = cast<LocInfoType>(ControllingType.get().get());
----------------
No `else` after return?
================
Comment at: clang/lib/Parse/ParseTentative.cpp:645
isAmbiguous = true;
-
+ // We are supopsed to be inside the first operand to a _Generic selection
+ // expression, so if we find a comma after the declarator, we've found a
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149904/new/
https://reviews.llvm.org/D149904
More information about the cfe-commits
mailing list