On Thu, Aug 27, 2009 at 5:31 PM, Anders Johnsen<[email protected]> wrote:
> Hi,
> This is an attempt to implement instantiation of constructor initializers,
> when the class is dependent.

+    // Assign all the initializers to the new constructor.
+    ActOnMemInitializers(DeclPtrTy::make(Function), PointOfInstantiation,
+        (MemInitTy**)NewItems.data(), NewItems.size());

The cast here (and in general, casting to an Object**) looks
suspicious; it often leads to a strict-aliasing violation.

   Stmt *Pattern = 0;
   if (PatternDecl)
-    Pattern = PatternDecl->getBody(PatternDecl);
+    Pattern = PatternDecl->getBody((const FunctionDecl*&)PatternDecl);

   if (!Pattern)
     return;

Similarly here.

It would be easier to review this if the addition of RParenLoc were
done in a separate patch.

-Eli
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to