On Sep 3, 2010, at 10:47 AM, Chris Lattner wrote: > On Sep 3, 2010, at 10:33 AM, Fariborz Jahanian wrote: >> URL: http://llvm.org/viewvc/llvm-project?rev=112977&view=rev >> Log: >> Use getSpelling to get original text of the >> c++ operator token. (radar 8328250). > > Thanks Fariborz, one gotcha here: >> > > PP.getSpelling(Tok) returns an std::string, which will be destroyed > at the end of the statement. This causes the StringRef (which is > basically a pointer + length) to dangle. There are a couple of > different ways to fix this, but the simplest is to declare ThisTok > as an std::string. In r112979.
- Fariborz > _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
