llvm-project/clang/test/Analysis/preprocessor-setup.c
Jan Korous c5d14b5c6f [clang-scan-deps] Support for clang --analyze in clang-scan-deps
The goal is to have 100% fidelity in clang-scan-deps behavior when
--analyze is present in compilation command.

At the same time I don't want to break clang-tidy which expects
__static_analyzer__ macro defined as built-in.

I introduce new cc1 options (-setup-static-analyzer) that controls
the macro definition and is conditionally set in driver.

Differential Revision: https://reviews.llvm.org/D68093

llvm-svn: 374815
2019-10-14 20:15:01 +00:00

6 lines
121 B
C

// RUN: %clang_cc1 -E -setup-static-analyzer %s
#ifndef __clang_analyzer__
#error __clang_analyzer__ not defined
#endif