[PATCH] D83215: [AST][RecoveryExpr] Clarify the documentation of RecoveryExpr.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 7 02:52:59 PDT 2020
sammccall added inline comments.
================
Comment at: clang/include/clang/AST/Expr.h:6229
+///
+/// FIXME: RecoveryExpr is C++ only, make it work for C by supporting dependence
+/// mechanism for C language in clang.
----------------
this could be a little more specific (e.g. what does C++ only mean)...
FIXME: RecoveryExpr is currently generated by default in C++ mode only, as dependence isn't handled properly on several C-only codepaths.
================
Comment at: clang/lib/AST/ComputeDependence.cpp:498
ExprDependence clang::computeDependence(RecoveryExpr *E) {
- // Mark the expression as value- and instantiation- dependent to reuse
- // existing suppressions for dependent code, e.g. avoiding
- // constant-evaluation.
- // FIXME: drop type+value+instantiation once Error is sufficient to suppress
- // bogus dianostics.
+ // RecoveryExpr dependence-bits setting:
+ // - type-dep is set if we don't know about the type (fallback to an opaque
----------------
I can't really follow this explanation.
- The first bullet says when, the other two bullets say why
- the reasons given don't seem to be very principled ones (e.g. suppressing constant-evaluation is indeed a nice effect of value-dependency, but I don't think it's the *reason* for the value-dependency, rather that the value depends on how the error is resolved)
- I don't understand the connection between the "setting" list and the "explanations" one.
================
Comment at: clang/lib/AST/ComputeDependence.cpp:499
+ // RecoveryExpr dependence-bits setting:
+ // - type-dep is set if we don't know about the type (fallback to an opaque
+ // dependent type);
----------------
, or if the type is known and dependent
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83215/new/
https://reviews.llvm.org/D83215
More information about the cfe-commits
mailing list