- 
    Bug 
- 
    Resolution: Incomplete
- 
     Not Evaluated Not Evaluated
- 
    None
- 
    Qt Creator 4.5.1
- 
    None
Take this simple C code:
void
write_temp_file()
{
  char *template;
  template = g_build_filename("/tmp", "test-XXXXXX", 0);
  for (int i = 0; i < 30; i++) {
  }
}
void
main()
{
  foo();
  bar();
  baz();
}
Select bar() and press Ctrl+Shift+Up. This happens:
void
write_temp_file()
{
  char *template;
  template = g_build_filename("/tmp", "test-XXXXXX", 0);
  for (int i = 0; i < 30; i++) {
  }
}
void
main()
{
                      bar();
  foo();
  baz();
}
Note bar() got aligned with the < operator in the for loop. It looks like QtCreator thought that was a template declaration. Indeed `template` is a reserved word in C++, but that is not the case in C.
- relates to
- 
                    QTCREATORBUG-20039 Clang Code Model treats C files as C++ -         
- Closed
 
-