Open deuscovrigus opened 4 years ago
I can get the blank result and I'm using clang 7.0.1 as well. However it works just some days before, just doesn't works today.
I can get the blank result and I'm using clang 7.0.1 as well. However it works just some days before, just doesn't works today.
I get blank just because I fixed all of warning/errors... And the reason I think I should have got an warning is because sth like this:
#include <stdio.h>
#include <stdlib.h>
struct X
{
int a;
int b;
};
int main(int argc, char *argv[])
{
struct X x;
printf("Hi x=%d", x.a);
return 0;
}
x is uninitialized.
/u/y/g/cdemo> /usr/local/bin/cc -Wall -c -o /u01/yizhi/github/cdemo/CMakeFiles/main.dir/main.c.o
/u01/github/cdemo/main.c: In function ‘main’:
/u01/github/cdemo/main.c:13:5: warning: ‘x.a’ is used uninitialized in this function [-Wuninitialized]
printf("Hi x=%d", x.a);
^~~~~~~~~~~~~~~~~~~~~~
with clang 7.0.1, it get blank.
Completion however seems to work when I attempt to code complete a snippet: /usr/local/bin/rc --current-file=/proj/rtags/src/ClassHierarchyJob.cpp -b --unsaved-file=/proj/rtags/src/ClassHierarchyJob.cpp:/tmp/7RGQF6 -z -t128 --code-complete-at /home/prj/rtags/src/ClassHierarchyJob.cpp:3│·································································································································· 2:12: --synchronous-completions --elisp
With llvm 6.0 and gcc 7.3.0 the diagnostics work as expected (tried in a docker)