Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: tools/clang/plugins/tests/trivial_ctor.cpp

Issue 2490473007: Improved check for trivial templates. (Closed)
Patch Set: Check isStdNamespace, too. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "trivial_ctor.h"
6
7 // Due to https://bugs.chromium.org/p/chromium/issues/detail?id=663463, we treat
8 // templated classes/structs as non-trivial, even if they really are trivial.
9 // Thus, classes that have such a class/struct as a member get flagged as being
10 // themselves non-trivial, even if (like |MySpinLock|) they are. Special-case
11 // [std::]atomic_int.
12 class TrivialTemplateOK {
13 public:
14 private:
15 MySpinLock lock_;
16 };
17
18 int main() {
19 TrivialTemplateOK one;
20 return 0;
21 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698