[cfe-commits] [patch] Constructor initializers
Eli Friedman
eli.friedman at gmail.com
Thu Aug 27 17:52:34 PDT 2009
On Thu, Aug 27, 2009 at 5:31 PM, Anders Johnsen<skabet at gmail.com> 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
More information about the cfe-commits
mailing list