[llvm-bugs] [Bug 26828] New: -frewrite-includes: incorrect support of __has_include_next

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 3 05:00:45 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26828

            Bug ID: 26828
           Summary: -frewrite-includes: incorrect support of
                    __has_include_next
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: eugvelesevich at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 15980
  --> https://llvm.org/bugs/attachment.cgi?id=15980&action=edit
The test mentioned in the bug description.

Now __has_include_next is handled as __has_include:

include_next.cpp:
    #include <h.h>

inc/h.h:
    #if __has_include_next(<h.h>) /* expands in 1  */
    #include_next <h.h>
    #else
    int main() { int inc; }
    #endif

inc2/h.h:
    #if __has_include_next(<h.h>) /* incorrectly expands in 1 */
    #include_next <h.h>
    #else
    int main() { int inc2; }
    #endif

"clang++ -frewrite-includes -E include_next.cpp -isystem inc -isystem inc2 |
clang++ -E -" produces empty file(with line directives).

-- 
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/20160303/ecd61d4d/attachment-0001.html>


More information about the llvm-bugs mailing list