[PATCH] D15173: [Preprocessor] Fix assertion in AnnotatePreviousCachedTokens

Duncan P. N. Exon Smith via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 7 14:22:19 PST 2015


> On 2015-Dec-07, at 13:29, Bruno Cardoso Lopes <bruno.cardoso at gmail.com> wrote:
> 
> bruno added a comment.
> 
> Hi Argyrios,
> 
> Thanks for the suggestions, will apply them.
> The assertion seems important to catch subtle bugs, are you sure it should be placed inside a "#ifndef NDEBUG”?

FYI, the definition for `assert` is something like:

#ifdef NDEBUG
#define assert(cond)
#else
#define assert(cond) \
if (!(cond)) { assertion_failed(#FILE ":" #LINE ": " #cond); };
#endif

> 
> 
> http://reviews.llvm.org/D15173
> 
> 
> 



More information about the cfe-commits mailing list