[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / SemaCXX / warn-unused-local-typedef-serialize.cpp
blobaa2c48bb5719d8387d07a6b3e902cc09aad3e427
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
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;
11 #endif