From 385a248513da5984d5c05301ae9d50a7876a826f Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 30 Apr 2015 15:06:21 +0200 Subject: Do not warn about Link Change-Id: Id26adce17a2479eead935958556012f13f2821b7 --- compilerplugins/clang/vclwidgets.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'compilerplugins') diff --git a/compilerplugins/clang/vclwidgets.cxx b/compilerplugins/clang/vclwidgets.cxx index a2f4ee15855e..d239c67c67e3 100644 --- a/compilerplugins/clang/vclwidgets.cxx +++ b/compilerplugins/clang/vclwidgets.cxx @@ -105,12 +105,17 @@ bool containsWindowSubclass(const Type* pType0) { if (pRecordDecl) { const ClassTemplateSpecializationDecl* pTemplate = dyn_cast(pRecordDecl); if (pTemplate) { + bool link = pTemplate->getQualifiedNameAsString() == "Link"; for(unsigned i=0; igetTemplateArgs().size(); ++i) { const TemplateArgument& rArg = pTemplate->getTemplateArgs()[i]; if (rArg.getKind() == TemplateArgument::ArgKind::Type && containsWindowSubclass(rArg.getAsType())) { - return true; + // OK for first template argument of tools/link.hxx Link + // to be a Window-derived pointer: + if (!link || i != 0) { + return true; + } } } } -- cgit v1.2.3