LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 21916 - clang-format asserts in ContinuationIndenter.cpp:1090
Summary: clang-format asserts in ContinuationIndenter.cpp:1090
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: Formatter (show other bugs)
Version: trunk
Hardware: PC Windows NT
: P normal
Assignee: Alexander Kornienko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-15 10:44 PST by Vlad Ermolaev
Modified: 2015-01-12 07:11 PST (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments
test case (197 bytes, text/plain)
2014-12-15 10:55 PST, Vlad Ermolaev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad Ermolaev 2014-12-15 10:44:18 PST
typedef struct
{
  UINT nStructSize;
  RECEIVER_TYPE eRecvType;	/* recevier type to claim handle from */
  WORD wUserId;				/* user claiming handle */
  const tekhandle_type *ahHandle;	/* the user can specify a specific handle (0 indicates any handle)
                                  or an array of sub-handles for a virtual handle*/
  int iClaimNum;				/* the number of actual physical handles needed for a virtual handle
                        use 1 when claiming a single physical handle*/
  BOOL bLock;					/* claim the handle for exclusive use */
  USERDATA UserData;			/* user notification data */
  tekmap_type hMap;			/* map being used with this handle */
  MAP_REDUCTION MapReduct;    /* map reduction to use (if supported by handle) */
} CLAIMPARAMS;

clang-format asserts while formatting the above code.
Both Visual Studio plugin and standalone clang-format.exe based on SVN r223387 do this.
Comment 1 Vlad Ermolaev 2014-12-15 10:55:41 PST
Created attachment 13542 [details]
test case

-style option does not seem to matter. Tried 'Mozilla', 'Google' and 'Chromium' and saw the assert in every case.
Comment 2 Daniel Jasper 2014-12-16 05:39:10 PST
Alex, can you take a look? It looks like IndentAtLineBreak of BreakableBlockComment overflows.
Comment 3 Alexander Kornienko 2015-01-12 07:11:47 PST
Fixed in r225628.