[PATCH] D67938: [static analyzer] Define __clang_analyzer__ macro in driver
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 18:21:00 PDT 2019
dexonsmith added inline comments.
================
Comment at: clang/test/Analysis/misc-ps.m:5-7
-#ifndef __clang_analyzer__
-#error __clang_analyzer__ not defined
-#endif
----------------
NoQ wrote:
> We can make a new test that tests the driver instead, i.e. something like
>
> ```
> // RUN: %clang --analyze %s
> #ifndef __clang_analyzer__
> #error __clang_analyzer__ not defined
> #endif
> ```
Would it be better to add `-D__clang_analyzer__` to the `%clang_analyze_cc1` expansion?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67938/new/
https://reviews.llvm.org/D67938
More information about the llvm-commits
mailing list