| Index: tools/clang/plugins/tests/trivial_ctor.cpp
|
| diff --git a/tools/clang/plugins/tests/trivial_ctor.cpp b/tools/clang/plugins/tests/trivial_ctor.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e24bb6f1e0329bf3f6204750e596a4ddc8f62ddc
|
| --- /dev/null
|
| +++ b/tools/clang/plugins/tests/trivial_ctor.cpp
|
| @@ -0,0 +1,22 @@
|
| +// Copyright (c) 2016 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 "trivial_ctor.h"
|
| +
|
| +// Due to https://bugs.chromium.org/p/chromium/issues/detail?id=663463, we treat
|
| +// templated classes/structs as non-trivial, even if they really are trivial.
|
| +// Thus, classes that have such a class/struct as a member get flagged as being
|
| +// themselves non-trivial, even if (like |MySpinLock|) they are. Special-case
|
| +// [std::]atomic_int.
|
| +class TrivialTemplateOK {
|
| + public:
|
| +
|
| + private:
|
| + MySpinLock lock_;
|
| +};
|
| +
|
| +int main() {
|
| + TrivialTemplateOK one;
|
| + return 0;
|
| +}
|
|
|