[PATCH] Preprocessor: preserve whitespace in -traditional-cpp mode.

Jordan Rose jordan_rose at apple.com
Thu Feb 14 14:42:48 PST 2013


  Looking at this again, it's going to be hard to get LeadingSpace to be correct in all cases in keep-whitespace mode. I'm hesitant to add another variable like IsAtStartOfLine that will just slow down every token lexed in //non-//traditional mode.

  (To do -traditional-cpp properly, we'd actually need LeadingSpace to be correct, because # only starts a directive if it's actually in the first column. But this patch doesn't do that anyway.)

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



More information about the cfe-commits mailing list