Hi there,
I’ve been experimenting with the static analyzer on Windows. I have it working now, but came across the following issue -
- Compiled LLVM+Clang 3.7.0 in Visual Studio 13 (MSVC 18)
- Got the full list of compilation options for clang by running
clang -### -c hello.cpp
The list of options includes "fdelayed-template-parsing
- Used these options as input to
clang -cc1 -analyze -analyzer-checker=core hello.cpp
- clang crashes with a null pointer exception on clang::Stmt::getStmtClass()
‘hello.cpp’ is simply:
#include
int main() {
std::cout << “Hello, Static Analysis World” << std::endl;
return 0;
}
A simpler program, without including any STL headers, works.
Removing the ‘-fdelayed-template-parsing’ option allows static analysis to complete as normal.
Cheers!
Andrew.
Hi there,
I've been experimenting with the static analyzer on Windows. I have it working now, but came across the following issue -
1. Compiled LLVM+Clang 3.7.0 in Visual Studio 13 (MSVC 18)
2. Got the full list of compilation options for clang by running
clang -### -c hello.cpp
The list of options includes "fdelayed-template-parsing
3. Used these options as input to
clang -cc1 <options> -analyze -analyzer-checker=core hello.cpp
4. clang crashes with a null pointer exception on clang::Stmt::getStmtClass()
'hello.cpp' is simply:
#include <iostream>
int main() {
std::cout << "Hello, Static Analysis World" << std::endl;
return 0;
}
A simpler program, without including any STL headers, works.
Removing the '-fdelayed-template-parsing' option allows static analysis to complete as normal.
We should at least provide a better user experience here, reporting that the options are incompatible.