================
@@ -13461,13 +13486,112 @@ static ElaboratedTypeKeyword
getCommonTypeKeyword(const T *X, const T *Y) {
: ElaboratedTypeKeyword::None;
}
+static NestedNameSpecifier *getCommonNNS(ASTContext &Ctx,
+ NestedNameSpecifier *X,
+ NestedNameSpecifier *Y, bool Sugar) {
+ if (X == Y)
+ return X;
+
+ NestedNameSpecifier *Canon = Ctx.getCanonicalNestedNameSpecifier(X);
+ if (Canon != Ctx.getCanonicalNestedNameSpecifier(Y)) {
+ if (Sugar)
+ return nullptr;
+ llvm_unreachable("Should be the same NestedNameSpecifier");
+ }
+
+ NestedNameSpecifier *R;
----------------
erichkeane wrote:
```suggestion
NestedNameSpecifier *R = nullptr;
```
https://github.com/llvm/llvm-project/pull/130537
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits