[clang] [Clang] Ignore invalid base classes (PR #147213)

2025-07-10 Thread Corentin Jabot via cfe-commits


@@ -2252,7 +2252,7 @@ void Parser::ParseBaseClause(Decl *ClassDecl) {
   while (true) {
 // Parse a base-specifier.
 BaseResult Result = ParseBaseSpecifier(ClassDecl);
-if (Result.isInvalid()) {
+if (!Result.isUsable()) {

cor3ntin wrote:

Result can either be invalid, null, or valid - this changes what we do in the 
null case, ie we don't want null base classes - does that make sense? 

https://github.com/llvm/llvm-project/pull/147213
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang] Ignore invalid base classes (PR #147213)

2025-07-10 Thread Shafik Yaghmour via cfe-commits


@@ -2252,7 +2252,7 @@ void Parser::ParseBaseClause(Decl *ClassDecl) {
   while (true) {
 // Parse a base-specifier.
 BaseResult Result = ParseBaseSpecifier(ClassDecl);
-if (Result.isInvalid()) {
+if (!Result.isUsable()) {

shafik wrote:

I am a bit surprised we still don't want the `BaseInfo.push_back(Result.get())` 
in the else branch in the good case. Why does not having this not change 
behavior?

https://github.com/llvm/llvm-project/pull/147213
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits