Open llvmbot opened 6 years ago
Hi.
I want to run clang --analyze against a legacy MFC/C++ code base on Windows. In my Makefile, the CFLAGS looks like:
CFLAGS= -I$(RESOURCES) -I$(IMPORTED_HEADERS) -I$(EXPORTED_HEADERS) -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 -D_ATL_NO_HOSTING -DUNICODE -D_UNICODE -DWIN32 -D_DEBUG -DDEBUG
No matter where I type --analyze, as a first or the last parameter, I get this message:
clang.exe: warning: argument unused during compilation: '--analyze' [-Wunused-command-line-argument]
However --analyze does work with a contrived example like this:
clang --analyze test.cpp, where test.cpp looks like that:
int main(int, char**) { strcpy(NULL, "Hello"); return 0; }
Regards, Michael
assigned to @devincoughlin
Extended Description
Hi.
I want to run clang --analyze against a legacy MFC/C++ code base on Windows. In my Makefile, the CFLAGS looks like:
CFLAGS= -I$(RESOURCES) -I$(IMPORTED_HEADERS) -I$(EXPORTED_HEADERS) -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 -D_ATL_NO_HOSTING -DUNICODE -D_UNICODE -DWIN32 -D_DEBUG -DDEBUG
No matter where I type --analyze, as a first or the last parameter, I get this message:
clang.exe: warning: argument unused during compilation: '--analyze' [-Wunused-command-line-argument]
However --analyze does work with a contrived example like this:
clang --analyze test.cpp, where test.cpp looks like that:
include
int main(int, char**) { strcpy(NULL, "Hello"); return 0;
}
Regards, Michael