This is an archive of the discontinued LLVM Phabricator instance.

[AST][RecoveryExpr] Clarify the documentation of RecoveryExpr.
AbandonedPublic

Authored by hokein on Jul 6 2020, 4:58 AM.

Details

Reviewers
sammccall
Summary

Fix some out-of-date doc/FIXMEs, and be clear about our plan.

Depends on https://reviews.llvm.org/D83213.

Diff Detail

Event Timeline

hokein created this revision.Jul 6 2020, 4:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 6 2020, 4:58 AM
hokein edited the summary of this revision. (Show Details)Jul 6 2020, 5:02 AM
sammccall added inline comments.Jul 7 2020, 2:52 AM
clang/include/clang/AST/Expr.h
6229

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.

clang/lib/AST/ComputeDependence.cpp
498–512

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.
499

, or if the type is known and dependent

hokein updated this revision to Diff 276700.Jul 9 2020, 3:57 AM
hokein marked 4 inline comments as done.

refine the doc based on the review comments.

clang/lib/AST/ComputeDependence.cpp
498–512

sorry for the confusion. I have refined the doc, hope it is clearer now.

hokein abandoned this revision.Jul 10 2020, 2:28 AM

closing this in favor of D83213.