[cfe-dev] -fdelayed-template-parsing causes crash on Windows during static analysis

Anna Zaks via cfe-dev cfe-dev at lists.llvm.org
Tue Sep 22 11:55:18 PDT 2015


> On Sep 21, 2015, at 10:35 AM, Andrew Marshall via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> 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. 

> Cheers!
> Andrew.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list