r299543 - clang-format-vsix: Add "Format on Save" feature

2017-04-05 Thread Antonio Maiorano via cfe-commits
Author: amaiorano
Date: Wed Apr  5 09:13:45 2017
New Revision: 299543

URL: http://llvm.org/viewvc/llvm-project?rev=299543=rev
Log:
clang-format-vsix: Add "Format on Save" feature

This change adds a feature to the clang-format VS extension that optionally
enables the automatic formatting of documents when saving. Since developers
always need to save their files, this eases the workflow of making sure source
files are properly formatted.

Differential Revision: https://reviews.llvm.org/D29221

Added:

cfe/trunk/tools/clang-format-vs/ClangFormat/RunningDocTableEventsDispatcher.cs
cfe/trunk/tools/clang-format-vs/ClangFormat/Vsix.cs
Modified:
cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormat.csproj
cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs

Modified: cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormat.csproj
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormat.csproj?rev=299543=299542=299543=diff
==
--- cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormat.csproj (original)
+++ cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormat.csproj Wed Apr  5 
09:13:45 2017
@@ -214,6 +214,8 @@
 
 
 
+
+
   
   
 

Modified: cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs?rev=299543=299542=299543=diff
==
--- cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs (original)
+++ cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs Wed Apr  
5 09:13:45 2017
@@ -12,12 +12,11 @@
 //
 
//===--===//
 
-using Microsoft.VisualStudio.Editor;
+using EnvDTE;
 using Microsoft.VisualStudio.Shell;
 using Microsoft.VisualStudio.Shell.Interop;
 using Microsoft.VisualStudio.Text;
 using Microsoft.VisualStudio.Text.Editor;
-using Microsoft.VisualStudio.TextManager.Interop;
 using System;
 using System.Collections;
 using System.ComponentModel;
@@ -25,6 +24,7 @@ using System.ComponentModel.Design;
 using System.IO;
 using System.Runtime.InteropServices;
 using System.Xml.Linq;
+using System.Linq;
 
 namespace LLVM.ClangFormat
 {
@@ -36,6 +36,17 @@ namespace LLVM.ClangFormat
 private string fallbackStyle = "LLVM";
 private bool sortIncludes = false;
 private string style = "file";
+private bool formatOnSave = false;
+private string formatOnSaveFileExtensions =
+".c;.cpp;.cxx;.cc;.tli;.tlh;.h;.hh;.hpp;.hxx;.hh;.inl" +
+".java;.js;.ts;.m;.mm;.proto;.protodevel;.td";
+
+public OptionPageGrid Clone()
+{
+// Use MemberwiseClone to copy value types.
+var clone = (OptionPageGrid)MemberwiseClone();
+return clone;
+}
 
 public class StyleConverter : TypeConverter
 {
@@ -74,7 +85,7 @@ namespace LLVM.ClangFormat
 }
 }
 
-[Category("LLVM/Clang")]
+[Category("Format Options")]
 [DisplayName("Style")]
 [Description("Coding style, currently supports:\n" +
  "  - Predefined styles ('LLVM', 'Google', 'Chromium', 
'Mozilla', 'WebKit').\n" +
@@ -121,7 +132,7 @@ namespace LLVM.ClangFormat
 }
 }
 
-[Category("LLVM/Clang")]
+[Category("Format Options")]
 [DisplayName("Assume Filename")]
 [Description("When reading from stdin, clang-format assumes this " +
  "filename to look for a style config file (with 'file' 
style) " +
@@ -142,7 +153,7 @@ namespace LLVM.ClangFormat
 }
 }
 
-[Category("LLVM/Clang")]
+[Category("Format Options")]
 [DisplayName("Fallback Style")]
 [Description("The name of the predefined style used as a fallback in 
case clang-format " +
  "is invoked with 'file' style, but can not find the 
configuration file.\n" +
@@ -154,7 +165,7 @@ namespace LLVM.ClangFormat
 set { fallbackStyle = value; }
 }
 
-[Category("LLVM/Clang")]
+[Category("Format Options")]
 [DisplayName("Sort includes")]
 [Description("Sort touched include lines.\n\n" +
  "See also: http://clang.llvm.org/docs/ClangFormat.html.;)]
@@ -163,20 +174,48 @@ namespace LLVM.ClangFormat
 get { return sortIncludes; }
 set { sortIncludes = value; }
 }
+
+[Category("Format On Save")]
+[DisplayName("Enable")]
+[Description("Enable running clang-format when modified files are 
saved. " +
+ "Will only format if Style is found (ignores Fallback 
Style)."
+)]
+public bool FormatOnSave
+{
+

r292787 - clang-format: remove tests that assume no config file will be found as this is not always the case

2017-01-23 Thread Antonio Maiorano via cfe-commits
Author: amaiorano
Date: Mon Jan 23 07:20:23 2017
New Revision: 292787

URL: http://llvm.org/viewvc/llvm-project?rev=292787=rev
Log:
clang-format: remove tests that assume no config file will be found as this is 
not always the case

These tests fail for developers who place their build directories under the
llvm root directory because llvm's own .clang-format file will be found.
Anyway these cases are covered by FormatStyle.GetStyleOfFile tests
(FormatTest.cpp).

Differential Revision: https://reviews.llvm.org/D28983

Modified:
cfe/trunk/test/Format/style-on-command-line.cpp

Modified: cfe/trunk/test/Format/style-on-command-line.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Format/style-on-command-line.cpp?rev=292787=292786=292787=diff
==
--- cfe/trunk/test/Format/style-on-command-line.cpp (original)
+++ cfe/trunk/test/Format/style-on-command-line.cpp Mon Jan 23 07:20:23 2017
@@ -13,16 +13,11 @@
 // RUN: clang-format -style="{BasedOnStyle: WebKit, PointerBindsToType: 
false}" %s | FileCheck -strict-whitespace -check-prefix=CHECK9 %s
 
 // Fallback style tests
-// RUN: rm %T/_clang-format
-// Test no config file found, WebKit fallback style is applied
-// RUN: clang-format -style=file -fallback-style=WebKit 
-assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace 
-check-prefix=CHECK10 %s
-// Test no config file and fallback style "none", no formatting is applied
-// RUN: clang-format -style=file -fallback-style=none 
-assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace 
-check-prefix=CHECK11 %s
 // Test config file with no based style, and fallback style "none", formatting 
is applied
 // RUN: printf "IndentWidth: 6\n" > %T/_clang-format
-// RUN: clang-format -style=file -fallback-style=none 
-assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace 
-check-prefix=CHECK12 %s
+// RUN: clang-format -style=file -fallback-style=none 
-assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace 
-check-prefix=CHECK10 %s
 // Test yaml with no based style, and fallback style "none", LLVM formatting 
applied
-// RUN: clang-format -style="{IndentWidth: 7}" -fallback-style=none %s | 
FileCheck -strict-whitespace -check-prefix=CHECK13 %s
+// RUN: clang-format -style="{IndentWidth: 7}" -fallback-style=none %s | 
FileCheck -strict-whitespace -check-prefix=CHECK11 %s
 
 void f() {
 // CHECK1: {{^int\* i;$}}
@@ -35,10 +30,8 @@ void f() {
 // CHECK7: {{^  int\* i;$}}
 // CHECK8: {{^  int\* i;$}}
 // CHECK9: {{^int \*i;$}}
-// CHECK10: {{^int\* i;$}}
-// CHECK11: {{^int\*i;$}}
-// CHECK12: {{^  int \*i;$}}
-// CHECK13: {{^   int \*i;$}}
+// CHECK10: {{^  int \*i;$}}
+// CHECK11: {{^   int \*i;$}}
 int*i;
 int j;
 }


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


Re: [PATCH] D28943: [clang-format] Remove redundant test in style-on-command-line.cpp

2017-01-20 Thread Antonio Maiorano via cfe-commits
On Fri, 20 Jan 2017 at 11:26 Eric Liu via Phabricator <
revi...@reviews.llvm.org> wrote:

ioeric added a comment.

In https://reviews.llvm.org/D28943#651536, @amaiorano wrote:

> In https://reviews.llvm.org/D28943#651489, @ioeric wrote:
>
> > In https://reviews.llvm.org/D28943#651488, @amaiorano wrote:
> >
> > > In https://reviews.llvm.org/D28943#651470, @ioeric wrote:
> > >
> > > > @amaiorano: The test itself is correct. It's just that this test
failed in our internal test. We could've fixed it internally, but the fix
would be ugly. Since the intended behavior is already covered in the case
above it, and it's really just checking the default fallback style is LLVM,
which is not related to the original change, I think it makes sense to get
rid of the case. Hope you don't mind :)
> > >
> > >
> > > Of course I don't mind :) Why did it fail your internal tests, btw?
Just curious. Was it something I could've detected myself?
> >
> >
> > Probably not... it's just that our default fallback style is "Google"
instead of "LLVM".
>
>
> (I replied the following by email, but I'm not sure where it went...
posting it here instead)
>
> You mean you build a modified version of clang-format where Style is
initialized to getGoogleStyle()?
>
> I had wondered whether adding a "defaultStyle" argument might be useful,
specifically in the case where you want to pass in yaml that simply tweaks
the default style, but I figured it's not much harder to pass in
"BasedOnStyle" in the yaml.


No.. we set both default style and default fallback style (tool options) to
"google" in our build.


How do you do that? I'm trying to understand how running that specific test
failed for you guys. What I'm getting is that my test would not explicitly
set fallback-style and assume it would use LLVM, but you're saying on your
end, there's a way to set the fallback-style otherwise (you wrote "tools
options", but I'm not sure what that means). Sorry for being pedantic :)


I don't see why "defaultStyle" would be useful. I think having the existing
"style" and "fallback-style" options is sufficient (and already a bit
confusing).


I agree completely.




Repository:
  rL LLVM

https://reviews.llvm.org/D28943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: r292562 - clang-format: fix fallback style set to "none" not always formatting

2017-01-20 Thread Antonio Maiorano via cfe-commits
Hello Mikael,

Did you try again with the removal of the redundant test (D28943)?


On Fri, 20 Jan 2017 at 08:34 Mikael Holmén <mikael.hol...@ericsson.com>
wrote:

> Hi,
>
> On 01/20/2017 02:20 PM, Antonio Maiorano wrote:
> > Hi Mikael,
> >
> > Just to be sure, did you build clang-format before running this test?
>
> Yes I did. I compiled a clean trunk, ran the test, got the failure.
>
> >
> > Possibly related, one of the tests I added was just removed for being
> > redundant:
> > https://reviews.llvm.org/D28943
>
> Aha. I can't say I understand what's going on there, I don't even know
> how to change the default fallback style or what it is :)
>
> Regards,
>
> Mikael
>
> >
> >
> > On Fri, Jan 20, 2017 at 7:50 AM Mikael Holmén
> > <mikael.hol...@ericsson.com <mailto:mikael.hol...@ericsson.com>> wrote:
> >
> > Hi Antonio,
> >
> >
> >
> > The test case
> >
> >
> >
> > Clang :: Format/style-on-command-line.cpp
> >
> >
> >
> > fails for me since this commit.
> >
> >
> >
> > test/Format/style-on-command-line.cpp:40:13: error: expected string
> not
> >
> > found in input
> >
> > // CHECK10: {{^int\* i;$}}
> >
> >  ^
> >
> > :1:1: note: scanning from here
> >
> > // RUN: clang-format -style="{BasedOnStyle: Google, IndentWidth: 8}"
> > %s |
> >
> >     ^
> >
> > :61:16: note: possible intended match here
> >
> >// CHECK10: {{^int\* i;$}}
> >
> > ^
> >
> >
> >
> > I suppose it works for you... Any idea what the problem can be?
> >
> >
> >
> > Regards,
> >
> > Mikael
> >
> >
> > On 01/20/2017 02:22 AM, Antonio Maiorano via cfe-commits wrote:
> >
> > > Author: amaiorano
> >
> > > Date: Thu Jan 19 19:22:42 2017
> >
> > > New Revision: 292562
> >
> > >
> >
> > > URL: http://llvm.org/viewvc/llvm-project?rev=292562=rev
> >
> > > Log:
> >
> > > clang-format: fix fallback style set to "none" not always
> formatting
> >
> > >
> >
> > > This fixes clang-format not formatting if fallback-style is
> > explicitly set to
> >
> > > "none", and either a config file is found or YAML is passed in
> > without a
> >
> > > "BasedOnStyle". With this change, passing "none" in these cases
> > will have no
> >
> > > affect, and LLVM style will be used as the base style.
> >
> > >
> >
> > > Differential Revision: https://reviews.llvm.org/D28844
> >
> > >
> >
> > > Modified:
> >
> > > cfe/trunk/lib/Format/Format.cpp
> >
> > > cfe/trunk/test/Format/style-on-command-line.cpp
> >
> > > cfe/trunk/unittests/Format/FormatTest.cpp
> >
> > >
> >
> > > Modified: cfe/trunk/lib/Format/Format.cpp
> >
> > > URL:
> >
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=292562=292561=292562=diff
> >
> > >
> >
>  
> ==
> >
> > > --- cfe/trunk/lib/Format/Format.cpp (original)
> >
> > > +++ cfe/trunk/lib/Format/Format.cpp Thu Jan 19 19:22:42 2017
> >
> > > @@ -1888,8 +1888,8 @@ static FormatStyle::LanguageKind getLang
> >
> > >  }
> >
> > >
> >
> > >  llvm::Expected getStyle(StringRef StyleName,
> > StringRef FileName,
> >
> > > - StringRef FallbackStyle,
> > StringRef Code,
> >
> > > - vfs::FileSystem *FS) {
> >
> > > + StringRef FallbackStyleName,
> >
> > > + StringRef Code,
> > vfs::FileSystem *FS) {
> >
> > >if (!FS) {
> >
> > >  FS = vfs::getRealFileSystem().get();
> >
> > >}
> >
> > > @@ -1903,9 +1903,9 @@ llvm::Expected getStyle(Str
> >
> > >(Code.contains("\n- (") || Code.contains(&

Re: [PATCH] D28943: [clang-format] Remove redundant test in style-on-command-line.cpp

2017-01-20 Thread Antonio Maiorano via cfe-commits
You mean you build a modified version of clang-format where Style is
initialized to getGoogleStyle()?

I had wondered whether adding a -defaultStyle argument might be useful,
specifically in the case where you want to pass in yaml that simply tweaks
the default style, but I figured it's not much harder to pass in
"BasedOnStyle" in the yaml.

On Fri, Jan 20, 2017 at 8:17 AM Eric Liu via Phabricator <
revi...@reviews.llvm.org> wrote:

> ioeric added a comment.
>
>
>
> In https://reviews.llvm.org/D28943#651488, @amaiorano wrote:
>
>
>
> > In https://reviews.llvm.org/D28943#651470, @ioeric wrote:
>
> >
>
> > > @amaiorano: The test itself is correct. It's just that this test
> failed in our internal test. We could've fixed it internally, but the fix
> would be ugly. Since the intended behavior is already covered in the case
> above it, and it's really just checking the default fallback style is LLVM,
> which is not related to the original change, I think it makes sense to get
> rid of the case. Hope you don't mind :)
>
> >
>
> >
>
> > Of course I don't mind :) Why did it fail your internal tests, btw? Just
> curious. Was it something I could've detected myself?
>
>
>
>
>
> Probably not... it's just that our default fallback style is "Google"
> instead of "LLVM".
>
>
>
>
>
> Repository:
>
>   rL LLVM
>
>
>
> https://reviews.llvm.org/D28943
>
>
>
>
>
>
>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: r292562 - clang-format: fix fallback style set to "none" not always formatting

2017-01-20 Thread Antonio Maiorano via cfe-commits
Hi Mikael,

Just to be sure, did you build clang-format before running this test?

Possibly related, one of the tests I added was just removed for being
redundant:
https://reviews.llvm.org/D28943


On Fri, Jan 20, 2017 at 7:50 AM Mikael Holmén <mikael.hol...@ericsson.com>
wrote:

> Hi Antonio,
>
>
>
> The test case
>
>
>
> Clang :: Format/style-on-command-line.cpp
>
>
>
> fails for me since this commit.
>
>
>
> test/Format/style-on-command-line.cpp:40:13: error: expected string not
>
> found in input
>
> // CHECK10: {{^int\* i;$}}
>
>  ^
>
> :1:1: note: scanning from here
>
> // RUN: clang-format -style="{BasedOnStyle: Google, IndentWidth: 8}" %s |
>
> ^
>
> :61:16: note: possible intended match here
>
>// CHECK10: {{^int\* i;$}}
>
> ^
>
>
>
> I suppose it works for you... Any idea what the problem can be?
>
>
>
> Regards,
>
> Mikael
>
>
> On 01/20/2017 02:22 AM, Antonio Maiorano via cfe-commits wrote:
>
> > Author: amaiorano
>
> > Date: Thu Jan 19 19:22:42 2017
>
> > New Revision: 292562
>
> >
>
> > URL: http://llvm.org/viewvc/llvm-project?rev=292562=rev
>
> > Log:
>
> > clang-format: fix fallback style set to "none" not always formatting
>
> >
>
> > This fixes clang-format not formatting if fallback-style is explicitly
> set to
>
> > "none", and either a config file is found or YAML is passed in without a
>
> > "BasedOnStyle". With this change, passing "none" in these cases will
> have no
>
> > affect, and LLVM style will be used as the base style.
>
> >
>
> > Differential Revision: https://reviews.llvm.org/D28844
>
> >
>
> > Modified:
>
> > cfe/trunk/lib/Format/Format.cpp
>
> > cfe/trunk/test/Format/style-on-command-line.cpp
>
> > cfe/trunk/unittests/Format/FormatTest.cpp
>
> >
>
> > Modified: cfe/trunk/lib/Format/Format.cpp
>
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=292562=292561=292562=diff
>
> >
> ==
>
> > --- cfe/trunk/lib/Format/Format.cpp (original)
>
> > +++ cfe/trunk/lib/Format/Format.cpp Thu Jan 19 19:22:42 2017
>
> > @@ -1888,8 +1888,8 @@ static FormatStyle::LanguageKind getLang
>
> >  }
>
> >
>
> >  llvm::Expected getStyle(StringRef StyleName, StringRef
> FileName,
>
> > - StringRef FallbackStyle, StringRef
> Code,
>
> > - vfs::FileSystem *FS) {
>
> > + StringRef FallbackStyleName,
>
> > + StringRef Code, vfs::FileSystem
> *FS) {
>
> >if (!FS) {
>
> >  FS = vfs::getRealFileSystem().get();
>
> >}
>
> > @@ -1903,9 +1903,9 @@ llvm::Expected getStyle(Str
>
> >(Code.contains("\n- (") || Code.contains("\n+ (")))
>
> >  Style.Language = FormatStyle::LK_ObjC;
>
> >
>
> > -  // FIXME: If FallbackStyle is explicitly "none", format is disabled.
>
> > -  if (!getPredefinedStyle(FallbackStyle, Style.Language, ))
>
> > -return make_string_error("Invalid fallback style \"" +
> FallbackStyle.str());
>
> > +  FormatStyle FallbackStyle = getNoStyle();
>
> > +  if (!getPredefinedStyle(FallbackStyleName, Style.Language,
> ))
>
> > +return make_string_error("Invalid fallback style \"" +
> FallbackStyleName);
>
> >
>
> >if (StyleName.startswith("{")) {
>
> >  // Parse YAML/JSON style from the command line.
>
> > @@ -1977,7 +1977,7 @@ llvm::Expected getStyle(Str
>
> >  return make_string_error("Configuration file(s) do(es) not support
> " +
>
> >   getLanguageName(Style.Language) + ": " +
>
> >   UnsuitableConfigFiles);
>
> > -  return Style;
>
> > +  return FallbackStyle;
>
> >  }
>
> >
>
> >  } // namespace format
>
> >
>
> > Modified: cfe/trunk/test/Format/style-on-command-line.cpp
>
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Format/style-on-command-line.cpp?rev=292562=292561=292562=diff
>
> >
> ==
>
> > --- cfe/trunk/test/Format/s

r292562 - clang-format: fix fallback style set to "none" not always formatting

2017-01-19 Thread Antonio Maiorano via cfe-commits
Author: amaiorano
Date: Thu Jan 19 19:22:42 2017
New Revision: 292562

URL: http://llvm.org/viewvc/llvm-project?rev=292562=rev
Log:
clang-format: fix fallback style set to "none" not always formatting

This fixes clang-format not formatting if fallback-style is explicitly set to
"none", and either a config file is found or YAML is passed in without a
"BasedOnStyle". With this change, passing "none" in these cases will have no
affect, and LLVM style will be used as the base style.

Differential Revision: https://reviews.llvm.org/D28844

Modified:
cfe/trunk/lib/Format/Format.cpp
cfe/trunk/test/Format/style-on-command-line.cpp
cfe/trunk/unittests/Format/FormatTest.cpp

Modified: cfe/trunk/lib/Format/Format.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=292562=292561=292562=diff
==
--- cfe/trunk/lib/Format/Format.cpp (original)
+++ cfe/trunk/lib/Format/Format.cpp Thu Jan 19 19:22:42 2017
@@ -1888,8 +1888,8 @@ static FormatStyle::LanguageKind getLang
 }
 
 llvm::Expected getStyle(StringRef StyleName, StringRef FileName,
- StringRef FallbackStyle, StringRef Code,
- vfs::FileSystem *FS) {
+ StringRef FallbackStyleName,
+ StringRef Code, vfs::FileSystem *FS) {
   if (!FS) {
 FS = vfs::getRealFileSystem().get();
   }
@@ -1903,9 +1903,9 @@ llvm::Expected getStyle(Str
   (Code.contains("\n- (") || Code.contains("\n+ (")))
 Style.Language = FormatStyle::LK_ObjC;
 
-  // FIXME: If FallbackStyle is explicitly "none", format is disabled.
-  if (!getPredefinedStyle(FallbackStyle, Style.Language, ))
-return make_string_error("Invalid fallback style \"" + 
FallbackStyle.str());
+  FormatStyle FallbackStyle = getNoStyle();
+  if (!getPredefinedStyle(FallbackStyleName, Style.Language, ))
+return make_string_error("Invalid fallback style \"" + FallbackStyleName);
 
   if (StyleName.startswith("{")) {
 // Parse YAML/JSON style from the command line.
@@ -1977,7 +1977,7 @@ llvm::Expected getStyle(Str
 return make_string_error("Configuration file(s) do(es) not support " +
  getLanguageName(Style.Language) + ": " +
  UnsuitableConfigFiles);
-  return Style;
+  return FallbackStyle;
 }
 
 } // namespace format

Modified: cfe/trunk/test/Format/style-on-command-line.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Format/style-on-command-line.cpp?rev=292562=292561=292562=diff
==
--- cfe/trunk/test/Format/style-on-command-line.cpp (original)
+++ cfe/trunk/test/Format/style-on-command-line.cpp Thu Jan 19 19:22:42 2017
@@ -11,6 +11,21 @@
 // RUN: clang-format -style=file -assume-filename=%T/foo.cpp < %s | FileCheck 
-strict-whitespace -check-prefix=CHECK7 %s
 // RUN: clang-format -style="{BasedOnStyle: LLVM, PointerBindsToType: true}" 
%s | FileCheck -strict-whitespace -check-prefix=CHECK8 %s
 // RUN: clang-format -style="{BasedOnStyle: WebKit, PointerBindsToType: 
false}" %s | FileCheck -strict-whitespace -check-prefix=CHECK9 %s
+
+// Fallback style tests
+// RUN: rm %T/_clang-format
+// Test no config file found, WebKit fallback style is applied
+// RUN: clang-format -style=file -fallback-style=WebKit 
-assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace 
-check-prefix=CHECK10 %s
+// Test no config file and no fallback style, LLVM style is applied
+// RUN: clang-format -style=file -assume-filename=%T/foo.cpp < %s 2>&1 | 
FileCheck -strict-whitespace -check-prefix=CHECK11 %s
+// Test no config file and fallback style "none", no formatting is applied
+// RUN: clang-format -style=file -fallback-style=none 
-assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace 
-check-prefix=CHECK12 %s
+// Test config file with no based style, and fallback style "none", formatting 
is applied
+// RUN: printf "IndentWidth: 6\n" > %T/_clang-format
+// RUN: clang-format -style=file -fallback-style=none 
-assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace 
-check-prefix=CHECK13 %s
+// Test yaml with no based style, and fallback style "none", LLVM formatting 
applied
+// RUN: clang-format -style="{IndentWidth: 7}" -fallback-style=none %s | 
FileCheck -strict-whitespace -check-prefix=CHECK14 %s
+
 void f() {
 // CHECK1: {{^int\* i;$}}
 // CHECK2: {{^   int \*i;$}}
@@ -22,6 +37,11 @@ void f() {
 // CHECK7: {{^  int\* i;$}}
 // CHECK8: {{^  int\* i;$}}
 // CHECK9: {{^int \*i;$}}
+// CHECK10: {{^int\* i;$}}
+// CHECK11: {{^  int \*i;$}}
+// CHECK12: {{^int\*i;$}}
+// CHECK13: {{^  int \*i;$}}
+// CHECK14: {{^   int \*i;$}}
 int*i;
 int j;
 }

Modified: cfe/trunk/unittests/Format/FormatTest.cpp
URL: 

[clang-tools-extra] r292175 - Update tools to use new getStyle API

2017-01-16 Thread Antonio Maiorano via cfe-commits
Author: amaiorano
Date: Mon Jan 16 18:13:32 2017
New Revision: 292175

URL: http://llvm.org/viewvc/llvm-project?rev=292175=rev
Log:
Update tools to use new getStyle API

Depends on https://reviews.llvm.org/D28081

Differential Revision: https://reviews.llvm.org/D28315

Modified:
clang-tools-extra/trunk/change-namespace/ChangeNamespace.cpp

clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
clang-tools-extra/trunk/clang-move/ClangMove.cpp
clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp
clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp

Modified: clang-tools-extra/trunk/change-namespace/ChangeNamespace.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/change-namespace/ChangeNamespace.cpp?rev=292175=292174=292175=diff
==
--- clang-tools-extra/trunk/change-namespace/ChangeNamespace.cpp (original)
+++ clang-tools-extra/trunk/change-namespace/ChangeNamespace.cpp Mon Jan 16 
18:13:32 2017
@@ -883,11 +883,14 @@ void ChangeNamespaceTool::onEndOfTransla
 // Add replacements referring to the changed code to existing replacements,
 // which refers to the original code.
 Replaces = Replaces.merge(NewReplacements);
-format::FormatStyle Style =
-format::getStyle("file", FilePath, FallbackStyle);
+auto Style = format::getStyle("file", FilePath, FallbackStyle);
+if (!Style) {
+  llvm::errs() << llvm::toString(Style.takeError()) << "\n";
+  continue;
+}
 // Clean up old namespaces if there is nothing in it after moving.
 auto CleanReplacements =
-format::cleanupAroundReplacements(Code, Replaces, Style);
+format::cleanupAroundReplacements(Code, Replaces, *Style);
 if (!CleanReplacements) {
   llvm::errs() << llvm::toString(CleanReplacements.takeError()) << "\n";
   continue;

Modified: 
clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp?rev=292175=292174=292175=diff
==
--- 
clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
 (original)
+++ 
clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
 Mon Jan 16 18:13:32 2017
@@ -208,8 +208,15 @@ int main(int argc, char **argv) {
 
   // Determine a formatting style from options.
   format::FormatStyle FormatStyle;
-  if (DoFormat)
-FormatStyle = format::getStyle(FormatStyleOpt, FormatStyleConfig, "LLVM");
+  if (DoFormat) {
+auto FormatStyleOrError =
+format::getStyle(FormatStyleOpt, FormatStyleConfig, "LLVM");
+if (!FormatStyleOrError) {
+  llvm::errs() << llvm::toString(FormatStyleOrError.takeError()) << "\n";
+  return 1;
+}
+FormatStyle = *FormatStyleOrError;
+  }
 
   TUReplacements TURs;
   TUReplacementFiles TUFiles;

Modified: clang-tools-extra/trunk/clang-move/ClangMove.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-move/ClangMove.cpp?rev=292175=292174=292175=diff
==
--- clang-tools-extra/trunk/clang-move/ClangMove.cpp (original)
+++ clang-tools-extra/trunk/clang-move/ClangMove.cpp Mon Jan 16 18:13:32 2017
@@ -742,10 +742,13 @@ void ClangMoveTool::removeDeclsInOldFile
 // Ignore replacements for new.h/cc.
 if (SI == FilePathToFileID.end()) continue;
 llvm::StringRef Code = SM.getBufferData(SI->second);
-format::FormatStyle Style =
-format::getStyle("file", FilePath, Context->FallbackStyle);
+auto Style = format::getStyle("file", FilePath, Context->FallbackStyle);
+if (!Style) {
+  llvm::errs() << llvm::toString(Style.takeError()) << "\n";
+  continue;
+}
 auto CleanReplacements = format::cleanupAroundReplacements(
-Code, Context->FileToReplacements[FilePath], Style);
+Code, Context->FileToReplacements[FilePath], *Style);
 
 if (!CleanReplacements) {
   llvm::errs() << llvm::toString(CleanReplacements.takeError()) << "\n";

Modified: clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp?rev=292175=292174=292175=diff
==
--- clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp Mon Jan 16 18:13:32 2017
@@ -197,10 +197,14 @@ public:
   continue;
 }
 StringRef Code = Buffer.get()->getBuffer();
-format::FormatStyle Style = format::getStyle("file", File, 
FormatStyle);
+auto Style = format::getStyle("file", File, FormatStyle);
+if (!Style) {
+  llvm::errs() << 

r292174 - clang-format: Make GetStyle return Expected instead of FormatStyle

2017-01-16 Thread Antonio Maiorano via cfe-commits
Author: amaiorano
Date: Mon Jan 16 18:12:27 2017
New Revision: 292174

URL: http://llvm.org/viewvc/llvm-project?rev=292174=rev
Log:
clang-format: Make GetStyle return Expected instead of FormatStyle

Change the contract of GetStyle so that it returns an error when an error occurs
(i.e. when it writes to stderr), and only returns the fallback style when it
can't find a configuration file.

Differential Revision: https://reviews.llvm.org/D28081

Modified:
cfe/trunk/include/clang/Format/Format.h
cfe/trunk/lib/Format/Format.cpp
cfe/trunk/lib/Tooling/Refactoring.cpp
cfe/trunk/test/Format/style-on-command-line.cpp
cfe/trunk/tools/clang-format/ClangFormat.cpp
cfe/trunk/unittests/Format/FormatTest.cpp
cfe/trunk/unittests/Format/FormatTestObjC.cpp

Modified: cfe/trunk/include/clang/Format/Format.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Format/Format.h?rev=292174=292173=292174=diff
==
--- cfe/trunk/include/clang/Format/Format.h (original)
+++ cfe/trunk/include/clang/Format/Format.h Mon Jan 16 18:12:27 2017
@@ -853,17 +853,19 @@ extern const char *StyleOptionHelpDescri
 /// \param[in] FileName Path to start search for .clang-format if ``StyleName``
 /// == "file".
 /// \param[in] FallbackStyle The name of a predefined style used to fallback to
-/// in case the style can't be determined from \p StyleName.
+/// in case \p StyleName is "file" and no file can be found.
 /// \param[in] Code The actual code to be formatted. Used to determine the
 /// language if the filename isn't sufficient.
 /// \param[in] FS The underlying file system, in which the file resides. By
 /// default, the file system is the real file system.
 ///
-/// \returns FormatStyle as specified by ``StyleName``. If no style could be
-/// determined, the default is LLVM Style (see ``getLLVMStyle()``).
-FormatStyle getStyle(StringRef StyleName, StringRef FileName,
- StringRef FallbackStyle, StringRef Code = "",
- vfs::FileSystem *FS = nullptr);
+/// \returns FormatStyle as specified by ``StyleName``. If ``StyleName`` is
+/// "file" and no file is found, returns ``FallbackStyle``. If no style could 
be
+/// determined, returns an Error.
+llvm::Expected getStyle(StringRef StyleName, StringRef FileName,
+ StringRef FallbackStyle,
+ StringRef Code = "",
+ vfs::FileSystem *FS = nullptr);
 
 // \brief Returns a string representation of ``Language``.
 inline StringRef getLanguageName(FormatStyle::LanguageKind Language) {

Modified: cfe/trunk/lib/Format/Format.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=292174=292173=292174=diff
==
--- cfe/trunk/lib/Format/Format.cpp (original)
+++ cfe/trunk/lib/Format/Format.cpp Mon Jan 16 18:12:27 2017
@@ -421,6 +421,11 @@ std::error_code make_error_code(ParseErr
   return std::error_code(static_cast(e), getParseCategory());
 }
 
+inline llvm::Error make_string_error(const llvm::Twine ) {
+  return llvm::make_error(Message,
+ llvm::inconvertibleErrorCode());
+}
+
 const char *ParseErrorCategory::name() const noexcept {
   return "clang-format.parse_error";
 }
@@ -1882,9 +1887,9 @@ static FormatStyle::LanguageKind getLang
   return FormatStyle::LK_Cpp;
 }
 
-FormatStyle getStyle(StringRef StyleName, StringRef FileName,
- StringRef FallbackStyle, StringRef Code,
- vfs::FileSystem *FS) {
+llvm::Expected getStyle(StringRef StyleName, StringRef FileName,
+ StringRef FallbackStyle, StringRef Code,
+ vfs::FileSystem *FS) {
   if (!FS) {
 FS = vfs::getRealFileSystem().get();
   }
@@ -1898,35 +1903,28 @@ FormatStyle getStyle(StringRef StyleName
   (Code.contains("\n- (") || Code.contains("\n+ (")))
 Style.Language = FormatStyle::LK_ObjC;
 
-  if (!getPredefinedStyle(FallbackStyle, Style.Language, )) {
-llvm::errs() << "Invalid fallback style \"" << FallbackStyle
- << "\" using LLVM style\n";
-return Style;
-  }
+  // FIXME: If FallbackStyle is explicitly "none", format is disabled.
+  if (!getPredefinedStyle(FallbackStyle, Style.Language, ))
+return make_string_error("Invalid fallback style \"" + 
FallbackStyle.str());
 
   if (StyleName.startswith("{")) {
 // Parse YAML/JSON style from the command line.
-if (std::error_code ec = parseConfiguration(StyleName, )) {
-  llvm::errs() << "Error parsing -style: " << ec.message() << ", using "
-   << FallbackStyle << " style\n";
-}
+if (std::error_code ec = parseConfiguration(StyleName, ))
+  return make_string_error("Error parsing -style: " + ec.message());
 return 

r290319 - Make FormatStyle.GetStyleOfFile test work on MSVC

2016-12-21 Thread Antonio Maiorano via cfe-commits
Author: amaiorano
Date: Wed Dec 21 23:10:07 2016
New Revision: 290319

URL: http://llvm.org/viewvc/llvm-project?rev=290319=rev
Log:
Make FormatStyle.GetStyleOfFile test work on MSVC

Modify getStyle to use vfs::FileSystem::makeAbsolute just like FS.addFile does,
rather than sys::fs::make_absolute. The latter gets the CWD from the platform,
while the former expects it to be set by the client, causing a mismatch when
converting relative paths to absolute.

Differential Revision: https://reviews.llvm.org/D27971

Modified:
cfe/trunk/lib/Format/Format.cpp
cfe/trunk/unittests/Format/FormatTest.cpp

Modified: cfe/trunk/lib/Format/Format.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=290319=290318=290319=diff
==
--- cfe/trunk/lib/Format/Format.cpp (original)
+++ cfe/trunk/lib/Format/Format.cpp Wed Dec 21 23:10:07 2016
@@ -1917,7 +1917,11 @@ FormatStyle getStyle(StringRef StyleName
   // Look for .clang-format/_clang-format file in the file's parent 
directories.
   SmallString<128> UnsuitableConfigFiles;
   SmallString<128> Path(FileName);
-  llvm::sys::fs::make_absolute(Path);
+  if (std::error_code EC = FS->makeAbsolute(Path)) {
+llvm::errs() << EC.message() << "\n";
+return Style;
+  }
+
   for (StringRef Directory = Path; !Directory.empty();
Directory = llvm::sys::path::parent_path(Directory)) {
 

Modified: cfe/trunk/unittests/Format/FormatTest.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTest.cpp?rev=290319=290318=290319=diff
==
--- cfe/trunk/unittests/Format/FormatTest.cpp (original)
+++ cfe/trunk/unittests/Format/FormatTest.cpp Wed Dec 21 23:10:07 2016
@@ -10936,10 +10936,6 @@ TEST_F(FormatTest, ArrayAsTemplateType)
 format("auto a = unique_ptr < Foo < Bar>[10]> ;", Spaces));
 }
 
-// Since this test case uses UNIX-style file path. We disable it for MS
-// compiler.
-#if !defined(_MSC_VER) && !defined(__MINGW32__)
-
 TEST(FormatStyle, GetStyleOfFile) {
   vfs::InMemoryFileSystem FS;
   // Test 1: format file in the same directory.
@@ -10967,8 +10963,6 @@ TEST(FormatStyle, GetStyleOfFile) {
   ASSERT_EQ(Style3, getGoogleStyle());
 }
 
-#endif // _MSC_VER
-
 TEST_F(ReplacementTest, FormatCodeAfterReplacements) {
   // Column limit is 20.
   std::string Code = "Type *a =\n"


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


r289910 - clang-format-vsix: add command to format document

2016-12-15 Thread Antonio Maiorano via cfe-commits
Author: amaiorano
Date: Thu Dec 15 19:51:43 2016
New Revision: 289910

URL: http://llvm.org/viewvc/llvm-project?rev=289910=rev
Log:
clang-format-vsix: add command to format document

Bound to Ctrl+R, Ctrl+D by default. Also added section on how to debug the 
extension to the Readme.

Differential Revision: https://reviews.llvm.org/D27501

Modified:
cfe/trunk/tools/clang-format-vs/.gitignore
cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormat.vsct
cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs
cfe/trunk/tools/clang-format-vs/ClangFormat/PkgCmdID.cs
cfe/trunk/tools/clang-format-vs/README.txt

Modified: cfe/trunk/tools/clang-format-vs/.gitignore
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format-vs/.gitignore?rev=289910=289909=289910=diff
==
--- cfe/trunk/tools/clang-format-vs/.gitignore (original)
+++ cfe/trunk/tools/clang-format-vs/.gitignore Thu Dec 15 19:51:43 2016
@@ -1,5 +1,6 @@
 # Visual Studio files
 .vs/
+*.user
 /packages/
 /ClangFormat/obj/
 /ClangFormat/bin/

Modified: cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormat.vsct
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormat.vsct?rev=289910=289909=289910=diff
==
--- cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormat.vsct (original)
+++ cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormat.vsct Thu Dec 15 
19:51:43 2016
@@ -61,15 +61,21 @@
   DynamicVisibility
   If you do not want an image next to your command, remove the Icon 
node /> -->
 
-  
+  
 
 
 
-  ClangFormat
+  Clang Format Selection
 
   
 
-
+  
+
+
+
+  Clang Format Document
+
+  
 
 

@@ -88,7 +94,8 @@
 
 
   
-
+
+
   
 
 
@@ -101,7 +108,8 @@
 
 
   
-  
+  
+  
 
 
 

Modified: cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs?rev=289910=289909=289910=diff
==
--- cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs (original)
+++ cfe/trunk/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs Thu Dec 
15 19:51:43 2016
@@ -180,15 +180,44 @@ namespace LLVM.ClangFormat
 var commandService = GetService(typeof(IMenuCommandService)) as 
OleMenuCommandService;
 if (commandService != null)
 {
-var menuCommandID = new 
CommandID(GuidList.guidClangFormatCmdSet, (int)PkgCmdIDList.cmdidClangFormat);
-var menuItem = new MenuCommand(MenuItemCallback, 
menuCommandID);
-commandService.AddCommand(menuItem);
+{
+var menuCommandID = new 
CommandID(GuidList.guidClangFormatCmdSet, 
(int)PkgCmdIDList.cmdidClangFormatSelection);
+var menuItem = new MenuCommand(MenuItemCallback, 
menuCommandID);
+commandService.AddCommand(menuItem);
+}
+
+{
+var menuCommandID = new 
CommandID(GuidList.guidClangFormatCmdSet, 
(int)PkgCmdIDList.cmdidClangFormatDocument);
+var menuItem = new MenuCommand(MenuItemCallback, 
menuCommandID);
+commandService.AddCommand(menuItem);
+}
 }
 }
 #endregion
 
 private void MenuItemCallback(object sender, EventArgs args)
 {
+var mc = sender as System.ComponentModel.Design.MenuCommand;
+if (mc == null)
+return;
+
+switch (mc.CommandID.ID)
+{
+case (int)PkgCmdIDList.cmdidClangFormatSelection:
+FormatSelection();
+break;
+
+case (int)PkgCmdIDList.cmdidClangFormatDocument:
+FormatDocument();
+break;
+}
+}
+
+/// 
+/// Runs clang-format on the current selection
+/// 
+private void FormatSelection()
+{
 IWpfTextView view = GetCurrentView();
 if (view == null)
 // We're not in a text view.
@@ -197,24 +226,40 @@ namespace LLVM.ClangFormat
 int start = 
view.Selection.Start.Position.GetContainingLine().Start.Position;
 int end = 
view.Selection.End.Position.GetContainingLine().End.Position;
 int length = end - start;
+
 // clang-format doesn't support formatting a range that starts at 
the end
 // of the file.
 if (start >= text.Length && text.Length > 0)
 start = 

r289909 - clang-format-vsix: add a date stamp to the VSIX version number to ensure upgradability

2016-12-15 Thread Antonio Maiorano via cfe-commits
Author: amaiorano
Date: Thu Dec 15 19:37:01 2016
New Revision: 289909

URL: http://llvm.org/viewvc/llvm-project?rev=289909=rev
Log:
clang-format-vsix: add a date stamp to the VSIX version number to ensure 
upgradability

Presently, the version number of the VSIX matches the LLVM version number. 
However, as this number doesn't change often, it means that as we release new 
versions of this VSIX, it will have the same version number, which means users 
must first uninstall the old version before installing the new one. With this 
change, we generate a 4th part to the version number that is a date stamp 
(year, month, day); for example: 4.0.0.161203.

Differential Revision: https://reviews.llvm.org/D27438

Modified:
cfe/trunk/tools/clang-format-vs/CMakeLists.txt

Modified: cfe/trunk/tools/clang-format-vs/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format-vs/CMakeLists.txt?rev=289909=289908=289909=diff
==
--- cfe/trunk/tools/clang-format-vs/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-format-vs/CMakeLists.txt Thu Dec 15 19:37:01 2016
@@ -11,8 +11,11 @@ if (BUILD_CLANG_FORMAT_VS_PLUGIN)
   "${CLANG_SOURCE_DIR}/LICENSE.TXT"
   "${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat/license.txt")
 
+  # Build number added to Clang version to ensure that new VSIX can be upgraded
+  string(TIMESTAMP CLANG_FORMAT_VSIX_BUILD %y%m%d%H%M UTC)
+
   if (NOT CLANG_FORMAT_VS_VERSION)
-set(CLANG_FORMAT_VS_VERSION 
"${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
+set(CLANG_FORMAT_VS_VERSION 
"${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}.${CLANG_FORMAT_VSIX_BUILD}")
   endif()
 
   configure_file("source.extension.vsixmanifest.in"


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


Re: clang-format-vsix: versioning patch and show stderrors patch

2016-12-05 Thread Antonio Maiorano via cfe-commits
I've created the two reivews on phabricator:
https://reviews.llvm.org/D27438
https://reviews.llvm.org/D27440

Thanks!

On Mon, 5 Dec 2016 at 11:01 Manuel Klimek <kli...@google.com> wrote:

> On Mon, Dec 5, 2016 at 3:53 PM Antonio Maiorano <amaior...@gmail.com>
> wrote:
>
> Hi Manuel,
>
> Okay, I'll submit both patches via phabricator as you recommend. I'll add
> you, and I'll add Hans Wennborg and Zachary Turner, who were both involved
> with the first clang-format-vsix patch I worked on:
> http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20161128/178569.html
>
> Does that make sense? I'm still learning the common workflow for
> submitting patches :)
>
>
> Yep, perfect. Thanks!!
>
>
>
> - Antonio
>
>
>
> On Mon, 5 Dec 2016 at 06:24 Manuel Klimek <kli...@google.com> wrote:
>
> Awesome, thanks for working on this. If you submit the patches via
> phabricator (http://llvm.org/docs/Phabricator.html) I'll get to it faster
> :) Feel free to directly add me as reviewer, btw (add 'klimek').
>
> On Sat, Dec 3, 2016 at 6:53 AM Antonio Maiorano via cfe-commits <
> cfe-commits@lists.llvm.org> wrote:
>
> Hello,
>
> I have two patches for clang-format-vsix to offer up for review:
>
> 0001-clang-format-vsix-versioning.patch
> clang-format-vsix: add a date stamp to the VSIX version number to ensure
> upgradability
>
> Presently, the version number of the VSIX matches the LLVM version number.
> However, as this number doesn't change often, it means that as we release
> new versions of this VSIX, it will have the same version number, which
> means users must first uninstall the old version before installing the new
> one. With this change, we generate a 4th part to the version number that is
> a date stamp (year, month, day); for example: 4.0.0.161203.
>
>
> 0001-clang-format-vsix-show-stderrs.patch
> clang-format-vsix: fail when clang-format outputs to stderr
>
> When clang-format outputs to stderr but returns 0, the extension will
> format the code anyway. This happens, for instance, when there's a syntax
> error or unknown value in a .clang-format file; the result is that the
> extension silently formats using the fallback style without informing the
> user of the problem. This change treats stderr output as an error, making
> sure it gets displayed to the user, and not formatting the code. (I've also
> attached a screenshot of the message box I now get when my .clang-format
> has an invalid field named SomeInvalidField).
>
>
> ___
> cfe-commits mailing list
> cfe-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: clang-format-vsix: versioning patch and show stderrors patch

2016-12-05 Thread Antonio Maiorano via cfe-commits
Hi Manuel,

Okay, I'll submit both patches via phabricator as you recommend. I'll add
you, and I'll add Hans Wennborg and Zachary Turner, who were both involved
with the first clang-format-vsix patch I worked on:
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20161128/178569.html

Does that make sense? I'm still learning the common workflow for submitting
patches :)

- Antonio



On Mon, 5 Dec 2016 at 06:24 Manuel Klimek <kli...@google.com> wrote:

Awesome, thanks for working on this. If you submit the patches via
phabricator (http://llvm.org/docs/Phabricator.html) I'll get to it faster
:) Feel free to directly add me as reviewer, btw (add 'klimek').

On Sat, Dec 3, 2016 at 6:53 AM Antonio Maiorano via cfe-commits <
cfe-commits@lists.llvm.org> wrote:

Hello,

I have two patches for clang-format-vsix to offer up for review:

0001-clang-format-vsix-versioning.patch
clang-format-vsix: add a date stamp to the VSIX version number to ensure
upgradability

Presently, the version number of the VSIX matches the LLVM version number.
However, as this number doesn't change often, it means that as we release
new versions of this VSIX, it will have the same version number, which
means users must first uninstall the old version before installing the new
one. With this change, we generate a 4th part to the version number that is
a date stamp (year, month, day); for example: 4.0.0.161203.


0001-clang-format-vsix-show-stderrs.patch
clang-format-vsix: fail when clang-format outputs to stderr

When clang-format outputs to stderr but returns 0, the extension will
format the code anyway. This happens, for instance, when there's a syntax
error or unknown value in a .clang-format file; the result is that the
extension silently formats using the fallback style without informing the
user of the problem. This change treats stderr output as an error, making
sure it gets displayed to the user, and not formatting the code. (I've also
attached a screenshot of the message box I now get when my .clang-format
has an invalid field named SomeInvalidField).


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


clang-format-vsix: versioning patch and show stderrors patch

2016-12-02 Thread Antonio Maiorano via cfe-commits
Hello,

I have two patches for clang-format-vsix to offer up for review:

0001-clang-format-vsix-versioning.patch
clang-format-vsix: add a date stamp to the VSIX version number to ensure
upgradability

Presently, the version number of the VSIX matches the LLVM version number.
However, as this number doesn't change often, it means that as we release
new versions of this VSIX, it will have the same version number, which
means users must first uninstall the old version before installing the new
one. With this change, we generate a 4th part to the version number that is
a date stamp (year, month, day); for example: 4.0.0.161203.


0001-clang-format-vsix-show-stderrs.patch
clang-format-vsix: fail when clang-format outputs to stderr

When clang-format outputs to stderr but returns 0, the extension will
format the code anyway. This happens, for instance, when there's a syntax
error or unknown value in a .clang-format file; the result is that the
extension silently formats using the fallback style without informing the
user of the problem. This change treats stderr output as an error, making
sure it gets displayed to the user, and not formatting the code. (I've also
attached a screenshot of the message box I now get when my .clang-format
has an invalid field named SomeInvalidField).


0001-clang-format-vsix-versioning.patch
Description: Binary data


0001-clang-format-vsix-show-stderrs.patch
Description: Binary data
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: Upgrade and fix clang-format-vs

2016-12-02 Thread Antonio Maiorano via cfe-commits
;> >> >> >>>>>> the CLI
> >> >>> >> >> >>>>>> doesn't work out of the box because you must explicitly
> >> >>> >> >> >>>>>> run
> >> >>> >> >> >>>>>> 'nuget.exe
> >> >>> >> >> >>>>>> restore ClangFormat.sln' before running msbuild (or
> >> >>> >> >> >>>>>> devenv.exe
> >> >>> >> >> >>>>>> in
> >> >>> >> >> >>>>>> our case).
> >> >>> >> >> >>>>>> The problem is that nuget.exe isn't something that's
> >> >>> >> >> >>>>>> easily
> >> >>> >> >> >>>>>> found/accessible
> >> >>> >> >> >>>>>> on Windows, even once installed as an extension in VS.
> >> >>> >> >> >>>>>> This
> >> >>> >> >> >>>>>> is a
> >> >>> >> >> >>>>>> known
> >> >>> >> >> >>>>>> problem and the current best solution requires
> >> >>> >> >> >>>>>> downloading
> >> >>> >> >> >>>>>> and
> >> >>> >> >> >>>>>> making
> >> >>> >> >> >>>>>> nuget.exe available in PATH.
> >> >>> >> >> >>>>>>
> >> >>> >> >> >>>>>> So now i'm faced with figuring out how best to solve
> this
> >> >>> >> >> >>>>>> so
> >> >>> >> >> >>>>>> that
> >> >>> >> >> >>>>>> the
> >> >>> >> >> >>>>>> custom build step in this CMakeLists.txt that runs
> devenv
> >> >>> >> >> >>>>>> doesn't
> >> >>> >> >> >>>>>> fail:
> >> >>> >> >> >>>>>>
> >> >>> >> >> >>>>>> devenv "${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat.sln"
> >> >>> >> >> >>>>>> /Build
> >> >>> >> >> >>>>>> Release
> >> >>> >> >> >>>>>>
> >> >>> >> >> >>>>>> There are a few options:
> >> >>> >> >> >>>>>>
> >> >>> >> >> >>>>>> 1) Forget NuGet and just commit the referenced
> >> >>> >> >> >>>>>> assemblies.
> >> >>> >> >> >>>>>> This
> >> >>> >> >> >>>>>> is
> >> >>> >> >> >>>>>> the
> >> >>> >> >> >>>>>> simplest solution, but is more annoying to manage if we
> >> >>> >> >> >>>>>> want
> >> >>> &g

Re: Upgrade and fix clang-format-vs

2016-12-02 Thread Antonio Maiorano via cfe-commits
;>>> the CLI
> >>> >> >> >>>>>> doesn't work out of the box because you must explicitly
> run
> >>> >> >> >>>>>> 'nuget.exe
> >>> >> >> >>>>>> restore ClangFormat.sln' before running msbuild (or
> >>> >> >> >>>>>> devenv.exe
> >>> >> >> >>>>>> in
> >>> >> >> >>>>>> our case).
> >>> >> >> >>>>>> The problem is that nuget.exe isn't something that's
> easily
> >>> >> >> >>>>>> found/accessible
> >>> >> >> >>>>>> on Windows, even once installed as an extension in VS.
> This
> >>> >> >> >>>>>> is a
> >>> >> >> >>>>>> known
> >>> >> >> >>>>>> problem and the current best solution requires downloading
> >>> >> >> >>>>>> and
> >>> >> >> >>>>>> making
> >>> >> >> >>>>>> nuget.exe available in PATH.
> >>> >> >> >>>>>>
> >>> >> >> >>>>>> So now i'm faced with figuring out how best to solve this
> so
> >>> >> >> >>>>>> that
> >>> >> >> >>>>>> the
> >>> >> >> >>>>>> custom build step in this CMakeLists.txt that runs devenv
> >>> >> >> >>>>>> doesn't
> >>> >> >> >>>>>> fail:
> >>> >> >> >>>>>>
> >>> >> >> >>>>>> devenv "${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat.sln"
> /Build
> >>> >> >> >>>>>> Release
> >>> >> >> >>>>>>
> >>> >> >> >>>>>> There are a few options:
> >>> >> >> >>>>>>
> >>> >> >> >>>>>> 1) Forget NuGet and just commit the referenced assemblies.
> >>> >> >> >>>>>> This
> >>> >> >> >>>>>> is
> >>> >> >> >>>>>> the
> >>> >> >> >>>>>> simplest solution, but is more annoying to manage if we
> want
> >>> >> >> >>>>>> to
> >>> >> >> >>>>>> upgrade the
> >>> >> >> >>>>>> versions of these assemblies later.
> >>> >> >> >>>>>>
> >>> >> >> >>>>>> 2) Commit nuget.exe to the repo and just use it. This is
> >>> >> >> >>>>>> simple
> >>> >> >> >>>>>> enough, but I'm not sure how people feel about committing
> >>> >> >> >>>>>> binaries,
> >>> >> >> >>>>>> and it
> >>> >> >> >>>>>> would be frozen at whatever version we commit.
> >>> >> >> >>>>>>
> >>> >> >> >>>>>> 3) Do some form of wget to grab the latest nuget.exe from
> >>> >> >> >>>>>> "https://nuget.org/nuget.exe; in CMake and invoke it. I'm
> >>> >> >> >>>>>> not
> >>> >> >> >>>>>> yet
> >>> >> >> >>>>>> sure
> >>> >> >> >>>>>> what's the simplest way to do this. Powershell could be
> >>> >> >> >>>>>> used,
> >>> >> >> >>>>>> but
> >>> >> >> >>>>>> there are
> >>> >> >> >>>>>> security annoyances to deal with.
> >>> >> >> >>>>>>
> >>> >> >> >>>>>> That's all I can come up with so far. Would love to hear
> >>> >> >> >>>>>> from
> >>> >> >> >>>>>> you
> >>> >> >> >>>>>> guys
> >>> >> >> >>>>>> if you have any ideas or opinions on this. If you want I
> can
> >>> >> >> >>>>>> send
> >>> >> >> >>>>>> you a
> >>> >> >> >>>>>> patch of what I've got so far if that helps.
> >>> >> >> >>>>>>
> >>> >> >> >>>>>> Thanks,
> >>> >> >> >>>>>>
> >>> >> >> >>>>>> Antonio Maiorano
> >>> >> >> >>>>>>
> >>> >> >> >>>>>>
> >>> >> >> >>>>>>
> >>> >> >> >>>>>> On Thu, 15 Sep 2016 at 19:35 Antonio Maiorano
> >>> >> >> >>>>>> <amaior...@gmail.com>
> >>> >> >> >>>>>> wrote:
> >>> >> >> >>>>>>>
> >>> >> >> >>>>>>> Sorry I haven't had a chance to get back to this. Things
> >>> >> >> >>>>>>> got
> >>> >> >> >>>>>>> busy
> >>> >> >> >>>>>>> at
> >>> >> >> >>>>>>> work. I do plan to get back to this as I'm hoping to add
> >>> >> >> >>>>>>> some
> >>> >> >> >>>>>>> features to
> >>> >> >> >>>>>>> this extension :)
> >>> >> >> >>>>>>> On Thu, Sep 15, 2016 at 7:31 PM Zachary Turner
> >>> >> >> >>>>>>> <ztur...@google.com>
> >>> >> >> >>>>>>> wrote:
> >>> >> >> >>>>>>>>
> >>> >> >> >>>>>>>> Strange.  FWIW you can dump all the variables that are
> >>> >> >> >>>>>>>> present
> >>> >> >> >>>>>>>> in
> >>> >> >> >>>>>>>> your environment.  You need to go to Tools -> Options ->
> >>> >> >> >>>>>>>> Projects
> >>> >> >> >>>>>>>> and
> >>> >> >> >>>>>>>> Solutions -> Build and Run and choose either Normal,
> >>> >> >> >>>>>>>> Detailed,
> >>> >> >> >>>>>>>> or
> >>> >> >> >>>>>>>> Diagnostic
> >>> >> >> >>>>>>>> for the MSBuild project build output verbosity.  Then in
> >>> >> >> >>>>>>>> the
> >>> >> >> >>>>>>>> output window
> >>> >> >> >>>>>>>> you will get a ton of spam, some of which is the set of
> >>> >> >> >>>>>>>> all
> >>> >> >> >>>>>>>> MSBuild
> >>> >> >> >>>>>>>> variables you can take advantage of.
> >>> >> >> >>>>>>>>
> >>> >> >> >>>>>>>> On Thu, Sep 15, 2016 at 4:25 PM Hans Wennborg
> >>> >> >> >>>>>>>> <h...@chromium.org>
> >>> >> >> >>>>>>>> wrote:
> >>> >> >> >>>>>>>>>
> >>> >> >> >>>>>>>>> When I first opened the solution in VS it prompted me
> to
> >>> >> >> >>>>>>>>> install
> >>> >> >> >>>>>>>>> it
> >>> >> >> >>>>>>>>> and I did.
> >>> >> >> >>>>>>>>>
> >>> >> >> >>>>>>>>> On Thu, Sep 15, 2016 at 4:17 PM, Zachary Turner
> >>> >> >> >>>>>>>>> <ztur...@google.com> wrote:
> >>> >> >> >>>>>>>>> > You may need to install the Visual Studio SDK.  Did
> you
> >>> >> >> >>>>>>>>> > do
> >>> >> >> >>>>>>>>> > that
> >>> >> >> >>>>>>>>> > when you
> >>> >> >> >>>>>>>>> > initially installed VS 2015?
> >>> >> >> >>>>>>>>> >
> >>> >> >> >>>>>>>>> > On Thu, Sep 15, 2016 at 4:15 PM Hans Wennborg
> >>> >> >> >>>>>>>>> > <h...@chromium.org>
> >>> >> >> >>>>>>>>> > wrote:
> >>> >> >> >>>>>>>>> >>
> >>> >> >> >>>>>>>>> >> Well, on my machine $(SDKToolsDir) doesn't work :-(
> I
> >>> >> >> >>>>>>>>> >> suspect
> >>> >> >> >>>>>>>>> >> the file
> >>> >> >> >>>>>>>>> >> will need manual tweaking by whoever is trying to
> >>> >> >> >>>>>>>>> >> build
> >>> >> >> >>>>>>>>> >> the
> >>> >> >> >>>>>>>>> >> plugin.
> >>> >> >> >>>>>>>>> >>
> >>> >> >> >>>>>>>>> >> Anyway, I've updated the solution to build with
> VS2015
> >>> >> >> >>>>>>>>> >> in
> >>> >> >> >>>>>>>>> >> r281648 and
> >>> >> >> >>>>>>>>> >> confirmed that it can still be used with older VS
> >>> >> >> >>>>>>>>> >> versions
> >>> >> >> >>>>>>>>> >> too.
> >>> >> >> >>>>>>>>> >>
> >>> >> >> >>>>>>>>> >> Cheers,
> >>> >> >> >>>>>>>>> >> Hans
> >>> >> >> >>>>>>>>> >>
> >>> >> >> >>>>>>>>> >> On Thu, Aug 18, 2016 at 7:11 PM, Zachary Turner
> >>> >> >> >>>>>>>>> >> <ztur...@google.com>
> >>> >> >> >>>>>>>>> >> wrote:
> >>> >> >> >>>>>>>>> >> > The key.snk is generated when you build, the
> problem
> >>> >> >> >>>>>>>>> >> > is
> >>> >> >> >>>>>>>>> >> > the
> >>> >> >> >>>>>>>>> >> > csproj file
> >>> >> >> >>>>>>>>> >> > hardcodes the directory to the sdk instead of
> using
> >>> >> >> >>>>>>>>> >> > the
> >>> >> >> >>>>>>>>> >> > appropriate
> >>> >> >> >>>>>>>>> >> > project
> >>> >> >> >>>>>>>>> >> > system variable like $(SDKToolsDir)
> >>> >> >> >>>>>>>>> >> >
> >>> >> >> >>>>>>>>> >> > On Thu, Aug 18, 2016 at 7:09 PM Zachary Turner
> >>> >> >> >>>>>>>>> >> > <ztur...@google.com>
> >>> >> >> >>>>>>>>> >> > wrote:
> >>> >> >> >>>>>>>>> >> >>
> >>> >> >> >>>>>>>>> >> >> Llvm doesn't support vs2012 anymore, as long as
> it
> >>> >> >> >>>>>>>>> >> >> supports
> >>> >> >> >>>>>>>>> >> >> vs2013 it's
> >>> >> >> >>>>>>>>> >> >> fine
> >>> >> >> >>>>>>>>> >> >> On Thu, Aug 18, 2016 at 7:07 PM Antonio Maiorano
> >>> >> >> >>>>>>>>> >> >> <amaior...@gmail.com>
> >>> >> >> >>>>>>>>> >> >> wrote:
> >>> >> >> >>>>>>>>> >> >>>
> >>> >> >> >>>>>>>>> >> >>> Hi,
> >>> >> >> >>>>>>>>> >> >>>
> >>> >> >> >>>>>>>>> >> >>> What I meant by upgrade was simply making it
> build
> >>> >> >> >>>>>>>>> >> >>> in
> >>> >> >> >>>>>>>>> >> >>> VS
> >>> >> >> >>>>>>>>> >> >>> 2015.
> >>> >> >> >>>>>>>>> >> >>> However,
> >>> >> >> >>>>>>>>> >> >>> you bring up a valid point about making sure the
> >>> >> >> >>>>>>>>> >> >>> extension
> >>> >> >> >>>>>>>>> >> >>> will
> >>> >> >> >>>>>>>>> >> >>> continue to
> >>> >> >> >>>>>>>>> >> >>> work in VS 2012. I will look into that. Like
> those
> >>> >> >> >>>>>>>>> >> >>> references that go
> >>> >> >> >>>>>>>>> >> >>> from
> >>> >> >> >>>>>>>>> >> >>> 10 to 14 that point out; I wonder if instead I
> >>> >> >> >>>>>>>>> >> >>> should
> >>> >> >> >>>>>>>>> >> >>> be
> >>> >> >> >>>>>>>>> >> >>> able to bring
> >>> >> >> >>>>>>>>> >> >>> in
> >>> >> >> >>>>>>>>> >> >>> those version 10 assemblies via NuGet. I'll
> take a
> >>> >> >> >>>>>>>>> >> >>> closer
> >>> >> >> >>>>>>>>> >> >>> look.
> >>> >> >> >>>>>>>>> >> >>>
> >>> >> >> >>>>>>>>> >> >>> Part of my change, however, seems to imply that
> >>> >> >> >>>>>>>>> >> >>> the
> >>> >> >> >>>>>>>>> >> >>> extension (vsix)
> >>> >> >> >>>>>>>>> >> >>> project would not build correctly even in VS
> 2012.
> >>> >> >> >>>>>>>>> >> >>> For
> >>> >> >> >>>>>>>>> >> >>> instance, the
> >>> >> >> >>>>>>>>> >> >>> missing
> >>> >> >> >>>>>>>>> >> >>> Key.snk file. I don't have VS 2012 installed at
> >>> >> >> >>>>>>>>> >> >>> the
> >>> >> >> >>>>>>>>> >> >>> moment,
> >>> >> >> >>>>>>>>> >> >>> so I
> >>> >> >> >>>>>>>>> >> >>> cannot
> >>> >> >> >>>>>>>>> >> >>> validate.
> >>> >> >> >>>>>>>>> >> >>>
> >>> >> >> >>>>>>>>> >> >>> Thanks,
> >>> >> >> >>>>>>>>> >> >>>
> >>> >> >> >>>>>>>>> >> >>> Antonio
> >>> >> >> >>>>>>>>> >> >>>
> >>> >> >> >>>>>>>>> >> >>>
> >>> >> >> >>>>>>>>> >> >>>
> >>> >> >> >>>>>>>>> >> >>> On Thu, 18 Aug 2016 at 19:38 Hans Wennborg
> >>> >> >> >>>>>>>>> >> >>> <h...@chromium.org> wrote:
> >>> >> >> >>>>>>>>> >> >>>>
> >>> >> >> >>>>>>>>> >> >>>> Hi Antonio,
> >>> >> >> >>>>>>>>> >> >>>>
> >>> >> >> >>>>>>>>> >> >>>> On Wed, Aug 17, 2016 at 8:15 AM, Antonio
> Maiorano
> >>> >> >> >>>>>>>>> >> >>>> via
> >>> >> >> >>>>>>>>> >> >>>> cfe-commits
> >>> >> >> >>>>>>>>> >> >>>> <cfe-commits@lists.llvm.org> wrote:
> >>> >> >> >>>>>>>>> >> >>>> > This patch for clang-format-vs includes the
> >>> >> >> >>>>>>>>> >> >>>> > following:
> >>> >> >> >>>>>>>>> >> >>>> >
> >>> >> >> >>>>>>>>> >> >>>> > - Upgrade to VS 2015, including .NET
> framework
> >>> >> >> >>>>>>>>> >> >>>> > upgrade
> >>> >> >> >>>>>>>>> >> >>>> > from 4.0 to
> >>> >> >> >>>>>>>>> >> >>>> > 4.5, and
> >>> >> >> >>>>>>>>> >> >>>> > upgrading Microsoft.VisualStudio references
> to
> >>> >> >> >>>>>>>>> >> >>>> > v14
> >>> >> >> >>>>>>>>> >> >>>> > versions
> >>> >> >> >>>>>>>>> >> >>>> > - Fix build by removing dependency on
> "Key.snk"
> >>> >> >> >>>>>>>>> >> >>>> > file
> >>> >> >> >>>>>>>>> >> >>>> > which was
> >>> >> >> >>>>>>>>> >> >>>> > never
> >>> >> >> >>>>>>>>> >> >>>> > checked
> >>> >> >> >>>>>>>>> >> >>>> > in (and not really required anyway)
> >>> >> >> >>>>>>>>> >> >>>> > - Add ".vs" directory to svn ignore (new
> folder
> >>> >> >> >>>>>>>>> >> >>>> > that
> >>> >> >> >>>>>>>>> >> >>>> > VS
> >>> >> >> >>>>>>>>> >> >>>> > 2015
> >>> >> >> >>>>>>>>> >> >>>> > creates
> >>> >> >> >>>>>>>>> >> >>>> > for
> >>> >> >> >>>>>>>>> >> >>>> > user settings)
> >>> >> >> >>>>>>>>> >> >>>>
> >>> >> >> >>>>>>>>> >> >>>> "What does "Upgrade to VS 2015 mean? Adding
> >>> >> >> >>>>>>>>> >> >>>> support
> >>> >> >> >>>>>>>>> >> >>>> for
> >>> >> >> >>>>>>>>> >> >>>> running the
> >>> >> >> >>>>>>>>> >> >>>> plugin in VS2015, or does it mean requiring
> >>> >> >> >>>>>>>>> >> >>>> VS2015
> >>> >> >> >>>>>>>>> >> >>>> for
> >>> >> >> >>>>>>>>> >> >>>> building?
> >>> >> >> >>>>>>>>> >> >>>>
> >>> >> >> >>>>>>>>> >> >>>> +zturner: I thought the plugin already worked
> in
> >>> >> >> >>>>>>>>> >> >>>> VS
> >>> >> >> >>>>>>>>> >> >>>> 2015?
> >>> >> >> >>>>>>>>> >> >>>>
> >>> >> >> >>>>>>>>> >> >>>> I mostly just build the plugin without knowing
> >>> >> >> >>>>>>>>> >> >>>> exactly
> >>> >> >> >>>>>>>>> >> >>>> how
> >>> >> >> >>>>>>>>> >> >>>> this stuff
> >>> >> >> >>>>>>>>> >> >>>> works, but looking at the patch I'm worried
> that
> >>> >> >> >>>>>>>>> >> >>>> you're
> >>> >> >> >>>>>>>>> >> >>>> increasing
> >>> >> >> >>>>>>>>> >> >>>> the
> >>> >> >> >>>>>>>>> >> >>>> required version for building it? I see a bunch
> >>> >> >> >>>>>>>>> >> >>>> of
> >>> >> >> >>>>>>>>> >> >>>> values
> >>> >> >> >>>>>>>>> >> >>>> going from
> >>> >> >> >>>>>>>>> >> >>>> 10 (VS 2012) to 14 (VS 2015).
> >>> >> >> >>>>>>>>> >> >>>>
> >>> >> >> >>>>>>>>> >> >>>> Thanks,
> >>> >> >> >>>>>>>>> >> >>>> Hans
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: Upgrade and fix clang-format-vs

2016-12-02 Thread Antonio Maiorano via cfe-commits
e to hear from
> >> >> >>>>>> you
> >> >> >>>>>> guys
> >> >> >>>>>> if you have any ideas or opinions on this. If you want I can
> >> >> >>>>>> send
> >> >> >>>>>> you a
> >> >> >>>>>> patch of what I've got so far if that helps.
> >> >> >>>>>>
> >> >> >>>>>> Thanks,
> >> >> >>>>>>
> >> >> >>>>>> Antonio Maiorano
> >> >> >>>>>>
> >> >> >>>>>>
> >> >> >>>>>>
> >> >> >>>>>> On Thu, 15 Sep 2016 at 19:35 Antonio Maiorano
> >> >> >>>>>> <amaior...@gmail.com>
> >> >> >>>>>> wrote:
> >> >> >>>>>>>
> >> >> >>>>>>> Sorry I haven't had a chance to get back to this. Things got
> >> >> >>>>>>> busy
> >> >> >>>>>>> at
> >> >> >>>>>>> work. I do plan to get back to this as I'm hoping to add some
> >> >> >>>>>>> features to
> >> >> >>>>>>> this extension :)
> >> >> >>>>>>> On Thu, Sep 15, 2016 at 7:31 PM Zachary Turner
> >> >> >>>>>>> <ztur...@google.com>
> >> >> >>>>>>> wrote:
> >> >> >>>>>>>>
> >> >> >>>>>>>> Strange.  FWIW you can dump all the variables that are
> present
> >> >> >>>>>>>> in
> >> >> >>>>>>>> your environment.  You need to go to Tools -> Options ->
> >> >> >>>>>>>> Projects
> >> >> >>>>>>>> and
> >> >> >>>>>>>> Solutions -> Build and Run and choose either Normal,
> Detailed,
> >> >> >>>>>>>> or
> >> >> >>>>>>>> Diagnostic
> >> >> >>>>>>>> for the MSBuild project build output verbosity.  Then in the
> >> >> >>>>>>>> output window
> >> >> >>>>>>>> you will get a ton of spam, some of which is the set of all
> >> >> >>>>>>>> MSBuild
> >> >> >>>>>>>> variables you can take advantage of.
> >> >> >>>>>>>>
> >> >> >>>>>>>> On Thu, Sep 15, 2016 at 4:25 PM Hans Wennborg
> >> >> >>>>>>>> <h...@chromium.org>
> >> >> >>>>>>>> wrote:
> >> >> >>>>>>>>>
> >> >> >>>>>>>>> When I first opened the solution in VS it prompted me to
> >> >> >>>>>>>>> install
> >> >> >>>>>>>>> it
> >> >> >>>>>>>>> and I did.
> >> >> >>>>>>>>>
> >> >> >>>>>>>>> On Thu, Sep 15, 2016 at 4:17 PM, Zachary Turner
> >> >> >>>>>>>>> <ztur...@google.com> wrote:
> >> >> >>>>>>>>> > You may need to install the Visual Studio SDK.  Did you
> do
> >> >> >>>>>>>>> > that
> >> >> >>>>>>>>> > when you
> >> >> >>>>>>>>> > initially installed VS 2015?
> >> >> >>>>>>>>> >
> >> >> >>>>>>>>> > On Thu, Sep 15, 2016 at 4:15 PM Hans Wennborg
> >> >> >>>>>>>>> > <h...@chromium.org>
> >> >> >>>>>>>>> > wrote:
> >> >> >>>>>>>>> >>
> >> >> >>>>>>>>> >> Well, on my machine $(SDKToolsDir) doesn't work :-( I
> >> >> >>>>>>>>> >> suspect
> >> >> >>>>>>>>> >> the file
> >> >> >>>>>>>>> >> will need manual tweaking by whoever is trying to build
> >> >> >>>>>>>>> >> the
> >> >> >>>>>>>>> >> plugin.
> >> >> >>>>>>>>> >>
> >> >> >>>>>>>>> >> Anyway, I've updated the solution to build with VS2015
> in
> >> >> >>>>>>>>> >> r281648 and
> >> >> >>>>>>>>> >> confirmed that it can still be used with older VS
> versions
> >> >> >>>>>>>>> >> too.
> >> >> >>>>>>>>> >>
> >> >> >>>>>>>>> >> Cheers,
> >> >> >>>>>>>>> >> Hans
> >> >> >>>>>>>>> >>
> >> >> >>>>>>>>> >> On Thu, Aug 18, 2016 at 7:11 PM, Zachary Turner
> >> >> >>>>>>>>> >> <ztur...@google.com>
> >> >> >>>>>>>>> >> wrote:
> >> >> >>>>>>>>> >> > The key.snk is generated when you build, the problem
> is
> >> >> >>>>>>>>> >> > the
> >> >> >>>>>>>>> >> > csproj file
> >> >> >>>>>>>>> >> > hardcodes the directory to the sdk instead of using
> the
> >> >> >>>>>>>>> >> > appropriate
> >> >> >>>>>>>>> >> > project
> >> >> >>>>>>>>> >> > system variable like $(SDKToolsDir)
> >> >> >>>>>>>>> >> >
> >> >> >>>>>>>>> >> > On Thu, Aug 18, 2016 at 7:09 PM Zachary Turner
> >> >> >>>>>>>>> >> > <ztur...@google.com>
> >> >> >>>>>>>>> >> > wrote:
> >> >> >>>>>>>>> >> >>
> >> >> >>>>>>>>> >> >> Llvm doesn't support vs2012 anymore, as long as it
> >> >> >>>>>>>>> >> >> supports
> >> >> >>>>>>>>> >> >> vs2013 it's
> >> >> >>>>>>>>> >> >> fine
> >> >> >>>>>>>>> >> >> On Thu, Aug 18, 2016 at 7:07 PM Antonio Maiorano
> >> >> >>>>>>>>> >> >> <amaior...@gmail.com>
> >> >> >>>>>>>>> >> >> wrote:
> >> >> >>>>>>>>> >> >>>
> >> >> >>>>>>>>> >> >>> Hi,
> >> >> >>>>>>>>> >> >>>
> >> >> >>>>>>>>> >> >>> What I meant by upgrade was simply making it build
> in
> >> >> >>>>>>>>> >> >>> VS
> >> >> >>>>>>>>> >> >>> 2015.
> >> >> >>>>>>>>> >> >>> However,
> >> >> >>>>>>>>> >> >>> you bring up a valid point about making sure the
> >> >> >>>>>>>>> >> >>> extension
> >> >> >>>>>>>>> >> >>> will
> >> >> >>>>>>>>> >> >>> continue to
> >> >> >>>>>>>>> >> >>> work in VS 2012. I will look into that. Like those
> >> >> >>>>>>>>> >> >>> references that go
> >> >> >>>>>>>>> >> >>> from
> >> >> >>>>>>>>> >> >>> 10 to 14 that point out; I wonder if instead I
> should
> >> >> >>>>>>>>> >> >>> be
> >> >> >>>>>>>>> >> >>> able to bring
> >> >> >>>>>>>>> >> >>> in
> >> >> >>>>>>>>> >> >>> those version 10 assemblies via NuGet. I'll take a
> >> >> >>>>>>>>> >> >>> closer
> >> >> >>>>>>>>> >> >>> look.
> >> >> >>>>>>>>> >> >>>
> >> >> >>>>>>>>> >> >>> Part of my change, however, seems to imply that the
> >> >> >>>>>>>>> >> >>> extension (vsix)
> >> >> >>>>>>>>> >> >>> project would not build correctly even in VS 2012.
> For
> >> >> >>>>>>>>> >> >>> instance, the
> >> >> >>>>>>>>> >> >>> missing
> >> >> >>>>>>>>> >> >>> Key.snk file. I don't have VS 2012 installed at the
> >> >> >>>>>>>>> >> >>> moment,
> >> >> >>>>>>>>> >> >>> so I
> >> >> >>>>>>>>> >> >>> cannot
> >> >> >>>>>>>>> >> >>> validate.
> >> >> >>>>>>>>> >> >>>
> >> >> >>>>>>>>> >> >>> Thanks,
> >> >> >>>>>>>>> >> >>>
> >> >> >>>>>>>>> >> >>> Antonio
> >> >> >>>>>>>>> >> >>>
> >> >> >>>>>>>>> >> >>>
> >> >> >>>>>>>>> >> >>>
> >> >> >>>>>>>>> >> >>> On Thu, 18 Aug 2016 at 19:38 Hans Wennborg
> >> >> >>>>>>>>> >> >>> <h...@chromium.org> wrote:
> >> >> >>>>>>>>> >> >>>>
> >> >> >>>>>>>>> >> >>>> Hi Antonio,
> >> >> >>>>>>>>> >> >>>>
> >> >> >>>>>>>>> >> >>>> On Wed, Aug 17, 2016 at 8:15 AM, Antonio Maiorano
> via
> >> >> >>>>>>>>> >> >>>> cfe-commits
> >> >> >>>>>>>>> >> >>>> <cfe-commits@lists.llvm.org> wrote:
> >> >> >>>>>>>>> >> >>>> > This patch for clang-format-vs includes the
> >> >> >>>>>>>>> >> >>>> > following:
> >> >> >>>>>>>>> >> >>>> >
> >> >> >>>>>>>>> >> >>>> > - Upgrade to VS 2015, including .NET framework
> >> >> >>>>>>>>> >> >>>> > upgrade
> >> >> >>>>>>>>> >> >>>> > from 4.0 to
> >> >> >>>>>>>>> >> >>>> > 4.5, and
> >> >> >>>>>>>>> >> >>>> > upgrading Microsoft.VisualStudio references to
> v14
> >> >> >>>>>>>>> >> >>>> > versions
> >> >> >>>>>>>>> >> >>>> > - Fix build by removing dependency on "Key.snk"
> >> >> >>>>>>>>> >> >>>> > file
> >> >> >>>>>>>>> >> >>>> > which was
> >> >> >>>>>>>>> >> >>>> > never
> >> >> >>>>>>>>> >> >>>> > checked
> >> >> >>>>>>>>> >> >>>> > in (and not really required anyway)
> >> >> >>>>>>>>> >> >>>> > - Add ".vs" directory to svn ignore (new folder
> >> >> >>>>>>>>> >> >>>> > that
> >> >> >>>>>>>>> >> >>>> > VS
> >> >> >>>>>>>>> >> >>>> > 2015
> >> >> >>>>>>>>> >> >>>> > creates
> >> >> >>>>>>>>> >> >>>> > for
> >> >> >>>>>>>>> >> >>>> > user settings)
> >> >> >>>>>>>>> >> >>>>
> >> >> >>>>>>>>> >> >>>> "What does "Upgrade to VS 2015 mean? Adding support
> >> >> >>>>>>>>> >> >>>> for
> >> >> >>>>>>>>> >> >>>> running the
> >> >> >>>>>>>>> >> >>>> plugin in VS2015, or does it mean requiring VS2015
> >> >> >>>>>>>>> >> >>>> for
> >> >> >>>>>>>>> >> >>>> building?
> >> >> >>>>>>>>> >> >>>>
> >> >> >>>>>>>>> >> >>>> +zturner: I thought the plugin already worked in VS
> >> >> >>>>>>>>> >> >>>> 2015?
> >> >> >>>>>>>>> >> >>>>
> >> >> >>>>>>>>> >> >>>> I mostly just build the plugin without knowing
> >> >> >>>>>>>>> >> >>>> exactly
> >> >> >>>>>>>>> >> >>>> how
> >> >> >>>>>>>>> >> >>>> this stuff
> >> >> >>>>>>>>> >> >>>> works, but looking at the patch I'm worried that
> >> >> >>>>>>>>> >> >>>> you're
> >> >> >>>>>>>>> >> >>>> increasing
> >> >> >>>>>>>>> >> >>>> the
> >> >> >>>>>>>>> >> >>>> required version for building it? I see a bunch of
> >> >> >>>>>>>>> >> >>>> values
> >> >> >>>>>>>>> >> >>>> going from
> >> >> >>>>>>>>> >> >>>> 10 (VS 2012) to 14 (VS 2015).
> >> >> >>>>>>>>> >> >>>>
> >> >> >>>>>>>>> >> >>>> Thanks,
> >> >> >>>>>>>>> >> >>>> Hans
>
>


0001-Fix-VS2015-build-of-clang-format-vsix-by-using-NuGet.patch
Description: Binary data
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: Upgrade and fix clang-format-vs

2016-11-28 Thread Antonio Maiorano via cfe-commits
> >> >> >>>>>> patch of what I've got so far if that helps.
> >> >> >>>>>>
> >> >> >>>>>> Thanks,
> >> >> >>>>>>
> >> >> >>>>>> Antonio Maiorano
> >> >> >>>>>>
> >> >> >>>>>>
> >> >> >>>>>>
> >> >> >>>>>> On Thu, 15 Sep 2016 at 19:35 Antonio Maiorano
> >> >> >>>>>> <amaior...@gmail.com>
> >> >> >>>>>> wrote:
> >> >> >>>>>>>
> >> >> >>>>>>> Sorry I haven't had a chance to get back to this. Things got
> >> >> >>>>>>> busy
> >> >> >>>>>>> at
> >> >> >>>>>>> work. I do plan to get back to this as I'm hoping to add some
> >> >> >>>>>>> features to
> >> >> >>>>>>> this extension :)
> >> >> >>>>>>> On Thu, Sep 15, 2016 at 7:31 PM Zachary Turner
> >> >> >>>>>>> <ztur...@google.com>
> >> >> >>>>>>> wrote:
> >> >> >>>>>>>>
> >> >> >>>>>>>> Strange.  FWIW you can dump all the variables that are
> present
> >> >> >>>>>>>> in
> >> >> >>>>>>>> your environment.  You need to go to Tools -> Options ->
> >> >> >>>>>>>> Projects
> >> >> >>>>>>>> and
> >> >> >>>>>>>> Solutions -> Build and Run and choose either Normal,
> Detailed,
> >> >> >>>>>>>> or
> >> >> >>>>>>>> Diagnostic
> >> >> >>>>>>>> for the MSBuild project build output verbosity.  Then in the
> >> >> >>>>>>>> output window
> >> >> >>>>>>>> you will get a ton of spam, some of which is the set of all
> >> >> >>>>>>>> MSBuild
> >> >> >>>>>>>> variables you can take advantage of.
> >> >> >>>>>>>>
> >> >> >>>>>>>> On Thu, Sep 15, 2016 at 4:25 PM Hans Wennborg
> >> >> >>>>>>>> <h...@chromium.org>
> >> >> >>>>>>>> wrote:
> >> >> >>>>>>>>>
> >> >> >>>>>>>>> When I first opened the solution in VS it prompted me to
> >> >> >>>>>>>>> install
> >> >> >>>>>>>>> it
> >> >> >>>>>>>>> and I did.
> >> >> >>>>>>>>>
> >> >> >>>>>>>>> On Thu, Sep 15, 2016 at 4:17 PM, Zachary Turner
> >> >> >>>>>>>>> <ztur...@google.com> wrote:
> >> >> >>>>>>>>> > You may need to install the Visual Studio SDK.  Did you
> do
> >> >> >>>>>>>>> > that
> >> >> >>>>>>>>> > when you
> >> >> >>>>>>>>> > initially installed VS 2015?
> >> >> >>>>>>>>> >
> >> >> >>>>>>>>> > On Thu, Sep 15, 2016 at 4:15 PM Hans Wennborg
> >> >> >>>>>>>>> > <h...@chromium.org>
> >> >> >>>>>>>>> > wrote:
> >> >> >>>>>>>>> >>
> >> >> >>>>>>>>> >> Well, on my machine $(SDKToolsDir) doesn't work :-( I
> >> >> >>>>>>>>> >> suspect
> >> >> >>>>>>>>> >> the file
> >> >> >>>>>>>>> >> will need manual tweaking by whoever is trying to build
> >> >> >>>>>>>>> >> the
> >> >> >>>>>>>>> >> plugin.
> >> >> >>>>>>>>> >>
> >> >> >>>>>>>>> >> Anyway, I've updated the solution to build with VS2015
> in
> >> >> >>>>>>>>> >> r281648 and
> >> >> >>>>>>>>> >> confirmed that it can still be used with older VS
> versions
> >> >> >>>>>>>>> >> too.
> >> >> >>>>>>>>> >>
> >> >> >>>>>>>>> >> Cheers,
> >> >> >>>>>>>>> >> Hans
> >> >> >>>>>>>>> >>
> >> >> >>>>>>>>> >> On Thu, Aug 18, 2016 at 7:11 PM, Zachary Turner
> >> >> >>>>>>>>> >> <ztur...@google.com>
> >> >> >>>>>>>>> >> wrote:
> >> >> >>>>>>>>> >> > The key.snk is generated when you build, the problem
> is
> >> >> >>>>>>>>> >> > the
> >> >> >>>>>>>>> >> > csproj file
> >> >> >>>>>>>>> >> > hardcodes the directory to the sdk instead of using
> the
> >> >> >>>>>>>>> >> > appropriate
> >> >> >>>>>>>>> >> > project
> >> >> >>>>>>>>> >> > system variable like $(SDKToolsDir)
> >> >> >>>>>>>>> >> >
> >> >> >>>>>>>>> >> > On Thu, Aug 18, 2016 at 7:09 PM Zachary Turner
> >> >> >>>>>>>>> >> > <ztur...@google.com>
> >> >> >>>>>>>>> >> > wrote:
> >> >> >>>>>>>>> >> >>
> >> >> >>>>>>>>> >> >> Llvm doesn't support vs2012 anymore, as long as it
> >> >> >>>>>>>>> >> >> supports
> >> >> >>>>>>>>> >> >> vs2013 it's
> >> >> >>>>>>>>> >> >> fine
> >> >> >>>>>>>>> >> >> On Thu, Aug 18, 2016 at 7:07 PM Antonio Maiorano
> >> >> >>>>>>>>> >> >> <amaior...@gmail.com>
> >> >> >>>>>>>>> >> >> wrote:
> >> >> >>>>>>>>> >> >>>
> >> >> >>>>>>>>> >> >>> Hi,
> >> >> >>>>>>>>> >> >>>
> >> >> >>>>>>>>> >> >>> What I meant by upgrade was simply making it build
> in
> >> >> >>>>>>>>> >> >>> VS
> >> >> >>>>>>>>> >> >>> 2015.
> >> >> >>>>>>>>> >> >>> However,
> >> >> >>>>>>>>> >> >>> you bring up a valid point about making sure the
> >> >> >>>>>>>>> >> >>> extension
> >> >> >>>>>>>>> >> >>> will
> >> >> >>>>>>>>> >> >>> continue to
> >> >> >>>>>>>>> >> >>> work in VS 2012. I will look into that. Like those
> >> >> >>>>>>>>> >> >>> references that go
> >> >> >>>>>>>>> >> >>> from
> >> >> >>>>>>>>> >> >>> 10 to 14 that point out; I wonder if instead I
> should
> >> >> >>>>>>>>> >> >>> be
> >> >> >>>>>>>>> >> >>> able to bring
> >> >> >>>>>>>>> >> >>> in
> >> >> >>>>>>>>> >> >>> those version 10 assemblies via NuGet. I'll take a
> >> >> >>>>>>>>> >> >>> closer
> >> >> >>>>>>>>> >> >>> look.
> >> >> >>>>>>>>> >> >>>
> >> >> >>>>>>>>> >> >>> Part of my change, however, seems to imply that the
> >> >> >>>>>>>>> >> >>> extension (vsix)
> >> >> >>>>>>>>> >> >>> project would not build correctly even in VS 2012.
> For
> >> >> >>>>>>>>> >> >>> instance, the
> >> >> >>>>>>>>> >> >>> missing
> >> >> >>>>>>>>> >> >>> Key.snk file. I don't have VS 2012 installed at the
> >> >> >>>>>>>>> >> >>> moment,
> >> >> >>>>>>>>> >> >>> so I
> >> >> >>>>>>>>> >> >>> cannot
> >> >> >>>>>>>>> >> >>> validate.
> >> >> >>>>>>>>> >> >>>
> >> >> >>>>>>>>> >> >>> Thanks,
> >> >> >>>>>>>>> >> >>>
> >> >> >>>>>>>>> >> >>> Antonio
> >> >> >>>>>>>>> >> >>>
> >> >> >>>>>>>>> >> >>>
> >> >> >>>>>>>>> >> >>>
> >> >> >>>>>>>>> >> >>> On Thu, 18 Aug 2016 at 19:38 Hans Wennborg
> >> >> >>>>>>>>> >> >>> <h...@chromium.org> wrote:
> >> >> >>>>>>>>> >> >>>>
> >> >> >>>>>>>>> >> >>>> Hi Antonio,
> >> >> >>>>>>>>> >> >>>>
> >> >> >>>>>>>>> >> >>>> On Wed, Aug 17, 2016 at 8:15 AM, Antonio Maiorano
> via
> >> >> >>>>>>>>> >> >>>> cfe-commits
> >> >> >>>>>>>>> >> >>>> <cfe-commits@lists.llvm.org> wrote:
> >> >> >>>>>>>>> >> >>>> > This patch for clang-format-vs includes the
> >> >> >>>>>>>>> >> >>>> > following:
> >> >> >>>>>>>>> >> >>>> >
> >> >> >>>>>>>>> >> >>>> > - Upgrade to VS 2015, including .NET framework
> >> >> >>>>>>>>> >> >>>> > upgrade
> >> >> >>>>>>>>> >> >>>> > from 4.0 to
> >> >> >>>>>>>>> >> >>>> > 4.5, and
> >> >> >>>>>>>>> >> >>>> > upgrading Microsoft.VisualStudio references to
> v14
> >> >> >>>>>>>>> >> >>>> > versions
> >> >> >>>>>>>>> >> >>>> > - Fix build by removing dependency on "Key.snk"
> >> >> >>>>>>>>> >> >>>> > file
> >> >> >>>>>>>>> >> >>>> > which was
> >> >> >>>>>>>>> >> >>>> > never
> >> >> >>>>>>>>> >> >>>> > checked
> >> >> >>>>>>>>> >> >>>> > in (and not really required anyway)
> >> >> >>>>>>>>> >> >>>> > - Add ".vs" directory to svn ignore (new folder
> >> >> >>>>>>>>> >> >>>> > that
> >> >> >>>>>>>>> >> >>>> > VS
> >> >> >>>>>>>>> >> >>>> > 2015
> >> >> >>>>>>>>> >> >>>> > creates
> >> >> >>>>>>>>> >> >>>> > for
> >> >> >>>>>>>>> >> >>>> > user settings)
> >> >> >>>>>>>>> >> >>>>
> >> >> >>>>>>>>> >> >>>> "What does "Upgrade to VS 2015 mean? Adding support
> >> >> >>>>>>>>> >> >>>> for
> >> >> >>>>>>>>> >> >>>> running the
> >> >> >>>>>>>>> >> >>>> plugin in VS2015, or does it mean requiring VS2015
> >> >> >>>>>>>>> >> >>>> for
> >> >> >>>>>>>>> >> >>>> building?
> >> >> >>>>>>>>> >> >>>>
> >> >> >>>>>>>>> >> >>>> +zturner: I thought the plugin already worked in VS
> >> >> >>>>>>>>> >> >>>> 2015?
> >> >> >>>>>>>>> >> >>>>
> >> >> >>>>>>>>> >> >>>> I mostly just build the plugin without knowing
> >> >> >>>>>>>>> >> >>>> exactly
> >> >> >>>>>>>>> >> >>>> how
> >> >> >>>>>>>>> >> >>>> this stuff
> >> >> >>>>>>>>> >> >>>> works, but looking at the patch I'm worried that
> >> >> >>>>>>>>> >> >>>> you're
> >> >> >>>>>>>>> >> >>>> increasing
> >> >> >>>>>>>>> >> >>>> the
> >> >> >>>>>>>>> >> >>>> required version for building it? I see a bunch of
> >> >> >>>>>>>>> >> >>>> values
> >> >> >>>>>>>>> >> >>>> going from
> >> >> >>>>>>>>> >> >>>> 10 (VS 2012) to 14 (VS 2015).
> >> >> >>>>>>>>> >> >>>>
> >> >> >>>>>>>>> >> >>>> Thanks,
> >> >> >>>>>>>>> >> >>>> Hans
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: Upgrade and fix clang-format-vs

2016-11-28 Thread Antonio Maiorano via cfe-commits
016 at 4:17 PM, Zachary Turner
> >>>>>>>>> <ztur...@google.com> wrote:
> >>>>>>>>> > You may need to install the Visual Studio SDK.  Did you do that
> >>>>>>>>> > when you
> >>>>>>>>> > initially installed VS 2015?
> >>>>>>>>> >
> >>>>>>>>> > On Thu, Sep 15, 2016 at 4:15 PM Hans Wennborg <
> h...@chromium.org>
> >>>>>>>>> > wrote:
> >>>>>>>>> >>
> >>>>>>>>> >> Well, on my machine $(SDKToolsDir) doesn't work :-( I suspect
> >>>>>>>>> >> the file
> >>>>>>>>> >> will need manual tweaking by whoever is trying to build the
> >>>>>>>>> >> plugin.
> >>>>>>>>> >>
> >>>>>>>>> >> Anyway, I've updated the solution to build with VS2015 in
> >>>>>>>>> >> r281648 and
> >>>>>>>>> >> confirmed that it can still be used with older VS versions
> too.
> >>>>>>>>> >>
> >>>>>>>>> >> Cheers,
> >>>>>>>>> >> Hans
> >>>>>>>>> >>
> >>>>>>>>> >> On Thu, Aug 18, 2016 at 7:11 PM, Zachary Turner
> >>>>>>>>> >> <ztur...@google.com>
> >>>>>>>>> >> wrote:
> >>>>>>>>> >> > The key.snk is generated when you build, the problem is the
> >>>>>>>>> >> > csproj file
> >>>>>>>>> >> > hardcodes the directory to the sdk instead of using the
> >>>>>>>>> >> > appropriate
> >>>>>>>>> >> > project
> >>>>>>>>> >> > system variable like $(SDKToolsDir)
> >>>>>>>>> >> >
> >>>>>>>>> >> > On Thu, Aug 18, 2016 at 7:09 PM Zachary Turner
> >>>>>>>>> >> > <ztur...@google.com>
> >>>>>>>>> >> > wrote:
> >>>>>>>>> >> >>
> >>>>>>>>> >> >> Llvm doesn't support vs2012 anymore, as long as it supports
> >>>>>>>>> >> >> vs2013 it's
> >>>>>>>>> >> >> fine
> >>>>>>>>> >> >> On Thu, Aug 18, 2016 at 7:07 PM Antonio Maiorano
> >>>>>>>>> >> >> <amaior...@gmail.com>
> >>>>>>>>> >> >> wrote:
> >>>>>>>>> >> >>>
> >>>>>>>>> >> >>> Hi,
> >>>>>>>>> >> >>>
> >>>>>>>>> >> >>> What I meant by upgrade was simply making it build in VS
> >>>>>>>>> >> >>> 2015.
> >>>>>>>>> >> >>> However,
> >>>>>>>>> >> >>> you bring up a valid point about making sure the extension
> >>>>>>>>> >> >>> will
> >>>>>>>>> >> >>> continue to
> >>>>>>>>> >> >>> work in VS 2012. I will look into that. Like those
> >>>>>>>>> >> >>> references that go
> >>>>>>>>> >> >>> from
> >>>>>>>>> >> >>> 10 to 14 that point out; I wonder if instead I should be
> >>>>>>>>> >> >>> able to bring
> >>>>>>>>> >> >>> in
> >>>>>>>>> >> >>> those version 10 assemblies via NuGet. I'll take a closer
> >>>>>>>>> >> >>> look.
> >>>>>>>>> >> >>>
> >>>>>>>>> >> >>> Part of my change, however, seems to imply that the
> >>>>>>>>> >> >>> extension (vsix)
> >>>>>>>>> >> >>> project would not build correctly even in VS 2012. For
> >>>>>>>>> >> >>> instance, the
> >>>>>>>>> >> >>> missing
> >>>>>>>>> >> >>> Key.snk file. I don't have VS 2012 installed at the
> moment,
> >>>>>>>>> >> >>> so I
> >>>>>>>>> >> >>> cannot
> >>>>>>>>> >> >>> validate.
> >>>>>>>>> >> >>>
> >>>>>>>>> >> >>> Thanks,
> >>>>>>>>> >> >>>
> >>>>>>>>> >> >>> Antonio
> >>>>>>>>> >> >>>
> >>>>>>>>> >> >>>
> >>>>>>>>> >> >>>
> >>>>>>>>> >> >>> On Thu, 18 Aug 2016 at 19:38 Hans Wennborg
> >>>>>>>>> >> >>> <h...@chromium.org> wrote:
> >>>>>>>>> >> >>>>
> >>>>>>>>> >> >>>> Hi Antonio,
> >>>>>>>>> >> >>>>
> >>>>>>>>> >> >>>> On Wed, Aug 17, 2016 at 8:15 AM, Antonio Maiorano via
> >>>>>>>>> >> >>>> cfe-commits
> >>>>>>>>> >> >>>> <cfe-commits@lists.llvm.org> wrote:
> >>>>>>>>> >> >>>> > This patch for clang-format-vs includes the following:
> >>>>>>>>> >> >>>> >
> >>>>>>>>> >> >>>> > - Upgrade to VS 2015, including .NET framework upgrade
> >>>>>>>>> >> >>>> > from 4.0 to
> >>>>>>>>> >> >>>> > 4.5, and
> >>>>>>>>> >> >>>> > upgrading Microsoft.VisualStudio references to v14
> >>>>>>>>> >> >>>> > versions
> >>>>>>>>> >> >>>> > - Fix build by removing dependency on "Key.snk" file
> >>>>>>>>> >> >>>> > which was
> >>>>>>>>> >> >>>> > never
> >>>>>>>>> >> >>>> > checked
> >>>>>>>>> >> >>>> > in (and not really required anyway)
> >>>>>>>>> >> >>>> > - Add ".vs" directory to svn ignore (new folder that VS
> >>>>>>>>> >> >>>> > 2015
> >>>>>>>>> >> >>>> > creates
> >>>>>>>>> >> >>>> > for
> >>>>>>>>> >> >>>> > user settings)
> >>>>>>>>> >> >>>>
> >>>>>>>>> >> >>>> "What does "Upgrade to VS 2015 mean? Adding support for
> >>>>>>>>> >> >>>> running the
> >>>>>>>>> >> >>>> plugin in VS2015, or does it mean requiring VS2015 for
> >>>>>>>>> >> >>>> building?
> >>>>>>>>> >> >>>>
> >>>>>>>>> >> >>>> +zturner: I thought the plugin already worked in VS 2015?
> >>>>>>>>> >> >>>>
> >>>>>>>>> >> >>>> I mostly just build the plugin without knowing exactly
> how
> >>>>>>>>> >> >>>> this stuff
> >>>>>>>>> >> >>>> works, but looking at the patch I'm worried that you're
> >>>>>>>>> >> >>>> increasing
> >>>>>>>>> >> >>>> the
> >>>>>>>>> >> >>>> required version for building it? I see a bunch of values
> >>>>>>>>> >> >>>> going from
> >>>>>>>>> >> >>>> 10 (VS 2012) to 14 (VS 2015).
> >>>>>>>>> >> >>>>
> >>>>>>>>> >> >>>> Thanks,
> >>>>>>>>> >> >>>> Hans
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: Upgrade and fix clang-format-vs

2016-11-28 Thread Antonio Maiorano via cfe-commits
st solution, but is more annoying to manage if we want to
> >> >>>>>> upgrade the
> >> >>>>>> versions of these assemblies later.
> >> >>>>>>
> >> >>>>>> 2) Commit nuget.exe to the repo and just use it. This is simple
> >> >>>>>> enough, but I'm not sure how people feel about committing
> binaries,
> >> >>>>>> and it
> >> >>>>>> would be frozen at whatever version we commit.
> >> >>>>>>
> >> >>>>>> 3) Do some form of wget to grab the latest nuget.exe from
> >> >>>>>> "https://nuget.org/nuget.exe; in CMake and invoke it. I'm not
> yet
> >> >>>>>> sure
> >> >>>>>> what's the simplest way to do this. Powershell could be used, but
> >> >>>>>> there are
> >> >>>>>> security annoyances to deal with.
> >> >>>>>>
> >> >>>>>> That's all I can come up with so far. Would love to hear from you
> >> >>>>>> guys
> >> >>>>>> if you have any ideas or opinions on this. If you want I can send
> >> >>>>>> you a
> >> >>>>>> patch of what I've got so far if that helps.
> >> >>>>>>
> >> >>>>>> Thanks,
> >> >>>>>>
> >> >>>>>> Antonio Maiorano
> >> >>>>>>
> >> >>>>>>
> >> >>>>>>
> >> >>>>>> On Thu, 15 Sep 2016 at 19:35 Antonio Maiorano <
> amaior...@gmail.com>
> >> >>>>>> wrote:
> >> >>>>>>>
> >> >>>>>>> Sorry I haven't had a chance to get back to this. Things got
> busy
> >> >>>>>>> at
> >> >>>>>>> work. I do plan to get back to this as I'm hoping to add some
> >> >>>>>>> features to
> >> >>>>>>> this extension :)
> >> >>>>>>> On Thu, Sep 15, 2016 at 7:31 PM Zachary Turner
> >> >>>>>>> <ztur...@google.com>
> >> >>>>>>> wrote:
> >> >>>>>>>>
> >> >>>>>>>> Strange.  FWIW you can dump all the variables that are present
> in
> >> >>>>>>>> your environment.  You need to go to Tools -> Options ->
> Projects
> >> >>>>>>>> and
> >> >>>>>>>> Solutions -> Build and Run and choose either Normal, Detailed,
> or
> >> >>>>>>>> Diagnostic
> >> >>>>>>>> for the MSBuild project build output verbosity.  Then in the
> >> >>>>>>>> output window
> >> >>>>>>>> you will get a ton of spam, some of which is the set of all
> >> >>>>>>>> MSBuild
> >> >>>>>>>> variables you can take advantage of.
> >> >>>>>>>>
> >> >>>>>>>> On Thu, Sep 15, 2016 at 4:25 PM Hans Wennborg <
> h...@chromium.org>
> >> >>>>>>>> wrote:
> >> >>>>>>>>>
> >> >>>>>>>>> When I first opened the solution in VS it prompted me to
> install
> >> >>>>>>>>> it
> >> >>>>>>>>> and I did.
> >> >>>>>>>>>
> >> >>>>>>>>> On Thu, Sep 15, 2016 at 4:17 PM, Zachary Turner
> >> >>>>>>>>> <ztur...@google.com> wrote:
> >> >>>>>>>>> > You may need to install the Visual Studio SDK.  Did you do
> >> >>>>>>>>> > that
> >> >>>>>>>>> > when you
> >> >>>>>>>>> > initially installed VS 2015?
> >> >>>>>>>>> >
> >> >>>>>>>>> > On Thu, Sep 15, 2016 at 4:15 PM Hans Wennborg
> >> >>>>>>>>> > <h...@chromium.org>
> >> >>>>>>>>> > wrote:
> >> >>>>>>>>> >>
> >> 

Re: Upgrade and fix clang-format-vs

2016-11-28 Thread Antonio Maiorano via cfe-commits
ccessible on Windows, even once installed as an
> extension in VS. This is a known problem
> <https://nuget.codeplex.com/workitem/3615> and the current best solution
> requires downloading and making nuget.exe available in PATH
> <http://stackoverflow.com/a/23935892/4039972>.
>
> So now i'm faced with figuring out how best to solve this so that the
> custom build step in this CMakeLists.txt
> <https://github.com/llvm-mirror/clang/blob/master/tools/clang-format-vs/CMakeLists.txt>
>  that
> runs devenv doesn't fail:
>
> devenv "${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat.sln" /Build Release
>
> There are a few options:
>
> 1) Forget NuGet and just commit the referenced assemblies. This is the
> simplest solution, but is more annoying to manage if we want to upgrade the
> versions of these assemblies later.
>
> 2) Commit nuget.exe to the repo and just use it. This is simple enough,
> but I'm not sure how people feel about committing binaries, and it would be
> frozen at whatever version we commit.
>
> 3) Do some form of wget to grab the latest nuget.exe from "
> https://nuget.org/nuget.exe; in CMake and invoke it. I'm not yet sure
> what's the simplest way to do this. Powershell could be used, but there are
> security annoyances to deal with.
>
> That's all I can come up with so far. Would love to hear from you guys if
> you have any ideas or opinions on this. If you want I can send you a patch
> of what I've got so far if that helps.
>
> Thanks,
>
> Antonio Maiorano
>
>
>
> On Thu, 15 Sep 2016 at 19:35 Antonio Maiorano <amaior...@gmail.com> wrote:
>
> Sorry I haven't had a chance to get back to this. Things got busy at work.
> I do plan to get back to this as I'm hoping to add some features to this
> extension :)
> On Thu, Sep 15, 2016 at 7:31 PM Zachary Turner <ztur...@google.com> wrote:
>
> Strange.  FWIW you can dump all the variables that are present in your
> environment.  You need to go to Tools -> Options -> Projects and Solutions
> -> Build and Run and choose either Normal, Detailed, or Diagnostic for the
> MSBuild project build output verbosity.  Then in the output window you will
> get a ton of spam, some of which is the set of all MSBuild variables you
> can take advantage of.
>
> On Thu, Sep 15, 2016 at 4:25 PM Hans Wennborg <h...@chromium.org> wrote:
>
> When I first opened the solution in VS it prompted me to install it and I
> did.
>
> On Thu, Sep 15, 2016 at 4:17 PM, Zachary Turner <ztur...@google.com>
> wrote:
> > You may need to install the Visual Studio SDK.  Did you do that when you
> > initially installed VS 2015?
> >
> > On Thu, Sep 15, 2016 at 4:15 PM Hans Wennborg <h...@chromium.org> wrote:
> >>
> >> Well, on my machine $(SDKToolsDir) doesn't work :-( I suspect the file
> >> will need manual tweaking by whoever is trying to build the plugin.
> >>
> >> Anyway, I've updated the solution to build with VS2015 in r281648 and
> >> confirmed that it can still be used with older VS versions too.
> >>
> >> Cheers,
> >> Hans
> >>
> >> On Thu, Aug 18, 2016 at 7:11 PM, Zachary Turner <ztur...@google.com>
> >> wrote:
> >> > The key.snk is generated when you build, the problem is the csproj
> file
> >> > hardcodes the directory to the sdk instead of using the appropriate
> >> > project
> >> > system variable like $(SDKToolsDir)
> >> >
> >> > On Thu, Aug 18, 2016 at 7:09 PM Zachary Turner <ztur...@google.com>
> >> > wrote:
> >> >>
> >> >> Llvm doesn't support vs2012 anymore, as long as it supports vs2013
> it's
> >> >> fine
> >> >> On Thu, Aug 18, 2016 at 7:07 PM Antonio Maiorano <
> amaior...@gmail.com>
> >> >> wrote:
> >> >>>
> >> >>> Hi,
> >> >>>
> >> >>> What I meant by upgrade was simply making it build in VS 2015.
> >> >>> However,
> >> >>> you bring up a valid point about making sure the extension will
> >> >>> continue to
> >> >>> work in VS 2012. I will look into that. Like those references that
> go
> >> >>> from
> >> >>> 10 to 14 that point out; I wonder if instead I should be able to
> bring
> >> >>> in
> >> >>> those version 10 assemblies via NuGet. I'll take a closer look.
> >> >>>
> >> >>> Part of my change, however, seems to imply that the extension (vsix)
> >> >>>

Re: Upgrade and fix clang-format-vs

2016-11-28 Thread Antonio Maiorano via cfe-commits
test nuget.exe from "
> https://nuget.org/nuget.exe; in CMake and invoke it. I'm not yet sure
> what's the simplest way to do this. Powershell could be used, but there are
> security annoyances to deal with.
>
> That's all I can come up with so far. Would love to hear from you guys if
> you have any ideas or opinions on this. If you want I can send you a patch
> of what I've got so far if that helps.
>
> Thanks,
>
> Antonio Maiorano
>
>
>
> On Thu, 15 Sep 2016 at 19:35 Antonio Maiorano <amaior...@gmail.com> wrote:
>
> Sorry I haven't had a chance to get back to this. Things got busy at work.
> I do plan to get back to this as I'm hoping to add some features to this
> extension :)
> On Thu, Sep 15, 2016 at 7:31 PM Zachary Turner <ztur...@google.com> wrote:
>
> Strange.  FWIW you can dump all the variables that are present in your
> environment.  You need to go to Tools -> Options -> Projects and Solutions
> -> Build and Run and choose either Normal, Detailed, or Diagnostic for the
> MSBuild project build output verbosity.  Then in the output window you will
> get a ton of spam, some of which is the set of all MSBuild variables you
> can take advantage of.
>
> On Thu, Sep 15, 2016 at 4:25 PM Hans Wennborg <h...@chromium.org> wrote:
>
> When I first opened the solution in VS it prompted me to install it and I
> did.
>
> On Thu, Sep 15, 2016 at 4:17 PM, Zachary Turner <ztur...@google.com>
> wrote:
> > You may need to install the Visual Studio SDK.  Did you do that when you
> > initially installed VS 2015?
> >
> > On Thu, Sep 15, 2016 at 4:15 PM Hans Wennborg <h...@chromium.org> wrote:
> >>
> >> Well, on my machine $(SDKToolsDir) doesn't work :-( I suspect the file
> >> will need manual tweaking by whoever is trying to build the plugin.
> >>
> >> Anyway, I've updated the solution to build with VS2015 in r281648 and
> >> confirmed that it can still be used with older VS versions too.
> >>
> >> Cheers,
> >> Hans
> >>
> >> On Thu, Aug 18, 2016 at 7:11 PM, Zachary Turner <ztur...@google.com>
> >> wrote:
> >> > The key.snk is generated when you build, the problem is the csproj
> file
> >> > hardcodes the directory to the sdk instead of using the appropriate
> >> > project
> >> > system variable like $(SDKToolsDir)
> >> >
> >> > On Thu, Aug 18, 2016 at 7:09 PM Zachary Turner <ztur...@google.com>
> >> > wrote:
> >> >>
> >> >> Llvm doesn't support vs2012 anymore, as long as it supports vs2013
> it's
> >> >> fine
> >> >> On Thu, Aug 18, 2016 at 7:07 PM Antonio Maiorano <
> amaior...@gmail.com>
> >> >> wrote:
> >> >>>
> >> >>> Hi,
> >> >>>
> >> >>> What I meant by upgrade was simply making it build in VS 2015.
> >> >>> However,
> >> >>> you bring up a valid point about making sure the extension will
> >> >>> continue to
> >> >>> work in VS 2012. I will look into that. Like those references that
> go
> >> >>> from
> >> >>> 10 to 14 that point out; I wonder if instead I should be able to
> bring
> >> >>> in
> >> >>> those version 10 assemblies via NuGet. I'll take a closer look.
> >> >>>
> >> >>> Part of my change, however, seems to imply that the extension (vsix)
> >> >>> project would not build correctly even in VS 2012. For instance, the
> >> >>> missing
> >> >>> Key.snk file. I don't have VS 2012 installed at the moment, so I
> >> >>> cannot
> >> >>> validate.
> >> >>>
> >> >>> Thanks,
> >> >>>
> >> >>> Antonio
> >> >>>
> >> >>>
> >> >>>
> >> >>> On Thu, 18 Aug 2016 at 19:38 Hans Wennborg <h...@chromium.org>
> wrote:
> >> >>>>
> >> >>>> Hi Antonio,
> >> >>>>
> >> >>>> On Wed, Aug 17, 2016 at 8:15 AM, Antonio Maiorano via cfe-commits
> >> >>>> <cfe-commits@lists.llvm.org> wrote:
> >> >>>> > This patch for clang-format-vs includes the following:
> >> >>>> >
> >> >>>> > - Upgrade to VS 2015, including .NET framework upgrade from 4.0
> to
> >> >>>> > 4.5, and
> >> >>>> > upgrading Microsoft.VisualStudio references to v14 versions
> >> >>>> > - Fix build by removing dependency on "Key.snk" file which was
> >> >>>> > never
> >> >>>> > checked
> >> >>>> > in (and not really required anyway)
> >> >>>> > - Add ".vs" directory to svn ignore (new folder that VS 2015
> >> >>>> > creates
> >> >>>> > for
> >> >>>> > user settings)
> >> >>>>
> >> >>>> "What does "Upgrade to VS 2015 mean? Adding support for running the
> >> >>>> plugin in VS2015, or does it mean requiring VS2015 for building?
> >> >>>>
> >> >>>> +zturner: I thought the plugin already worked in VS 2015?
> >> >>>>
> >> >>>> I mostly just build the plugin without knowing exactly how this
> stuff
> >> >>>> works, but looking at the patch I'm worried that you're increasing
> >> >>>> the
> >> >>>> required version for building it? I see a bunch of values going
> from
> >> >>>> 10 (VS 2012) to 14 (VS 2015).
> >> >>>>
> >> >>>> Thanks,
> >> >>>> Hans
>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: Upgrade and fix clang-format-vs

2016-11-28 Thread Antonio Maiorano via cfe-commits
;> you bring up a valid point about making sure the extension will
>> >>> continue to
>> >>> work in VS 2012. I will look into that. Like those references that go
>> >>> from
>> >>> 10 to 14 that point out; I wonder if instead I should be able to
bring
>> >>> in
>> >>> those version 10 assemblies via NuGet. I'll take a closer look.
>> >>>
>> >>> Part of my change, however, seems to imply that the extension (vsix)
>> >>> project would not build correctly even in VS 2012. For instance, the
>> >>> missing
>> >>> Key.snk file. I don't have VS 2012 installed at the moment, so I
>> >>> cannot
>> >>> validate.
>> >>>
>> >>> Thanks,
>> >>>
>> >>> Antonio
>> >>>
>> >>>
>> >>>
>> >>> On Thu, 18 Aug 2016 at 19:38 Hans Wennborg <h...@chromium.org> wrote:
>> >>>>
>> >>>> Hi Antonio,
>> >>>>
>> >>>> On Wed, Aug 17, 2016 at 8:15 AM, Antonio Maiorano via cfe-commits
>> >>>> <cfe-commits@lists.llvm.org> wrote:
>> >>>> > This patch for clang-format-vs includes the following:
>> >>>> >
>> >>>> > - Upgrade to VS 2015, including .NET framework upgrade from 4.0 to
>> >>>> > 4.5, and
>> >>>> > upgrading Microsoft.VisualStudio references to v14 versions
>> >>>> > - Fix build by removing dependency on "Key.snk" file which was
>> >>>> > never
>> >>>> > checked
>> >>>> > in (and not really required anyway)
>> >>>> > - Add ".vs" directory to svn ignore (new folder that VS 2015
>> >>>> > creates
>> >>>> > for
>> >>>> > user settings)
>> >>>>
>> >>>> "What does "Upgrade to VS 2015 mean? Adding support for running the
>> >>>> plugin in VS2015, or does it mean requiring VS2015 for building?
>> >>>>
>> >>>> +zturner: I thought the plugin already worked in VS 2015?
>> >>>>
>> >>>> I mostly just build the plugin without knowing exactly how this
stuff
>> >>>> works, but looking at the patch I'm worried that you're increasing
>> >>>> the
>> >>>> required version for building it? I see a bunch of values going from
>> >>>> 10 (VS 2012) to 14 (VS 2015).
>> >>>>
>> >>>> Thanks,
>> >>>> Hans
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: Upgrade and fix clang-format-vs

2016-11-28 Thread Antonio Maiorano via cfe-commits
8 and
> >> confirmed that it can still be used with older VS versions too.
> >>
> >> Cheers,
> >> Hans
> >>
> >> On Thu, Aug 18, 2016 at 7:11 PM, Zachary Turner <ztur...@google.com>
> >> wrote:
> >> > The key.snk is generated when you build, the problem is the csproj
> file
> >> > hardcodes the directory to the sdk instead of using the appropriate
> >> > project
> >> > system variable like $(SDKToolsDir)
> >> >
> >> > On Thu, Aug 18, 2016 at 7:09 PM Zachary Turner <ztur...@google.com>
> >> > wrote:
> >> >>
> >> >> Llvm doesn't support vs2012 anymore, as long as it supports vs2013
> it's
> >> >> fine
> >> >> On Thu, Aug 18, 2016 at 7:07 PM Antonio Maiorano <
> amaior...@gmail.com>
> >> >> wrote:
> >> >>>
> >> >>> Hi,
> >> >>>
> >> >>> What I meant by upgrade was simply making it build in VS 2015.
> >> >>> However,
> >> >>> you bring up a valid point about making sure the extension will
> >> >>> continue to
> >> >>> work in VS 2012. I will look into that. Like those references that
> go
> >> >>> from
> >> >>> 10 to 14 that point out; I wonder if instead I should be able to
> bring
> >> >>> in
> >> >>> those version 10 assemblies via NuGet. I'll take a closer look.
> >> >>>
> >> >>> Part of my change, however, seems to imply that the extension (vsix)
> >> >>> project would not build correctly even in VS 2012. For instance, the
> >> >>> missing
> >> >>> Key.snk file. I don't have VS 2012 installed at the moment, so I
> >> >>> cannot
> >> >>> validate.
> >> >>>
> >> >>> Thanks,
> >> >>>
> >> >>> Antonio
> >> >>>
> >> >>>
> >> >>>
> >> >>> On Thu, 18 Aug 2016 at 19:38 Hans Wennborg <h...@chromium.org>
> wrote:
> >> >>>>
> >> >>>> Hi Antonio,
> >> >>>>
> >> >>>> On Wed, Aug 17, 2016 at 8:15 AM, Antonio Maiorano via cfe-commits
> >> >>>> <cfe-commits@lists.llvm.org> wrote:
> >> >>>> > This patch for clang-format-vs includes the following:
> >> >>>> >
> >> >>>> > - Upgrade to VS 2015, including .NET framework upgrade from 4.0
> to
> >> >>>> > 4.5, and
> >> >>>> > upgrading Microsoft.VisualStudio references to v14 versions
> >> >>>> > - Fix build by removing dependency on "Key.snk" file which was
> >> >>>> > never
> >> >>>> > checked
> >> >>>> > in (and not really required anyway)
> >> >>>> > - Add ".vs" directory to svn ignore (new folder that VS 2015
> >> >>>> > creates
> >> >>>> > for
> >> >>>> > user settings)
> >> >>>>
> >> >>>> "What does "Upgrade to VS 2015 mean? Adding support for running the
> >> >>>> plugin in VS2015, or does it mean requiring VS2015 for building?
> >> >>>>
> >> >>>> +zturner: I thought the plugin already worked in VS 2015?
> >> >>>>
> >> >>>> I mostly just build the plugin without knowing exactly how this
> stuff
> >> >>>> works, but looking at the patch I'm worried that you're increasing
> >> >>>> the
> >> >>>> required version for building it? I see a bunch of values going
> from
> >> >>>> 10 (VS 2012) to 14 (VS 2015).
> >> >>>>
> >> >>>> Thanks,
> >> >>>> Hans
>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: Upgrade and fix clang-format-vs

2016-11-28 Thread Antonio Maiorano via cfe-commits
ened the solution in VS it prompted me to install it and I
> did.
>
> On Thu, Sep 15, 2016 at 4:17 PM, Zachary Turner <ztur...@google.com>
> wrote:
> > You may need to install the Visual Studio SDK.  Did you do that when you
> > initially installed VS 2015?
> >
> > On Thu, Sep 15, 2016 at 4:15 PM Hans Wennborg <h...@chromium.org> wrote:
> >>
> >> Well, on my machine $(SDKToolsDir) doesn't work :-( I suspect the file
> >> will need manual tweaking by whoever is trying to build the plugin.
> >>
> >> Anyway, I've updated the solution to build with VS2015 in r281648 and
> >> confirmed that it can still be used with older VS versions too.
> >>
> >> Cheers,
> >> Hans
> >>
> >> On Thu, Aug 18, 2016 at 7:11 PM, Zachary Turner <ztur...@google.com>
> >> wrote:
> >> > The key.snk is generated when you build, the problem is the csproj
> file
> >> > hardcodes the directory to the sdk instead of using the appropriate
> >> > project
> >> > system variable like $(SDKToolsDir)
> >> >
> >> > On Thu, Aug 18, 2016 at 7:09 PM Zachary Turner <ztur...@google.com>
> >> > wrote:
> >> >>
> >> >> Llvm doesn't support vs2012 anymore, as long as it supports vs2013
> it's
> >> >> fine
> >> >> On Thu, Aug 18, 2016 at 7:07 PM Antonio Maiorano <
> amaior...@gmail.com>
> >> >> wrote:
> >> >>>
> >> >>> Hi,
> >> >>>
> >> >>> What I meant by upgrade was simply making it build in VS 2015.
> >> >>> However,
> >> >>> you bring up a valid point about making sure the extension will
> >> >>> continue to
> >> >>> work in VS 2012. I will look into that. Like those references that
> go
> >> >>> from
> >> >>> 10 to 14 that point out; I wonder if instead I should be able to
> bring
> >> >>> in
> >> >>> those version 10 assemblies via NuGet. I'll take a closer look.
> >> >>>
> >> >>> Part of my change, however, seems to imply that the extension (vsix)
> >> >>> project would not build correctly even in VS 2012. For instance, the
> >> >>> missing
> >> >>> Key.snk file. I don't have VS 2012 installed at the moment, so I
> >> >>> cannot
> >> >>> validate.
> >> >>>
> >> >>> Thanks,
> >> >>>
> >> >>> Antonio
> >> >>>
> >> >>>
> >> >>>
> >> >>> On Thu, 18 Aug 2016 at 19:38 Hans Wennborg <h...@chromium.org>
> wrote:
> >> >>>>
> >> >>>> Hi Antonio,
> >> >>>>
> >> >>>> On Wed, Aug 17, 2016 at 8:15 AM, Antonio Maiorano via cfe-commits
> >> >>>> <cfe-commits@lists.llvm.org> wrote:
> >> >>>> > This patch for clang-format-vs includes the following:
> >> >>>> >
> >> >>>> > - Upgrade to VS 2015, including .NET framework upgrade from 4.0
> to
> >> >>>> > 4.5, and
> >> >>>> > upgrading Microsoft.VisualStudio references to v14 versions
> >> >>>> > - Fix build by removing dependency on "Key.snk" file which was
> >> >>>> > never
> >> >>>> > checked
> >> >>>> > in (and not really required anyway)
> >> >>>> > - Add ".vs" directory to svn ignore (new folder that VS 2015
> >> >>>> > creates
> >> >>>> > for
> >> >>>> > user settings)
> >> >>>>
> >> >>>> "What does "Upgrade to VS 2015 mean? Adding support for running the
> >> >>>> plugin in VS2015, or does it mean requiring VS2015 for building?
> >> >>>>
> >> >>>> +zturner: I thought the plugin already worked in VS 2015?
> >> >>>>
> >> >>>> I mostly just build the plugin without knowing exactly how this
> stuff
> >> >>>> works, but looking at the patch I'm worried that you're increasing
> >> >>>> the
> >> >>>> required version for building it? I see a bunch of values going
> from
> >> >>>> 10 (VS 2012) to 14 (VS 2015).
> >> >>>>
> >> >>>> Thanks,
> >> >>>> Hans
>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: Upgrade and fix clang-format-vs

2016-09-15 Thread Antonio Maiorano via cfe-commits
Sorry I haven't had a chance to get back to this. Things got busy at work.
I do plan to get back to this as I'm hoping to add some features to this
extension :)
On Thu, Sep 15, 2016 at 7:31 PM Zachary Turner <ztur...@google.com> wrote:

> Strange.  FWIW you can dump all the variables that are present in your
> environment.  You need to go to Tools -> Options -> Projects and Solutions
> -> Build and Run and choose either Normal, Detailed, or Diagnostic for the
> MSBuild project build output verbosity.  Then in the output window you will
> get a ton of spam, some of which is the set of all MSBuild variables you
> can take advantage of.
>
> On Thu, Sep 15, 2016 at 4:25 PM Hans Wennborg <h...@chromium.org> wrote:
>
>> When I first opened the solution in VS it prompted me to install it and I
>> did.
>>
>> On Thu, Sep 15, 2016 at 4:17 PM, Zachary Turner <ztur...@google.com>
>> wrote:
>> > You may need to install the Visual Studio SDK.  Did you do that when you
>> > initially installed VS 2015?
>> >
>> > On Thu, Sep 15, 2016 at 4:15 PM Hans Wennborg <h...@chromium.org>
>> wrote:
>> >>
>> >> Well, on my machine $(SDKToolsDir) doesn't work :-( I suspect the file
>> >> will need manual tweaking by whoever is trying to build the plugin.
>> >>
>> >> Anyway, I've updated the solution to build with VS2015 in r281648 and
>> >> confirmed that it can still be used with older VS versions too.
>> >>
>> >> Cheers,
>> >> Hans
>> >>
>> >> On Thu, Aug 18, 2016 at 7:11 PM, Zachary Turner <ztur...@google.com>
>> >> wrote:
>> >> > The key.snk is generated when you build, the problem is the csproj
>> file
>> >> > hardcodes the directory to the sdk instead of using the appropriate
>> >> > project
>> >> > system variable like $(SDKToolsDir)
>> >> >
>> >> > On Thu, Aug 18, 2016 at 7:09 PM Zachary Turner <ztur...@google.com>
>> >> > wrote:
>> >> >>
>> >> >> Llvm doesn't support vs2012 anymore, as long as it supports vs2013
>> it's
>> >> >> fine
>> >> >> On Thu, Aug 18, 2016 at 7:07 PM Antonio Maiorano <
>> amaior...@gmail.com>
>> >> >> wrote:
>> >> >>>
>> >> >>> Hi,
>> >> >>>
>> >> >>> What I meant by upgrade was simply making it build in VS 2015.
>> >> >>> However,
>> >> >>> you bring up a valid point about making sure the extension will
>> >> >>> continue to
>> >> >>> work in VS 2012. I will look into that. Like those references that
>> go
>> >> >>> from
>> >> >>> 10 to 14 that point out; I wonder if instead I should be able to
>> bring
>> >> >>> in
>> >> >>> those version 10 assemblies via NuGet. I'll take a closer look.
>> >> >>>
>> >> >>> Part of my change, however, seems to imply that the extension
>> (vsix)
>> >> >>> project would not build correctly even in VS 2012. For instance,
>> the
>> >> >>> missing
>> >> >>> Key.snk file. I don't have VS 2012 installed at the moment, so I
>> >> >>> cannot
>> >> >>> validate.
>> >> >>>
>> >> >>> Thanks,
>> >> >>>
>> >> >>> Antonio
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> On Thu, 18 Aug 2016 at 19:38 Hans Wennborg <h...@chromium.org>
>> wrote:
>> >> >>>>
>> >> >>>> Hi Antonio,
>> >> >>>>
>> >> >>>> On Wed, Aug 17, 2016 at 8:15 AM, Antonio Maiorano via cfe-commits
>> >> >>>> <cfe-commits@lists.llvm.org> wrote:
>> >> >>>> > This patch for clang-format-vs includes the following:
>> >> >>>> >
>> >> >>>> > - Upgrade to VS 2015, including .NET framework upgrade from 4.0
>> to
>> >> >>>> > 4.5, and
>> >> >>>> > upgrading Microsoft.VisualStudio references to v14 versions
>> >> >>>> > - Fix build by removing dependency on "Key.snk" file which was
>> >> >>>> > never
>> >> >>>> > checked
>> >> >>>> > in (and not really required anyway)
>> >> >>>> > - Add ".vs" directory to svn ignore (new folder that VS 2015
>> >> >>>> > creates
>> >> >>>> > for
>> >> >>>> > user settings)
>> >> >>>>
>> >> >>>> "What does "Upgrade to VS 2015 mean? Adding support for running
>> the
>> >> >>>> plugin in VS2015, or does it mean requiring VS2015 for building?
>> >> >>>>
>> >> >>>> +zturner: I thought the plugin already worked in VS 2015?
>> >> >>>>
>> >> >>>> I mostly just build the plugin without knowing exactly how this
>> stuff
>> >> >>>> works, but looking at the patch I'm worried that you're increasing
>> >> >>>> the
>> >> >>>> required version for building it? I see a bunch of values going
>> from
>> >> >>>> 10 (VS 2012) to 14 (VS 2015).
>> >> >>>>
>> >> >>>> Thanks,
>> >> >>>> Hans
>>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: Upgrade and fix clang-format-vs

2016-08-19 Thread Antonio Maiorano via cfe-commits
Hi,

What I meant by upgrade was simply making it build in VS 2015. However, you
bring up a valid point about making sure the extension will continue to
work in VS 2012. I will look into that. Like those references that go from
10 to 14 that point out; I wonder if instead I should be able to bring in
those version 10 assemblies via NuGet. I'll take a closer look.

Part of my change, however, seems to imply that the extension (vsix)
project would not build correctly even in VS 2012. For instance, the
missing Key.snk file. I don't have VS 2012 installed at the moment, so I
cannot validate.

Thanks,

Antonio



On Thu, 18 Aug 2016 at 19:38 Hans Wennborg <h...@chromium.org> wrote:

> Hi Antonio,
>
> On Wed, Aug 17, 2016 at 8:15 AM, Antonio Maiorano via cfe-commits
> <cfe-commits@lists.llvm.org> wrote:
> > This patch for clang-format-vs includes the following:
> >
> > - Upgrade to VS 2015, including .NET framework upgrade from 4.0 to 4.5,
> and
> > upgrading Microsoft.VisualStudio references to v14 versions
> > - Fix build by removing dependency on "Key.snk" file which was never
> checked
> > in (and not really required anyway)
> > - Add ".vs" directory to svn ignore (new folder that VS 2015 creates for
> > user settings)
>
> "What does "Upgrade to VS 2015 mean? Adding support for running the
> plugin in VS2015, or does it mean requiring VS2015 for building?
>
> +zturner: I thought the plugin already worked in VS 2015?
>
> I mostly just build the plugin without knowing exactly how this stuff
> works, but looking at the patch I'm worried that you're increasing the
> required version for building it? I see a bunch of values going from
> 10 (VS 2012) to 14 (VS 2015).
>
> Thanks,
> Hans
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Upgrade and fix clang-format-vs

2016-08-17 Thread Antonio Maiorano via cfe-commits
Hello,

This patch for clang-format-vs includes the following:

- Upgrade to VS 2015, including .NET framework upgrade from 4.0 to 4.5, and
upgrading Microsoft.VisualStudio references to v14 versions
- Fix build by removing dependency on "Key.snk" file which was never
checked in (and not really required anyway)
- Add ".vs" directory to svn ignore (new folder that VS 2015 creates for
user settings)

Antonio Maiorano


clang-format-vs-to-vs2015.patch
Description: Binary data
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits