erichkeane added inline comments.

Comment at: lib/Sema/SemaChecking.cpp:228
+          S.getASTContext(), Ty, /*consume*/ false);
+      Arg = S.PerformCopyInitialization(Entity, SourceLocation(), Arg);
+      TheCall->setArg(2, Arg.get());
efriedma wrote:
> Is it possible for this initialization to fail?  If it can't fail, please add 
> an assertion; otherwise, you probably need to "return true".  (Not sure off 
> the top of my head how that would happen; maybe it would error out on a 
> `volatile int*`?)
You're correct, it apparently can fail!  I've added a test to return true.  
Based on a reading of the code, performcopyinit diagnoses, so I think this 
patch should be correct.

cfe-commits mailing list

Reply via email to