This revision was automatically updated to reflect the committed changes.
Closed by commit rL342384: [ASTImporter] Fix import of VarDecl init (authored
by martong, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D51597
Files:
cfe/trunk/l
a_sidorin accepted this revision.
a_sidorin added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/AST/ASTImporter.cpp:1441
+ To->setInit(ToInit);
+ if (From->isInitKnownICE()) {
+EvaluatedStmt *Eval = To->ensureEvaluatedStmt();
martong updated this revision to Diff 165039.
martong marked an inline comment as done.
martong added a comment.
- Fix formatting and typo
Repository:
rC Clang
https://reviews.llvm.org/D51597
Files:
lib/AST/ASTImporter.cpp
unittests/AST/ASTImporterTest.cpp
Index: unittests/AST/ASTImport
martong marked 3 inline comments as done.
martong added inline comments.
Comment at: lib/AST/ASTImporter.cpp:1441
+ To->setInit(ToInit);
+ if (From->isInitKnownICE()) {
+EvaluatedStmt *Eval = To->ensureEvaluatedStmt();
a_sidorin wrote:
> I see that this is
a_sidorin added a comment.
Hi Gabor,
The change looks mostly fine but the difference with ASTReader approach
disturbs me a bit.
Comment at: lib/AST/ASTImporter.cpp:1441
+ To->setInit(ToInit);
+ if (From->isInitKnownICE()) {
+EvaluatedStmt *Eval = To->ensureEvaluatedStmt(
martong added inline comments.
Comment at: unittests/AST/ASTImporterTest.cpp:3763
+INSTANTIATE_TEST_CASE_P(ParameterizedTests, ImportImplicitMethods,
+DefaultTestValuesForRunOptions, );
This hunk has nothing to do with this change, but p
martong created this revision.
martong added reviewers: a_sidorin, xazax.hun, r.stahl.
Herald added subscribers: cfe-commits, dkrupp, rnkovacs.
Herald added a reviewer: a.sidorin.
Herald added a reviewer: a.sidorin.
The init expression of a VarDecl is overwritten in the "To" context if we
import a