| Index: tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
|
| diff --git a/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc b/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
|
| index fbbf9c1717c7acdb40110388065a2ccf5005532a..1bd97fa556d6631d2faea97a24b5f50007a9991b 100644
|
| --- a/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
|
| +++ b/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
|
| @@ -68,6 +68,18 @@ void Task::doTheWork() {
|
| reallyDoTheWork();
|
| }
|
|
|
| +template <typename T>
|
| +class Testable {
|
| + public:
|
| + typedef T Testable::*UnspecifiedBoolType;
|
| + // This method has a reference to a member in a "member context" and a
|
| + // "non-member context" to verify both are rewritten.
|
| + operator UnspecifiedBoolType() { return m_ptr ? &Testable::m_ptr : 0; }
|
| +
|
| + private:
|
| + int m_ptr;
|
| +};
|
| +
|
| } // namespace blink
|
|
|
| // Test that overrides from outside the Blink namespace are also updated.
|
| @@ -96,6 +108,12 @@ void F() {
|
| void (BovineTask::*p4)() = &BovineTask::reallyDoTheWork;
|
| }
|
|
|
| +bool G() {
|
| + // Use the Testable class to rewrite the method.
|
| + blink::Testable<int> tt;
|
| + return tt;
|
| +}
|
| +
|
| namespace blink {
|
|
|
| struct StructInBlink {
|
|
|