[cfe-dev] Assertion on valid use of highlighting whitespace
tcare at apple.com
Thu Jun 17 14:05:06 CDT 2010
Whilst fixing bug 7377, I ran into an assertion when trying to highlight code in the following warning:
flag ' ' results in undefined behavior in 'p' conversion specifier
triggered by: printf("% p", p);
Assertion failed: (StartColNo <= EndColNo && "Trying to highlight whitespace??"), function HighlightRange, file /Volumes/Data/Users/tcare/Projects/llvm/tools/clang/lib/Frontend/TextDiagnosticPrinter.cpp, line 138.
The assertion is triggered by trying to highlight the format specifier ("% p")
This assertion seems valid, except for this rare case. Maybe there are others?
Any ideas on how to fix this?
More information about the cfe-dev