mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-14 01:46:41 +00:00

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
11 lines
363 B
C++
11 lines
363 B
C++
// RUN: not %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ast-dump -frecovery-ast %s | FileCheck %s
|
|
|
|
// CXXDefaultArgExpr should inherit dependence from the inner Expr, in this case
|
|
// RecoveryExpr.
|
|
void fun(int arg = foo());
|
|
|
|
void test() {
|
|
fun();
|
|
}
|
|
// CHECK: -CXXDefaultArgExpr 0x{{[^ ]*}} <<invalid sloc>> '<dependent type>' contains-errors lvalue
|