rsmith added inline comments.

================
Comment at: lib/Sema/SemaStmt.cpp:823
+                                  CondExpr->isValueDependent() ||
+                                  isa<OpaqueValueExpr>(CondExpr);
+  unsigned CondWidth =
----------------
It's fragile to assume that the only way you can see an `OpaqueValueExpr` here 
is by it being created in `ActOnStartOfSwitchStmt`. We could tunnel this 
information through in another way, though, such as by tracking a bool in the 
`SwitchStack` in addition to the statement.

However, perhaps it's time to bite the bullet and add actual support for error 
nodes in the AST. For example, we could add a new kind of placeholder type for 
an erroneous expression, and build syntactic expression trees with that type 
when we encounter errors.


https://reviews.llvm.org/D26350



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D26350: K... Richard Smith - zygoloid via Phabricator via cfe-commits

Reply via email to