manmanren added a comment.


> Before this patch, the testcase added used to take

>  5s to compile!!! A bit more elaborate NSDictionary literal with some

> undeclared enums would make the compiler take 22min to run, followed by a 
> crash.


--> this is a big improvement!

A few notes from discussions with Bruno:
This patch changes the base class 
TreeTransform<Derived>::TransformObjCDictionaryLiteral, which is not specific 
to TransformTypos.

Here we have multiple TypoExprs in a single DictionaryLiteral, and the search 
space for each TypoExpr can be pretty big. That is why it takes a long time to 
go through all the possible corrections.

I applied your patch, looks like it returns an ObjCDictionaryLiteral that 
contains TypoExpr as valid and that is why we break out of the while loop in 
TransformTypos::Transform. That does not look right.

We can probably prune the search space if one of the TypoExprs has zero 
candidate (in the testing case, the 2nd TypoExpr has zero candidate).

Manman


http://reviews.llvm.org/D22183



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

Reply via email to