[clang] Sema: filter out invalid base-specifiers before attaching (PR #147213)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 8 22:07:11 PDT 2025


================
@@ -2252,7 +2252,10 @@ void Parser::ParseBaseClause(Decl *ClassDecl) {
   while (true) {
     // Parse a base-specifier.
     BaseResult Result = ParseBaseSpecifier(ClassDecl);
-    if (Result.isInvalid()) {
+    // Skip any base-specifier we couldn’t actually build into a usable
+    // CXXBaseSpecifier (covers both syntactic invalidity and
+    // other un-usable cases).
----------------
cor3ntin wrote:

```suggestion
```

This comment isn't very useful

https://github.com/llvm/llvm-project/pull/147213


More information about the cfe-commits mailing list