forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
win: Make oilpan plugin work better with delayed template parsing.
This time with correct copyright headers. On Windows, clang-cl only parses template methods that are referenced (-fdelayed-template-parsing), so members traced from unreferenced template methods weren't seen by the plugin, which caused it to warn about them. Explicitly parse delayed template methods that look like they are trace methods and that aren't in system headers to work around this. This is based on Kim Grasman's patch for the IWYU project: https://code.google.com/p/include-what-you-use/source/detail?r=566 Together with clang r237531 ( http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150511/129285.html ) this should fix all failing oilpan plugin tests on Windows. BUG=486571 TBR=hans Review URL: https://codereview.chromium.org/1135333007 Cr-Commit-Position: refs/heads/master@{#330295}
- Loading branch information
Showing
5 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright 2015 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "heap/stubs.h" | ||
|
||
namespace blink { | ||
|
||
struct HeapObject : public GarbageCollected<HeapObject> { | ||
void trace(Visitor*) { } | ||
}; | ||
|
||
template<typename T> | ||
class TemplateBase | ||
: public GarbageCollected<TemplateBase<T> > { | ||
public: | ||
void trace(Visitor* visitor) { visitor->trace(m_obj); } | ||
private: | ||
Member<HeapObject> m_obj; | ||
}; | ||
|
||
class Subclass : public TemplateBase<Subclass> { | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-fdelayed-template-parsing |
Empty file.