================ @@ -13462,13 +13462,114 @@ static ElaboratedTypeKeyword getCommonTypeKeyword(const T *X, const T *Y) { : ElaboratedTypeKeyword::None; } +static NestedNameSpecifier *getCommonNNS(ASTContext &Ctx, + NestedNameSpecifier *X, + NestedNameSpecifier *Y, bool IsSame) { + if (X == Y) + return X; + + NestedNameSpecifier *Canon = Ctx.getCanonicalNestedNameSpecifier(X); + if (Canon != Ctx.getCanonicalNestedNameSpecifier(Y)) { + assert(!IsSame && "Should be the same NestedNameSpecifier"); + return nullptr; + } + + NestedNameSpecifier *R = nullptr; + switch (auto KX = X->getKind(), KY = Y->getKind(); KX) { ---------------- erichkeane wrote:
```suggestion switch (NestedNameSpecifier::SpecifierKind KX = X->getKind(), KY = Y->getKind(); KX) { ``` https://github.com/llvm/llvm-project/pull/131964 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits