Review Request: Let __builtin_offsetof be used with "struct foo" as type

Alexandre Courbot gnurou at
Mon May 14 01:34:16 UTC 2012

This is an automatically generated e-mail. To reply, visit:

(Updated May 14, 2012, 1:34 a.m.)

Review request for KDevelop.


Added unit tests for both struct and typedef'd struct.


There is a clever macro defined that supports __builtin_offset, but constructs of the form "__builtin_offset(struct foo, member)" would fail with a parse error. This patch adds parentheses around the type to ensure these are supported as well.

Diffs (updated)

  languages/cpp/setuphelpers.cpp 23d549e 
  languages/cpp/tests/test_cppcodecompletion.cpp 67a3033 



Checked it worked, the change is pretty simple.


Alexandre Courbot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the KDevelop-devel mailing list