[llvm-bugs] [Bug 34986] New: clang rejects --analyze parameter

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Oct 17 14:17:12 PDT 2017


            Bug ID: 34986
           Summary: clang rejects --analyze parameter
           Product: clang
           Version: 5.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: dcoughlin at apple.com
          Reporter: msherman77 at gmail.com
                CC: llvm-bugs at lists.llvm.org


I want to run clang --analyze against a legacy MFC/C++ code base on Windows.
In my Makefile, the CFLAGS looks like:

-isystem$(ATL_MFC_INCLUDE) -isystem$(SDK7INCLUDE) -isystem$(VCINCLUDE)
-ferror-limit=0 -std=c++14 -fsyntax-only -Wmicrosoft -fms-extensions
-fms-compatibility -Wno-microsoft-extra-qualification -Wno-non-pod-varargs
-Wno-microsoft-cast -Wno-invalid-token-paste -Wno-inconsistent-dllimport

No matter where I type --analyze, as a first or the last parameter, I get this

clang.exe: warning: argument unused during compilation: '--analyze'

However --analyze does work with a contrived example like this:

clang --analyze test.cpp, where test.cpp looks like that:

#include <string.h>

int main(int, char**)
    strcpy(NULL, "Hello");
    return 0;   


You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171017/06e7f23c/attachment.html>

More information about the llvm-bugs mailing list