<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - clang-format-6 combines two nearby defines"
href="https://bugs.llvm.org/show_bug.cgi?id=36002">36002</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang-format-6 combines two nearby defines
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>6.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>release blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Formatter
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>me@komzpa.net
</td>
</tr>
<tr>
<th>CC</th>
<td>djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=19705" name="attach_19705" title="pagc_api.h test file">attachment 19705</a> <a href="attachment.cgi?id=19705&action=edit" title="pagc_api.h test file">[details]</a></span>
pagc_api.h test file
6.0.0-svn321677-1~exp1
clang-format produces this change that merges OPEN_ALLOCATED_NAME into
PAGC_FILE_OPEN.
File from project PostGIS.
```
-#define PAGC_FILE_OPEN(HANDLE,FNAME,MODE,WHERE,RET) \
- if ( ( HANDLE = fopen( FNAME , \
- MODE ) ) == NULL ) { \
- RET_ERR1( "\nCan't open: %s\n" ,FNAME,WHERE,RET) ; \
- }
-
-#define OPEN_ALLOCATED_NAME(ALLOC_NAME,EXT,HANDLE,NAME,MODE,DS_SYS,WHERE,RET)
\
- if ( ( ALLOC_NAME = ds_alloc_file_name(DS_SYS,NAME,EXT) ) == NULL ) { \
- return RET ; \
- } \
- PAGC_FILE_OPEN(HANDLE,ALLOC_NAME,MODE,WHERE,RET)
-
-
+#define PAGC_FILE_OPEN(HANDLE, FNAME, MODE, WHERE, RET) \
+ if ((HANDLE = fopen(FNAME, MODE)) == NULL) \
+ { RET_ERR1("\nCan't open: %s\n", FNAME, WHERE, RET); } \
+\
+ #define OPEN_ALLOCATED_NAME( \
+ ALLOC_NAME, \
+ EXT, \
+ HANDLE, \
+ NAME, \
+ MODE, \
+ DS_SYS, \
+ WHERE, \
+ RET) if ((ALLOC_NAME = ds_alloc_file_name(DS_SYS, NAME, EXT)) == \
+ NULL) \
+ { \
+ return RET; \
+ } \
+ PAGC_FILE_OPEN(HANDLE, ALLOC_NAME, MODE, WHERE, RET)
```</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>