hamzasood marked 2 inline comments as done.
hamzasood added inline comments.


================
Comment at: lib/Sema/SemaDecl.cpp:16185-16194
+  if (getLangOpts().ModulesTS) {
+    Module *CurrentModule = getCurrentModule();
+    assert(CurrentModule && "Expected to be in a module scope");
+
+    // If the current module has been loaded from disk, then this is an
+    // implementation unit and hence we shouldn't modify the module.
+    // FIXME: Is that a hacky assumption? We can't just check
----------------
rsmith wrote:
> This is not appropriate; generally whether we serialize to an AST file should 
> be treated as orthogonal to whether we're in / importing a module.
> 
> The right check here is probably `getLangOpts().getCompilingModule() == 
> CMK_ModuleInterface`.
Thanks! I completely missed that lang opt.


https://reviews.llvm.org/D40443



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to