llvm-project/clang/test/SemaCXX/incomplete-array-extent.cpp
Oleksandr T 27fe526226
[Clang] Fix crash on improper use of __array_extent (#94173)
Check whether parsing of the argument failed before attempting
to build the expression. 

Fixes #80474.
2024-06-03 15:28:14 +02:00

6 lines
129 B
C++

// RUN: %clang_cc1 -verify -std=c++14 %s
auto f() {
return __array_extent(int, ); // expected-error {{expected expression}}
}