-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed as not planned
Milestone
Description
Type: LanguageService
Describe the bug
- OS and Version: Win 10
- VS Code Version: 1.34
- C/C++ Extension Version: 0.23.1
- Other extensions you installed (and if the issue persists after disabling them):
We have to use dynamic SQL statements, and in the synthax we have to put a ":" before a variable, but it seems that break the IntelliSense.
Please have a look on the documentation below: Oracle dynamic statements
Actually when we want to drive into dba_test_with_proc_and_without_colon function it show us the header instead of the function declaration.
But when we drive into dba_test_with_proc_and_without_colon it shows us the declaration.
To Reproduce
- Go to the main file
- Go to Declaration (F12) on the dba_test_with_proc_and_colon, it drives to the header declaration
- Go to Declaration (F12) on the dba_test_without_proc, it drives to the function declaration
- Go to Declaration (F12) on the dba_test_with_proc_and_without_colon, it drives to the function declaration
Expected behavior
when we go to Declaration (F12) on the dba_test_with_proc_and_colon, it must drive to the function declaration instead of the header
Code source
main.c
#include "hello.h"
int main()
{
int vl_err = 0;
short vl_num = 0;
vl_err = dba_test_with_proc_and_colon(vl_num);
vl_err = dba_test_without_proc(vl_num);
vl_err = dba_test_with_proc_and_without_colon(vl_num);
return 0;
}
hello.h
int dba_test_with_proc_and_without_colon(short va_num);
int dba_test_with_proc_and_colon(short va_num);
int dba_test_without_proc(short va_num);
hello.c
int dba_test_without_proc(short va_num)
{
int vl_ret_cod = 0;
if (va_num > 1)
vl_ret_cod = 1;
return vl_ret_cod;
}
int dba_test_with_proc_and_without_colon(short va_num)
{
int vl_ret_cod = 0;
EXEC SQL BEGIN DECLARE SECTION;
char vl_string[2048] = {0};
EXEC SQL END DECLARE SECTION;
strcpy(vl_string, "select * from tab");
EXEC SQL PREPARE select from vl_string;
return vl_ret_cod;
}
int dba_test_with_proc_and_colon(short va_num)
{
int vl_ret_cod = 0;
EXEC SQL BEGIN DECLARE SECTION;
char vl_string[2048] = {0};
EXEC SQL END DECLARE SECTION;
strcpy(vl_string, "select * from tab");
EXEC SQL PREPARE select from :vl_string;
return vl_ret_cod;
}
In the zip, you can find the source with we repro the issue
Intellisense.zip
romanalmashi, zzunnet, decke, bplusv, MarcusLowenborg and 13 more