[PATCH] D112013: [clang][ASTImporter] Fix for importing functions with EST_Unevaluated prototype.

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 19 01:00:53 PDT 2021


steakhal added a comment.

Good job.



================
Comment at: clang/unittests/AST/ASTImporterTest.cpp:6180
+  ASSERT_FALSE(FromCtor->getTypeSourceInfo());
+  // Set a TypeSourceInfo for the function, this state may occur in reality.
+  TypeSourceInfo *FromTSI = FromTU->getASTContext().getTrivialTypeSourceInfo(
----------------
Perhaps, put here a `FIXME` to replace this with a real-world scenario.


================
Comment at: clang/unittests/AST/ASTImporterTest.cpp:6189
+  // Check if the import was correct.
+  CXXConstructorDecl *ToCtor = *ToL->ctor_begin();
+  const auto *ToFPT = ToCtor->getType()->getAs<FunctionProtoType>();
----------------
Please assert that the number of constructors is correct.
I would rather recommend doing so in the //from// case as well.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112013/new/

https://reviews.llvm.org/D112013



More information about the cfe-commits mailing list