Segfault when parsing an empty extern "C" {} block (#110)
extern declaration blocks can be empty: https://en.cppreference.com/w/cpp/language/language_linkage
This commit is contained in:
parent
9ab6ef877a
commit
36b64d29b9
2 changed files with 10 additions and 2 deletions
|
|
@ -36,6 +36,10 @@ extern "C++" // yup
|
|||
enum e {};
|
||||
}
|
||||
|
||||
/// extern "C++"{
|
||||
/// }
|
||||
extern "C++" {}
|
||||
|
||||
enum f {};
|
||||
)";
|
||||
|
||||
|
|
@ -50,7 +54,7 @@ enum f {};
|
|||
else
|
||||
REQUIRE(false);
|
||||
});
|
||||
REQUIRE(count == 2u);
|
||||
REQUIRE(count == 3u);
|
||||
|
||||
// check enums for their correct parent
|
||||
count = test_visit<cpp_enum>(*file,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue