[llvm-bugs] [Bug 39719] New: clang-format converting object-like macro to function-like macro

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Nov 20 04:14:35 PST 2018


            Bug ID: 39719
           Summary: clang-format converting object-like macro to
                    function-like macro
           Product: clang
           Version: 7.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: matt at woelfware.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

Created attachment 21132
  --> https://bugs.llvm.org/attachment.cgi?id=21132&action=edit
demo app for generating faulty macros in output code

I'm using clang-format version 7.0.0 (Fedora 7.0.0-2.fc29).  There appears to
be a regression the same as the previously fixed Bug 15035.

Attached is a simple application that once run through clang-format will no
longer compile due to the malgenerated #defines:

- #define true ((foo)1)
- #define false ((foo)0)
+ #define true((foo)1)
+ #define false((foo)0)

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181120/005212a2/attachment.html>

More information about the llvm-bugs mailing list