================
@@ -0,0 +1,34 @@
+// Check that an enum with the flag_enum attribute that is deserialized from a
+// PCH does not crash Sema, and that its flag bits are still computed 
correctly.
+
+// RUN: %clang_cc1 -emit-pch -o %t %s
+// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s
+
+#ifndef HEADER
+#define HEADER
+
+enum __attribute__((flag_enum)) FlagEnum {
+  A = 0x1,
+  B = 0x2,
+  C = 0x4,
+};
+
+#else
+
+// The flag bits of FlagEnum are only known to Sema if they were recomputed
+// after deserialization, so a wrong or missing cache entry shows up here as
+// either a crash or a bogus diagnostic on the first two cases.
----------------
Tsche wrote:

This comment seems unnecessary to me.

https://github.com/llvm/llvm-project/pull/223244
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to