[PATCH] [extra] pptrace - preprocessor tracing and testing tool

Kim Gräsman kim.grasman at gmail.com
Tue Oct 29 13:46:49 PDT 2013


  Running pp-trace on this file still asserts, unfortunately:

  --
  // repro2.cpp
  #define X X_IMPL(a,b) X_IMPL2(c)

  #define X_IMPL(p1,p2)
  #define X_IMPL2(p1)

  X
  --

  This looks nonsensical, but is based on C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sal.h:454.

  I suspected that Value->getNumArguments() might return zero, which would cause your e to become negative (or very large), but the number in this case is four. You still have a bug if getNumArguments ever returns zero, but maybe it never will (i.e. assert on it)

http://llvm-reviews.chandlerc.com/D2020



More information about the cfe-commits mailing list