[PATCH] D58292: Add support for importing ChooseExpr AST nodes.

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 20 10:11:34 PST 2019


aaron.ballman added inline comments.


================
Comment at: lib/AST/ASTImporter.cpp:6140
+ExpectedStmt ASTNodeImporter::VisitChooseExpr(ChooseExpr *E) {
+  auto Imp = importSeq(E->getCond(), E->getLHS(), E->getRHS(),
+                       E->getBuiltinLoc(), E->getRParenLoc(), E->getType());
----------------
Please don't use `auto` here; the type isn't spelled out in the initialization.


================
Comment at: lib/AST/ASTImporter.cpp:6160-6162
+  bool CondIsTrue = false;
+  if (!E->isConditionDependent())
+    CondIsTrue = E->isConditionTrue();
----------------
`bool CondIsTrue = E->isConditionDependent() ? false : E->isConditionTrue();`


Repository:
  rC Clang

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

https://reviews.llvm.org/D58292





More information about the cfe-commits mailing list