In ObjC++ mode, code-completion after a C-style cast like `(int*)(0x200)` crashed because the inner parenthesized expression was parsed as a `ParenListExpr` (null type) due to `AllowTypes` propagation. Fixes https://github.com/llvm/llvm-project/issues/180125
13 lines
397 B
Objective-C
13 lines
397 B
Objective-C
// Note: the run lines follow their respective tests, since line/column
|
|
// matter in this test.
|
|
|
|
void func() {
|
|
int *foo = (int *)(0x200);
|
|
int *bar = (int *)((0x200));
|
|
}
|
|
|
|
// Make sure this doesn't crash
|
|
// RUN: %clang_cc1 -fsyntax-only -xobjective-c++-header -code-completion-at=%s:%(line-5):28 %s
|
|
// RUN: %clang_cc1 -fsyntax-only -xobjective-c++-header -code-completion-at=%s:%(line-5):30 %s
|
|
|