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

Unified Diff: tools/clang/plugins/tests/class_with_incomplete_type.h

Issue 1816283003: chrome style plugin: Don't crash when checking class weight. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test comments Created 4 years, 9 months 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 side-by-side diff with in-line comments
Download patch
Index: tools/clang/plugins/tests/class_with_incomplete_type.h
diff --git a/tools/clang/plugins/tests/class_with_incomplete_type.h b/tools/clang/plugins/tests/class_with_incomplete_type.h
new file mode 100644
index 0000000000000000000000000000000000000000..777cf24bef0ab32a220c839d6ccba11d4ca4beb0
--- /dev/null
+++ b/tools/clang/plugins/tests/class_with_incomplete_type.h
@@ -0,0 +1,18 @@
+// Copyright 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.
+//
+// Make sure that the plugin doesn't crash when trying to calculate the weight
+// of a class that has fields of incomplete type.
+
+#ifndef CLASS_WITH_INCOMPLETE_TYPE_H_
+#define CLASS_WITH_INCOMPLETE_TYPE_H_
+
+struct B;
+
+struct A {
+ ~A();
+ B incomplete;
+};
+
+#endif // CLASS_WITH_INCOMPLETE_TYPE_H_
« no previous file with comments | « tools/clang/plugins/FindBadConstructsConsumer.cpp ('k') | tools/clang/plugins/tests/class_with_incomplete_type.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698