[llvm-bugs] [Bug 42649] New: [REG 7 -> 8] Completion does not offer INT_MAX from limits.h

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 17 02:43:58 PDT 2019


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

            Bug ID: 42649
           Summary: [REG 7 -> 8] Completion does not offer INT_MAX from
                    limits.h
           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,
                    richard-llvm at metafoo.co.uk

~ % echo $T
/tmp/reproducer-macros.cpp
~ % cat -n $T
     1  #include <limits.h>
     2  
     3  int main() {}

### Test with clang-8 / trunk
~ % CINDEXTEST_EDITING=1 /usr/bin/c-index-test-8 -code-completion-at=$T:2:1  $T
| grep " INT"
zsh: done       CINDEXTEST_EDITING=1 /usr/bin/c-index-test-8
-code-completion-at=$T:2:1 $T | 
zsh: exit 1     grep --color=auto " INT"

### Test with clang-7
~ % CINDEXTEST_EDITING=1 /usr/bin/c-index-test-7 -code-completion-at=$T:2:1  $T
| grep " INT"
macro definition:{TypedText INT_MAX} (70)
macro definition:{TypedText INT_MIN} (70)
macro definition:{TypedText INT_WIDTH} (70)


Works as expected without "CINDEXTEST_EDITING=1". However, for an IDE the
effect of CINDEXTEST_EDITING=1 is crucial (preamble generation + caching
completions).

-- 
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/20190717/253e512f/attachment.html>


More information about the llvm-bugs mailing list