1 // RUN: %clang -x c++-header -c -Wunused-local-typedef %s -o %t.gch -Werror 2 // RUN: %clang -DBE_THE_SOURCE -c -Wunused-local-typedef -include %t %s -o /dev/null 2>&1 | FileCheck %s 3 // RUN: %clang -DBE_THE_SOURCE -c -Wunused-local-typedef -include %t %s -o /dev/null 2>&1 | FileCheck %s 4 5 #ifndef BE_THE_SOURCE 6 inline void myfun() { 7 // The warning should fire every time the pch file is used, not when it's built. 8 // CHECK: warning: unused typedef 9 typedef int a; 10 } 11 #endif 12