[llvm-bugs] [Bug 34547] New: Reparse with #ifdef leads to error "unterminated conditional directive"

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 11 03:07:46 PDT 2017


            Bug ID: 34547
           Summary: Reparse with #ifdef leads to error "unterminated
                    conditional directive"
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: libclang
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nikolai.kosjar at qt.io
                CC: klimek at google.com, llvm-bugs at lists.llvm.org

This happens for 5.0 and trunk.

 % cat $FILE
 #ifdef FOO
 void f();

Parsing this file results in no diagnostics, as expected:
 % ./c-index-test -test-load-source none $FILE                                

When reparsing, wrong diagnostics are emitted:
 % CINDEXTEST_EDITING=1 ./c-index-test -test-load-source none $FILE          
 /home/nik/work/preambleBug/ifdef.cpp:1:2: error: unterminated conditional
 Number FIX-ITs = 0
 /home/nik/work/preambleBug/ifdef.cpp:3:2: error: #endif without #if
 Number FIX-ITs = 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/20170911/6f4ae522/attachment.html>

More information about the llvm-bugs mailing list