[clang] Make CXXDefaultArgExpr inherit dependence from the inner Expr
authorAdam Czachorowski <adamcz@google.com>
Wed, 9 Jun 2021 12:52:29 +0000 (14:52 +0200)
committerAdam Czachorowski <adamcz@google.com>
Thu, 10 Jun 2021 12:51:08 +0000 (14:51 +0200)
commita95937452f237fad10e6b7e43154c17c6b8476c4
tree231b338ebccd347deb024232607519265909109f
parentcc86b87a57000ba673edaf95f65913412928f003
[clang] Make CXXDefaultArgExpr inherit dependence from the inner Expr

Before this change, CXXDefaultArgExpr would always have
ExprDependence::None. This can lead to issues when, for example, the
inner expression is RecoveryExpr and yet containsErrors() on the default
expression is false.

Differential Revision: https://reviews.llvm.org/D103982
clang/include/clang/AST/ComputeDependence.h
clang/include/clang/AST/ExprCXX.h
clang/lib/AST/ComputeDependence.cpp
clang/test/AST/ast-dump-default-arg-dep.cpp [new file with mode: 0644]