llvm-capstone/clang/test/SemaCXX/warn-unused-private-field-delayed-template.cpp
Ehsan Akhgari 4b5ca9a222 clang-cl: Don't warn for unused private fields when encountering a late parsed template member
Summary: This fixes PR21235.

Test Plan: Includes an automated test.

Reviewers: hansw

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D5718

llvm-svn: 219551
2014-10-11 00:24:15 +00:00

12 lines
274 B
C++

// RUN: %clang_cc1 -fsyntax-only -fdelayed-template-parsing -Wunused-private-field -Wused-but-marked-unused -Wno-uninitialized -verify -std=c++11 %s
// expected-no-diagnostics
class EverythingMayBeUsed {
int x;
public:
template <class T>
void f() {
x = 0;
}
};