commit | db526732de31219144f9020cd709a04ef93e3e87 | [log] [tgz] |
---|---|---|
author | Chris Lattner <sabre@nondot.org> | Mon Oct 29 04:26:44 2007 +0000 |
committer | Chris Lattner <sabre@nondot.org> | Mon Oct 29 04:26:44 2007 +0000 |
tree | ced9385fb3aaaf2360531719c845ec3579ca3fe8 | |
parent | de4d2bd06970a2914ab172431a1b741bb5a7adb2 [diff] [blame] |
casting to void is ok for structs (C99 6.5.4p2), this fixes one bogus error on PR1750. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43436 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/cast.c b/test/Sema/cast.c new file mode 100644 index 0000000..14bfe13 --- /dev/null +++ b/test/Sema/cast.c
@@ -0,0 +1,8 @@ +// RUN: clang -fsyntax-only %s -verify + +typedef struct { unsigned long bits[(((1) + (64) - 1) / (64))]; } cpumask_t; +cpumask_t x; +void foo() { + (void)x; +} +