ide: Fixed ASSIST issues with using VC++

This commit is contained in:
Mirek Fidler 2023-09-05 12:33:29 +02:00
parent b9df966e63
commit 31c1a5fcea
3 changed files with 24 additions and 4 deletions

View file

@ -3,10 +3,18 @@
String CacheDir()
{
String dir;
#ifdef PLATFORM_WIN32
dir = ConfigFile("cache");
#ifdef _DEBUG
#ifdef PLATFORM_WIN32
dir = ConfigFile("cache.debug");
#else
dir = ConfigFile(".cache/upp.cache.debug");
#endif
#else
dir = ConfigFile(".cache/upp.cache");
#ifdef PLATFORM_WIN32
dir = ConfigFile("cache");
#else
dir = ConfigFile(".cache/upp.cache");
#endif
#endif
ONCELOCK {
RealizeDirectory(dir);

View file

@ -433,6 +433,8 @@ void Ide::SyncBuildMode()
String h = method + ' ';
h << (targetmode ? "Release" : "Debug");
buildmode <<= h;
TriggerIndexer();
editor.TriggerSyncFile(0);
}
void Ide::DropMethodList()

View file

@ -103,8 +103,18 @@ bool Clang::Parse(const String& filename_, const String& content,
Vector<String> args;
for(const String& s : Split(includes, ';'))
for(const String& s : Split(includes, ';')) {
#ifdef PLATFORM_WIN32 // we need to ignore internal VC++ headers
static VectorMap<String, bool> use;
int q = use.Find(s);
if(q < 0) {
q = use.GetCount();
use.Add(s, !FileExists(AppendFileName(s, "vcruntime.h")));
}
if(use[q])
#endif
args.Add("-I" + s);
}
if(iquote.GetCount()) // path to real_filename for #include "xxx" handling
args.Add("-I" + iquote);