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

Andrew Marshall via cfe-dev cfe-dev at lists.llvm.org
Mon Sep 21 10:35:16 PDT 2015


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.

Cheers!
Andrew.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150921/df10bc29/attachment.html>


More information about the cfe-dev mailing list