[cfe-users] (no subject)

2020-02-18 Thread degski via cfe-users
Hi Андре,

You need to install "the integration" (with VS) correctly.

For VS14 you'll need to use 'old style' integration:
https://github.com/degski/Clang.Props . This is a copy job.

For VS15, use the plugin on:
https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.llvm-toolchain
.

The latter don't work for VS19, use this instead:
https://github.com/degski/llvm2019 . For the latter, you'll need to install
the components to build a VS plugin-in. Just open and build the (llvm2019)
project and VC will install the components to build the project.  The
resulting binary is unsigned and can only be used on your machine. If you
go this route (the only counts for llvm2019), you'll (possibly) need a fix
to Windows (to build and run unsigned plugins), I'll point it out to you if
you need it and just ask.

In all 'integrations' the tool-chain' (vc/clang-cl) can be selected from
the pull-down menu in VS.

degski

PS: please refrain from nastiness if you haven't yet researched the problem
and are unaware that your solution simply possibly does not cut the
mustard. Done properly the use of clang with VS is seamless.
-- 
@realdegski
https://brave.com/google-gdpr-workaround/
"We value your privacy, click here!" Sod off! - degski
"Anyone who believes that exponential growth can go on forever in a finite
world is either a madman or an economist" - Kenneth E. Boulding
"Growth for the sake of growth is the ideology of the cancer cell" - Edward
P. Abbey
___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] Clang-tidy lexer util issue.

2020-02-18 Thread Lewis, Cannada via cfe-users
I was able to solve my problem by making sure to get the expansion location 
before calling getPreviousToken.

On Feb 17, 2020, at 5:42 PM, Lewis, Cannada 
mailto:canl...@sandia.gov>> wrote:

I am trying to use the getPreviousToken function from 
clang-tools-extra/clang-tidy/utils/LexerUtils.cpp,
 but am having issues when the SourceLocation comes from a macro.  Let’s say I 
have the following functions:

#include 
#include 

// The macros are  defined such that KOKKOS_FUNCTION is empty and 
KOKKOS_INLINE_FUNCITON = “inline”

KOKKOS_FUNCTION
void useString(std::string const& s, int i){ }

KOKKOS_INLINE_FUNCTION
void useString2(std::string const& s, int i){ }

If I take the FunctionDecl for useString and use getBeginLoc, I will get a 
location that corresponds to the token void right before useString, I then use 
getPreviousToken to find the KOKKOS_FUNCTION macro and all is well.

But if I call getBeginLoc on useString2 my location starts off in the macro 
(I’m not really sure exactly what that means, my guess is that it starts on the 
inline keyword) and if I use that location for getPreviousToken, I don’t get 
the ‘}' from the line with useString, instead I get some location from other 
headers included in Kokkos_Core.hpp.  I don’t think that this is the intended 
behavior, but I don’t have a minimal working example at the moment. I did track 
it down to  where getPreviousToken calls getWithOffset(-1) on the source 
location and it is that new location which is the unexpected location.

Any help would be appreciated.

-Cannada Lewis

___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] (no subject)

2020-02-18 Thread Andrey L via cfe-users

Thanks for replying!

Unfortunately, this is not what I am looking for. Probably was not clear 
enough when I've asked.


I do NOT look for any sort of integration with VS. On contrary, I would 
like clang-cl.exe NOT to see any VS installations I might have on my 
machine.


What I see is that, no matter what I do, clang-cl.exe always discovers 
my VS installation and pulls include files from there. I don't need 
that. I need it only to see what is specified on command line.


Specifically, when compiling "hello, world" I would like it to fail with 
"stdio.h not found" and not with "I've scanned your system, found visual 
studio and decided to use include files from there, now I'm failing 
because of some incompatibility".


So, my questions are:

1. where is this "magic scan for includes" functionality is coming from?

2. how can I disable it? To make sure that clang-cl.exe is a compiler, 
that takes options and input files from command line, and not from some 
hard-coded heuristics.


Is it possible at all?


On 18.02.2020 13:52, degski via cfe-users wrote:

You need to install "the integration" (with VS) correctly.


PS: please refrain from nastiness if you haven't yet researched the 
problem and are unaware that your solution simply possibly does not 
cut the mustard. Done properly the use of clang with VS is seamless.

___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users