llvm-project/clang/test/PCH/cli-macro.c

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
417 B
C
Raw Normal View History

// Test this without pch.
// RUN: %clang_cc1 -Wunused-macros -Dunused=1 -fsyntax-only -verify %s
// Test with pch.
// RUN: %clang_cc1 -Wunused-macros -emit-pch -o %t %s
// RUN: %clang_cc1 -Wunused-macros -Dunused=1 -include-pch %t -fsyntax-only -verify %s
// expected-no-diagnostics
// -Dunused=1 is intentionally not set for the pch.
// There still should be no unused warning for a macro from the command line.