================
@@ -2738,6 +2738,13 @@ bool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec
&SS, LookupResult &R,
<< DroppedSpecifier << NameRange,
PDiag(NoteID), AcceptableWithRecovery);
+ if (Corrected.WillReplaceSpecifier()) {
+ NestedNameSpecifier NNS = Corrected.getCorrectionSpecifier();
+ // In order to be valid, a non-empty CXXScopeSpec needs a source range.
+ SS.MakeTrivial(Context, NNS,
+ NNS ? NameRange.getBegin() : SourceRange());
+ }
----------------
mizvekov wrote:
That breaks many tests, best to be done in another PR.
https://github.com/llvm/llvm-project/pull/183937
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits