[clang] [clang][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

Nathan Ridge via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 10 22:15:48 PDT 2025


================
@@ -54,8 +54,9 @@ IdentifierInfo *Parser::getSEHExceptKeyword() {
 }
 
 Parser::Parser(Preprocessor &pp, Sema &actions, bool skipFunctionBodies)
-    : PP(pp), PreferredType(pp.isCodeCompletionEnabled()), Actions(actions),
-      Diags(PP.getDiagnostics()), StackHandler(Diags),
+    : PP(pp),
+      PreferredType(&actions.getASTContext(), pp.isCodeCompletionEnabled()),
----------------
HighCommander4 wrote:

I actually tried this initially, but `PreferredTypeBuilder` has its assignment operator called [here](https://searchfox.org/llvm/rev/71f629fc2a93e41577c09bdd782b2ba524ed5fea/clang/include/clang/Parse/Parser.h#1061), and that does not compile if it has a member of reference type.

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


More information about the cfe-commits mailing list