File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -5740,7 +5740,9 @@ class ConceptInfo {
5740
5740
QualType getApproximateType (const Expr *E, HeuristicResolver &Resolver) {
5741
5741
if (E->getType ().isNull ())
5742
5742
return QualType ();
5743
- E = E->IgnoreParenImpCasts ();
5743
+ if (auto *ICE = dyn_cast<ImplicitCastExpr>(E);
5744
+ !ICE || ICE->getCastKind () != CK_ArrayToPointerDecay)
5745
+ E = E->IgnoreParenImpCasts ();
5744
5746
QualType Unresolved = E->getType ();
5745
5747
// Resolve DependentNameType
5746
5748
if (const auto *DNT = Unresolved->getAs <DependentNameType>()) {
Original file line number Diff line number Diff line change @@ -36,3 +36,12 @@ void test4(struct Point *p) {
36
36
}
37
37
// RUN: %clang_cc1 -fsyntax-only -code-completion-with-fixits -code-completion-at=%s:%(line-3):13 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
38
38
// RUN: %clang_cc1 -fsyntax-only -code-completion-with-fixits -code-completion-at=%s:%(line-3):23 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
39
+
40
+ float test5 (void ) {
41
+ struct Point array [4 ];
42
+ return array -> x ;
43
+ }
44
+ // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-2):17 %s -o - | FileCheck -check-prefix=CHECK-CC4 %s
45
+ // CHECK-CC4: COMPLETION: x : [#float#]x
46
+ // CHECK-CC4: COMPLETION: y : [#float#]y
47
+ // CHECK-CC4: COMPLETION: z : [#float#]z
You can’t perform that action at this time.
0 commit comments