Possible Visual Studio 2015 C++ Compiler and IntelliSense Bugs -


i encountered compiler crash , intellisense false positives visual studio 2015 using c++.

this crashes compiler when written within function block:

if(); 

this dialog shown when compiling (i on german version of windows):

enter image description here

even though compiler crashes, error list output:

error c2059 syntax error: ')'
warning c4390 ';': empty controlled statement found; intent?
error c1903 unable recover previous error(s); stopping compilation

this produces squiggles , error annotations in vertical scrollbar in map mode, no actual intellisense errors:

#include <vector>  struct s { std::vector<s> children; };  int main(int argc, char* argv[]) {     s item;      item.children.push_back(s());     //           ^     // error: no instance of overloaded function      // "std::vector<_ty, _alloc>::push_back [with _ty=s, _alloc=std::allocator<s>]"      // matches argument list     // argument types are: (s)     // object type is: std::vector<s, std::allocator<s>>      s& = item.children.back();     //        ^^^^     // error: reference of type "s &" (not const-qualified) cannot     // initialized value of type "s"      return 0; } 

are bugs? known? can reproduce them?

for first case: compiler shouldn't crash issue diagnostic show. yes, that's bug. doesn't occur in vs2013 btw. submit report here

for second case: same in vs2013 , due nesting vector of s inside s. , other cases make error squiggles appear incorrectly, not uncommon. ideally should not happen can submit bug report well, though might going labelled 'wontfix' compiler team focusses on more urgent cases.


Comments