[clang] [Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (PR #104458)

Krystian Stasiowski via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 3 09:49:41 PDT 2024


================
@@ -7981,7 +7969,7 @@ ExprResult Sema::ActOnStartCXXMemberReference(Scope *S, Expr *Base,
     SmallVector<FunctionDecl*, 8> OperatorArrows;
     CTypes.insert(Context.getCanonicalType(BaseType));
 
-    while (BaseType->isRecordType()) {
+    while (BaseType->getAsRecordDecl()) {
----------------
sdkrystian wrote:

It's essentially a shortcut for `BaseType->isRecordType() || isa<InjectedClassNameType>(BaseType->getCanonicalTypeInternal())`

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


More information about the cfe-commits mailing list