rsmith added inline comments.

Comment at: lib/Sema/SemaDecl.cpp:10129
+        !Var->isThisDeclarationADemotedDefinition()) {
+      assert(Var->isThisDeclarationADemotedDefinition() && 
+             && "Demoting decls is only in the contest of modules!");
v.g.vassilev wrote:
> manmanren wrote:
> > Is the logic correct here? The if statement says 
> > !Var->isThisDeclarationADemotedDefinition(), and we then assert 
> > Var->isThisDeclarationADemotedDefinition() && getLangOpts().Modules.
> Oops, that is an old version of the patch. Uploading the new one.
Can you just remove this assertion entirely? I don't see why it's relevant to 
what this code is checking. If we had some other reason to demote, the logic 
here would still seem to be correct.

cfe-commits mailing list

Reply via email to