diff options
Diffstat (limited to 'test/SemaCXX/warn-unused-local-typedef-serialize.cpp')
-rw-r--r-- | test/SemaCXX/warn-unused-local-typedef-serialize.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-unused-local-typedef-serialize.cpp b/test/SemaCXX/warn-unused-local-typedef-serialize.cpp new file mode 100644 index 0000000..aa2c48b --- /dev/null +++ b/test/SemaCXX/warn-unused-local-typedef-serialize.cpp @@ -0,0 +1,11 @@ +// RUN: %clang -x c++-header -c -Wunused-local-typedef %s -o %t.gch -Werror +// RUN: %clang -DBE_THE_SOURCE -c -Wunused-local-typedef -include %t %s -o /dev/null 2>&1 | FileCheck %s +// RUN: %clang -DBE_THE_SOURCE -c -Wunused-local-typedef -include %t %s -o /dev/null 2>&1 | FileCheck %s + +#ifndef BE_THE_SOURCE +inline void myfun() { +// The warning should fire every time the pch file is used, not when it's built. +// CHECK: warning: unused typedef + typedef int a; +} +#endif |