r299597 - [Driver] Print a newline when invoking `-print-resource-dir`

2017-04-05 Thread Meador Inge via cfe-commits
Author: meadori
Date: Wed Apr  5 17:27:20 2017
New Revision: 299597

URL: http://llvm.org/viewvc/llvm-project?rev=299597=rev
Log:
[Driver] Print a newline when invoking `-print-resource-dir`

The commit yesterday (r299473) to add the `-print-resource-dir`
option was supposed to emit a newline after the resource dir.

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

Modified:
cfe/trunk/lib/Driver/Driver.cpp

Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=299597=299596=299597=diff
==
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Wed Apr  5 17:27:20 2017
@@ -1170,7 +1170,7 @@ bool Driver::HandleImmediateArgs(const C
 TC.printVerboseInfo(llvm::errs());
 
   if (C.getArgs().hasArg(options::OPT_print_resource_dir)) {
-llvm::outs() << ResourceDir;
+llvm::outs() << ResourceDir << '\n';
 return false;
   }
 


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


r299473 - [Driver] Add option to print the resource directory

2017-04-04 Thread Meador Inge via cfe-commits
Author: meadori
Date: Tue Apr  4 16:46:50 2017
New Revision: 299473

URL: http://llvm.org/viewvc/llvm-project?rev=299473=rev
Log:
[Driver] Add option to print the resource directory

This patch adds the option -print-resource-dir. It simply
prints the resource directory. This information will eventually
be used in compiler-rt to setup COMPILER_RT_LIBRARY_INSTALL_DIR.

Patch by Catherine Moore!

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

Modified:
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/test/Driver/immediate-options.c

Modified: cfe/trunk/include/clang/Driver/Options.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=299473=299472=299473=diff
==
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Tue Apr  4 16:46:50 2017
@@ -2091,6 +2091,8 @@ def print_multi_os_directory : Flag<["-"
   Flags<[Unsupported]>;
 def print_prog_name_EQ : Joined<["-", "--"], "print-prog-name=">,
   HelpText<"Print the full program path of ">, MetaVarName<"">;
+def print_resource_dir : Flag<["-", "--"], "print-resource-dir">,
+  HelpText<"Print the resource directory pathname">;
 def print_search_dirs : Flag<["-", "--"], "print-search-dirs">,
   HelpText<"Print the paths used for finding libraries and programs">;
 def private__bundle : Flag<["-"], "private_bundle">;

Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=299473=299472=299473=diff
==
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Tue Apr  4 16:46:50 2017
@@ -1169,6 +1169,11 @@ bool Driver::HandleImmediateArgs(const C
   if (C.getArgs().hasArg(options::OPT_v))
 TC.printVerboseInfo(llvm::errs());
 
+  if (C.getArgs().hasArg(options::OPT_print_resource_dir)) {
+llvm::outs() << ResourceDir;
+return false;
+  }
+
   if (C.getArgs().hasArg(options::OPT_print_search_dirs)) {
 llvm::outs() << "programs: =";
 bool separator = false;

Modified: cfe/trunk/test/Driver/immediate-options.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/immediate-options.c?rev=299473=299472=299473=diff
==
--- cfe/trunk/test/Driver/immediate-options.c (original)
+++ cfe/trunk/test/Driver/immediate-options.c Tue Apr  4 16:46:50 2017
@@ -12,3 +12,8 @@
 // RUN: %clang -print-search-dirs | FileCheck %s 
-check-prefix=PRINT-SEARCH-DIRS
 // PRINT-SEARCH-DIRS: programs: ={{.*}}
 // PRINT-SEARCH-DIRS: libraries: ={{.*}}
+
+// Test if the -print-resource-dir option is accepted without error.
+// Allow unspecified output because the value of CLANG_RESOURCE_DIR is unknown.
+// RUN: %clang -print-resource-dir | FileCheck %s 
-check-prefix=PRINT-RESOURCE-DIR
+// PRINT-RESOURCE-DIR: {{.+}}


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


Re: [PATCH] D20192: [Sema] Fix bug to do with lookup of template friend function in namespace

2016-05-16 Thread Meador Inge via cfe-commits
meadori added a comment.

Hmmm, it works on trunk r269671.  Not sure what happened before.


http://reviews.llvm.org/D20192



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


Re: [PATCH] D20192: [Sema] Fix bug to do with lookup of template friend function in namespace

2016-05-16 Thread Meador Inge via cfe-commits
meadori added a subscriber: meadori.
meadori added a comment.

I see failure when running the Clang test suite with this patch:

  Command Output (stderr):
  --
  error: 'error' diagnostics expected but not seen: 
File 
/Users/meadori/Code/src/llvm/llvm-mainline/tools/clang/test/SemaTemplate/friend-template.cpp
 Line 80: template non-type parameter has a different type 'long' in template 
redeclaration
File 
/Users/meadori/Code/src/llvm/llvm-mainline/tools/clang/test/SemaTemplate/friend-template.cpp
 Line 304: different type 'char' in template redeclaration
  error: 'error' diagnostics seen but not expected: 
File 
/Users/meadori/Code/src/llvm/llvm-mainline/tools/clang/test/SemaTemplate/friend-template.cpp
 Line 79: template non-type parameter has a different type 'long' in template 
redeclaration
File 
/Users/meadori/Code/src/llvm/llvm-mainline/tools/clang/test/SemaTemplate/friend-template.cpp
 Line 303: template non-type parameter has a different type 'char' in template 
redeclaration
  error: 'note' diagnostics expected but not seen: 
File 
/Users/meadori/Code/src/llvm/llvm-mainline/tools/clang/test/SemaTemplate/friend-template.cpp
 Line 73: previous non-type template parameter with type 'int' is here
File 
/Users/meadori/Code/src/llvm/llvm-mainline/tools/clang/test/SemaTemplate/friend-template.cpp
 Line 300: previous non-type template parameter with type 'int' is here
  error: 'note' diagnostics seen but not expected: 
File 
/Users/meadori/Code/src/llvm/llvm-mainline/tools/clang/test/SemaTemplate/friend-template.cpp
 Line 72: previous non-type template parameter with type 'int' is here
File 
/Users/meadori/Code/src/llvm/llvm-mainline/tools/clang/test/SemaTemplate/friend-template.cpp
 Line 299: previous non-type template parameter with type 'int' is here
  8 errors generated.


http://reviews.llvm.org/D20192



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


Re: [PATCH] D18793: fix for 19986, extra spacing around c++14 lambda capture with initializer

2016-04-05 Thread Meador Inge via cfe-commits
meadori added a subscriber: meadori.
meadori added a comment.

This needs a test case.


http://reviews.llvm.org/D18793



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