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

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

Issue 2490473007: Improved check for trivial templates. (Closed)
Patch Set: GNU asm change was out of scope for this CL. 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
« no previous file with comments | « tools/clang/plugins/tests/trivial_ctor.h ('k') | tools/clang/plugins/tests/trivial_ctor.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 private:
14 MySpinLock lock_;
15 };
16
17 int main() {
18 MySpinLock lock;
19 TrivialTemplateOK one;
20 return 0;
21 }
OLDNEW
« no previous file with comments | « tools/clang/plugins/tests/trivial_ctor.h ('k') | tools/clang/plugins/tests/trivial_ctor.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698