aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/warn-unused-local-typedef-serialize.cpp
blob: ccb5a09164b4c84d3cebb7c5aa45aa1e2ae29aa3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
// XFAIL: hexagon
// 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