[PATCH] D38186: Add the new -Wnull-pointer-arithmetic warnings to the release notes

2017-09-28 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru accepted this revision.
sylvestre.ledru added a comment.
This revision is now accepted and ready to land.

Thanks, it makes sense!
Landed in r314387


https://reviews.llvm.org/D38186



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


[PATCH] D38678: [Sema] Warn about unused variables if we can constant evaluate the initializer.

2017-10-15 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

For the record, this found 5 actual useless variables in Firefox code.


Repository:
  rL LLVM

https://reviews.llvm.org/D38678



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


[PATCH] D34329: [clang-diff] Initial implementation.

2018-08-26 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.
Herald added subscribers: llvm-commits, kadircet, mgrang.

@arphaman @johannes Is that normal that clang-diff isn't installed by cmake? 
(like clang-format?)


Repository:
  rL LLVM

https://reviews.llvm.org/D34329



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


[PATCH] D43630: [Driver] Fix search paths on x32

2018-09-08 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@jrtc27 are you going to take care of the tests? Thanks


Repository:
  rC Clang

https://reviews.llvm.org/D43630



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


[PATCH] D42593: GCC compatibility: Ignore -fstack-clash-protection

2018-02-12 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru accepted this revision.
sylvestre.ledru added a comment.
This revision is now accepted and ready to land.

Looks good, thanks.


Repository:
  rC Clang

https://reviews.llvm.org/D42593



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


[PATCH] D30863: [clang-format] make docs/tools/{dump_format_style.py, dump_ast_matchers.py} flake8 compliant

2017-06-21 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@klimek ping?


https://reviews.llvm.org/D30863



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


[PATCH] D38124: Hide some symbols to avoid a crash on shutdown when using code coverage

2017-12-21 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

I added two more reviewers as we would like to get that in trunk before 6.0 
branches.


https://reviews.llvm.org/D38124



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


[PATCH] D41538: [analyzer] Fix some checker's output plist not containing the checker name #2

2018-01-06 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

It missed the 6.0 branching. Will you try to get it on this branch?
Thanks


Repository:
  rC Clang

https://reviews.llvm.org/D41538



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


[PATCH] D41808: Rename clang link from clang-X.Y to clang-X

2018-01-07 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.
sylvestre.ledru added a reviewer: tstellar.
Herald added a subscriber: mgorny.

As we are only doing X.0.Z releases (not using the minor version), there is no 
need to keep -X.Y in the version.
So, instead, I propose the following:
Instead of having clang-7.0 in bin/, we will have clang-7

Since also matches was gcc is doing.


https://reviews.llvm.org/D41808

Files:
  CMakeLists.txt


Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -418,10 +418,10 @@
 
 # Clang version information
 set(CLANG_EXECUTABLE_VERSION
- "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING
+ "${CLANG_VERSION_MAJOR}" CACHE STRING
 "Version number that will be placed into the clang executable, in the form 
XX.YY")
 set(LIBCLANG_LIBRARY_VERSION
- "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING
+ "${CLANG_VERSION_MAJOR}" CACHE STRING
 "Version number that will be placed into the libclang library , in the 
form XX.YY")
 mark_as_advanced(CLANG_EXECUTABLE_VERSION LIBCLANG_LIBRARY_VERSION)
 


Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -418,10 +418,10 @@
 
 # Clang version information
 set(CLANG_EXECUTABLE_VERSION
- "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING
+ "${CLANG_VERSION_MAJOR}" CACHE STRING
 "Version number that will be placed into the clang executable, in the form XX.YY")
 set(LIBCLANG_LIBRARY_VERSION
- "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING
+ "${CLANG_VERSION_MAJOR}" CACHE STRING
 "Version number that will be placed into the libclang library , in the form XX.YY")
 mark_as_advanced(CLANG_EXECUTABLE_VERSION LIBCLANG_LIBRARY_VERSION)
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D42624: [clang-tidy] Add a utility Matcher to match the next statement within a statement sequence

2018-03-08 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@aaron.ballman Hello, Do you think it is ready to land? Thanks


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D42624



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


[PATCH] D30863: [clang-format] make docs/tools/{dump_format_style.py, dump_ast_matchers.py} flake8 compliant

2018-03-17 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru abandoned this revision.
sylvestre.ledru added a comment.

Looks like it doesn't interest anyone to use coding style on it.


https://reviews.llvm.org/D30863



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


[PATCH] D41808: Rename clang link from clang-X.Y to clang-X

2018-03-20 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 139100.
sylvestre.ledru marked an inline comment as done.
sylvestre.ledru added a reviewer: dim.

https://reviews.llvm.org/D41808

Files:
  CMakeLists.txt


Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -424,11 +424,11 @@
 
 # Clang version information
 set(CLANG_EXECUTABLE_VERSION
- "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING
-"Version number that will be placed into the clang executable, in the form 
XX.YY")
+"${CLANG_VERSION_MAJOR}" CACHE STRING
+"Major version number that will be appended to the clang executable name")
 set(LIBCLANG_LIBRARY_VERSION
- "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING
-"Version number that will be placed into the libclang library , in the 
form XX.YY")
+"${CLANG_VERSION_MAJOR}" CACHE STRING
+"Major version number that will be appended to the libclang library")
 mark_as_advanced(CLANG_EXECUTABLE_VERSION LIBCLANG_LIBRARY_VERSION)
 
 option(CLANG_INCLUDE_TESTS


Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -424,11 +424,11 @@
 
 # Clang version information
 set(CLANG_EXECUTABLE_VERSION
- "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING
-"Version number that will be placed into the clang executable, in the form XX.YY")
+"${CLANG_VERSION_MAJOR}" CACHE STRING
+"Major version number that will be appended to the clang executable name")
 set(LIBCLANG_LIBRARY_VERSION
- "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING
-"Version number that will be placed into the libclang library , in the form XX.YY")
+"${CLANG_VERSION_MAJOR}" CACHE STRING
+"Major version number that will be appended to the libclang library")
 mark_as_advanced(CLANG_EXECUTABLE_VERSION LIBCLANG_LIBRARY_VERSION)
 
 option(CLANG_INCLUDE_TESTS
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D12921: clang-format: Support 'template<>' (no space).

2018-06-08 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

This was merged here: https://reviews.llvm.org/D23317
we can close this review


https://reviews.llvm.org/D12921



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


[PATCH] D52173: Python bindings TypeError in reparse method

2018-10-09 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.
Herald added a subscriber: arphaman.

I am sorry but I am not the right reviewer for that. Sorry!


Repository:
  rC Clang

https://reviews.llvm.org/D52173



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


[PATCH] D53410: Add missing PATH_MAX for GNU Hurd support

2018-10-18 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.
sylvestre.ledru added a reviewer: rnk.
Herald added a subscriber: krytarowski.

If you have a better place to put them, don't hesitate to let me know :)

Patch by Svante Signell & myself


Repository:
  rC Clang

https://reviews.llvm.org/D53410

Files:
  lib/Basic/FileManager.cpp
  lib/Frontend/ModuleDependencyCollector.cpp


Index: lib/Frontend/ModuleDependencyCollector.cpp
===
--- lib/Frontend/ModuleDependencyCollector.cpp
+++ lib/Frontend/ModuleDependencyCollector.cpp
@@ -99,6 +99,11 @@
 
 }
 
+// For GNU Hurd
+#if defined(__GNU__) && !defined(PATH_MAX)
+# define PATH_MAX 4096
+#endif
+
 // TODO: move this to Support/Path.h and check for HAVE_REALPATH?
 static bool real_path(StringRef SrcPath, SmallVectorImpl &RealPath) {
 #ifdef LLVM_ON_UNIX
Index: lib/Basic/FileManager.cpp
===
--- lib/Basic/FileManager.cpp
+++ lib/Basic/FileManager.cpp
@@ -511,6 +511,12 @@
   UniqueRealFiles.erase(Entry->getUniqueID());
 }
 
+// For GNU Hurd
+#if defined(__GNU__) && !defined(PATH_MAX)
+# define PATH_MAX 4096
+#endif
+
+
 void FileManager::GetUniqueIDMapping(
SmallVectorImpl &UIDToFiles) const {
   UIDToFiles.clear();


Index: lib/Frontend/ModuleDependencyCollector.cpp
===
--- lib/Frontend/ModuleDependencyCollector.cpp
+++ lib/Frontend/ModuleDependencyCollector.cpp
@@ -99,6 +99,11 @@
 
 }
 
+// For GNU Hurd
+#if defined(__GNU__) && !defined(PATH_MAX)
+# define PATH_MAX 4096
+#endif
+
 // TODO: move this to Support/Path.h and check for HAVE_REALPATH?
 static bool real_path(StringRef SrcPath, SmallVectorImpl &RealPath) {
 #ifdef LLVM_ON_UNIX
Index: lib/Basic/FileManager.cpp
===
--- lib/Basic/FileManager.cpp
+++ lib/Basic/FileManager.cpp
@@ -511,6 +511,12 @@
   UniqueRealFiles.erase(Entry->getUniqueID());
 }
 
+// For GNU Hurd
+#if defined(__GNU__) && !defined(PATH_MAX)
+# define PATH_MAX 4096
+#endif
+
+
 void FileManager::GetUniqueIDMapping(
SmallVectorImpl &UIDToFiles) const {
   UIDToFiles.clear();
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D53520: Update the example of BS_Stroustrup to match what is done by clang-format

2018-10-22 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.
sylvestre.ledru added a reviewer: krasimir.

reported here https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911561

clang-format-7 -style="{BreakBeforeBraces: Stroustrup}" wasn't doing
the same as the doc


Repository:
  rC Clang

https://reviews.llvm.org/D53520

Files:
  docs/ClangFormatStyleOptions.rst
  include/clang/Format/Format.h


Index: include/clang/Format/Format.h
===
--- include/clang/Format/Format.h
+++ include/clang/Format/Format.h
@@ -528,25 +528,21 @@
 ///   enum X : int { A, B };
 /// \endcode
 BS_Mozilla,
-/// Like ``Attach``, but break before function definitions, ``catch``, and
-/// ``else``.
+/// Always break before braces.
 /// \code
 ///   try {
 /// foo();
-///   } catch () {
+///   }
+///   catch () {
 ///   }
 ///   void foo() { bar(); }
-///   class foo
-///   {
+///   class foo {
 ///   };
 ///   if (foo()) {
-///   } else {
 ///   }
-///   enum X : int
-///   {
-/// A,
-/// B
-///   };
+///   else {
+///   }
+///   enum X : int { A, B };
 /// \endcode
 BS_Stroustrup,
 /// Always break before braces.
Index: docs/ClangFormatStyleOptions.rst
===
--- docs/ClangFormatStyleOptions.rst
+++ docs/ClangFormatStyleOptions.rst
@@ -901,27 +901,23 @@
   enum X : int { A, B };
 
   * ``BS_Stroustrup`` (in configuration: ``Stroustrup``)
-Like ``Attach``, but break before function definitions, ``catch``, and
-``else``.
+Always break before braces.
 
 .. code-block:: c++
 
   try {
 foo();
-  } catch () {
+  }
+  catch () {
   }
   void foo() { bar(); }
-  class foo
-  {
+  class foo {
   };
   if (foo()) {
-  } else {
   }
-  enum X : int
-  {
-A,
-B
-  };
+  else {
+  }
+  enum X : int { A, B };
 
   * ``BS_Allman`` (in configuration: ``Allman``)
 Always break before braces.


Index: include/clang/Format/Format.h
===
--- include/clang/Format/Format.h
+++ include/clang/Format/Format.h
@@ -528,25 +528,21 @@
 ///   enum X : int { A, B };
 /// \endcode
 BS_Mozilla,
-/// Like ``Attach``, but break before function definitions, ``catch``, and
-/// ``else``.
+/// Always break before braces.
 /// \code
 ///   try {
 /// foo();
-///   } catch () {
+///   }
+///   catch () {
 ///   }
 ///   void foo() { bar(); }
-///   class foo
-///   {
+///   class foo {
 ///   };
 ///   if (foo()) {
-///   } else {
 ///   }
-///   enum X : int
-///   {
-/// A,
-/// B
-///   };
+///   else {
+///   }
+///   enum X : int { A, B };
 /// \endcode
 BS_Stroustrup,
 /// Always break before braces.
Index: docs/ClangFormatStyleOptions.rst
===
--- docs/ClangFormatStyleOptions.rst
+++ docs/ClangFormatStyleOptions.rst
@@ -901,27 +901,23 @@
   enum X : int { A, B };
 
   * ``BS_Stroustrup`` (in configuration: ``Stroustrup``)
-Like ``Attach``, but break before function definitions, ``catch``, and
-``else``.
+Always break before braces.
 
 .. code-block:: c++
 
   try {
 foo();
-  } catch () {
+  }
+  catch () {
   }
   void foo() { bar(); }
-  class foo
-  {
+  class foo {
   };
   if (foo()) {
-  } else {
   }
-  enum X : int
-  {
-A,
-B
-  };
+  else {
+  }
+  enum X : int { A, B };
 
   * ``BS_Allman`` (in configuration: ``Allman``)
 Always break before braces.
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D53520: Update the example of BS_Stroustrup to match what is done by clang-format

2018-10-23 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 170723.
sylvestre.ledru added a comment.

Remove the desc update


Repository:
  rC Clang

https://reviews.llvm.org/D53520

Files:
  docs/ClangFormatStyleOptions.rst
  include/clang/Format/Format.h


Index: include/clang/Format/Format.h
===
--- include/clang/Format/Format.h
+++ include/clang/Format/Format.h
@@ -533,20 +533,17 @@
 /// \code
 ///   try {
 /// foo();
-///   } catch () {
+///   }
+///   catch () {
 ///   }
 ///   void foo() { bar(); }
-///   class foo
-///   {
+///   class foo {
 ///   };
 ///   if (foo()) {
-///   } else {
 ///   }
-///   enum X : int
-///   {
-/// A,
-/// B
-///   };
+///   else {
+///   }
+///   enum X : int { A, B };
 /// \endcode
 BS_Stroustrup,
 /// Always break before braces.
Index: docs/ClangFormatStyleOptions.rst
===
--- docs/ClangFormatStyleOptions.rst
+++ docs/ClangFormatStyleOptions.rst
@@ -908,20 +908,17 @@
 
   try {
 foo();
-  } catch () {
+  }
+  catch () {
   }
   void foo() { bar(); }
-  class foo
-  {
+  class foo {
   };
   if (foo()) {
-  } else {
   }
-  enum X : int
-  {
-A,
-B
-  };
+  else {
+  }
+  enum X : int { A, B };
 
   * ``BS_Allman`` (in configuration: ``Allman``)
 Always break before braces.


Index: include/clang/Format/Format.h
===
--- include/clang/Format/Format.h
+++ include/clang/Format/Format.h
@@ -533,20 +533,17 @@
 /// \code
 ///   try {
 /// foo();
-///   } catch () {
+///   }
+///   catch () {
 ///   }
 ///   void foo() { bar(); }
-///   class foo
-///   {
+///   class foo {
 ///   };
 ///   if (foo()) {
-///   } else {
 ///   }
-///   enum X : int
-///   {
-/// A,
-/// B
-///   };
+///   else {
+///   }
+///   enum X : int { A, B };
 /// \endcode
 BS_Stroustrup,
 /// Always break before braces.
Index: docs/ClangFormatStyleOptions.rst
===
--- docs/ClangFormatStyleOptions.rst
+++ docs/ClangFormatStyleOptions.rst
@@ -908,20 +908,17 @@
 
   try {
 foo();
-  } catch () {
+  }
+  catch () {
   }
   void foo() { bar(); }
-  class foo
-  {
+  class foo {
   };
   if (foo()) {
-  } else {
   }
-  enum X : int
-  {
-A,
-B
-  };
+  else {
+  }
+  enum X : int { A, B };
 
   * ``BS_Allman`` (in configuration: ``Allman``)
 Always break before braces.
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D53807: Create a diagnostic group for warn_call_to_pure_virtual_member_function_from_ctor_dtor, so it can be turned into an error using Werror

2018-10-29 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

Please add some tests


Repository:
  rC Clang

https://reviews.llvm.org/D53807



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


[PATCH] D56803: clang -dumpversion returns 4.2.1 for legacy reason, update it

2019-01-16 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.
sylvestre.ledru added a reviewer: ddunbar.

It has been introduced in 2011 for gcc compat:
https://github.com/llvm-mirror/clang/commit/95a907fc0f2f717dca38a379c1d2353bfea06d4f
it is probably time to remove it to remove the confusion.


Repository:
  rC Clang

https://reviews.llvm.org/D56803

Files:
  lib/Driver/Driver.cpp
  test/Driver/immediate-options.c


Index: test/Driver/immediate-options.c
===
--- test/Driver/immediate-options.c
+++ test/Driver/immediate-options.c
@@ -7,7 +7,7 @@
 // HELP-HIDDEN: driver-mode
 
 // RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
-// DUMPVERSION: 4.2.1
+// DUMPVERSION: {{[0-9]+\.[0-9]+.*}}
 
 // RUN: %clang -print-search-dirs | FileCheck %s 
-check-prefix=PRINT-SEARCH-DIRS
 // PRINT-SEARCH-DIRS: programs: ={{.*}}
Index: lib/Driver/Driver.cpp
===
--- lib/Driver/Driver.cpp
+++ lib/Driver/Driver.cpp
@@ -1625,11 +1625,7 @@
   if (C.getArgs().hasArg(options::OPT_dumpversion)) {
 // Since -dumpversion is only implemented for pedantic GCC compatibility, 
we
 // return an answer which matches our definition of __VERSION__.
-//
-// If we want to return a more correct answer some day, then we should
-// introduce a non-pedantically GCC compatible mode to Clang in which we
-// provide sensible definitions for -dumpversion, __VERSION__, etc.
-llvm::outs() << "4.2.1\n";
+llvm::outs() << CLANG_VERSION_STRING << "\n";
 return false;
   }
 


Index: test/Driver/immediate-options.c
===
--- test/Driver/immediate-options.c
+++ test/Driver/immediate-options.c
@@ -7,7 +7,7 @@
 // HELP-HIDDEN: driver-mode
 
 // RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
-// DUMPVERSION: 4.2.1
+// DUMPVERSION: {{[0-9]+\.[0-9]+.*}}
 
 // RUN: %clang -print-search-dirs | FileCheck %s -check-prefix=PRINT-SEARCH-DIRS
 // PRINT-SEARCH-DIRS: programs: ={{.*}}
Index: lib/Driver/Driver.cpp
===
--- lib/Driver/Driver.cpp
+++ lib/Driver/Driver.cpp
@@ -1625,11 +1625,7 @@
   if (C.getArgs().hasArg(options::OPT_dumpversion)) {
 // Since -dumpversion is only implemented for pedantic GCC compatibility, we
 // return an answer which matches our definition of __VERSION__.
-//
-// If we want to return a more correct answer some day, then we should
-// introduce a non-pedantically GCC compatible mode to Clang in which we
-// provide sensible definitions for -dumpversion, __VERSION__, etc.
-llvm::outs() << "4.2.1\n";
+llvm::outs() << CLANG_VERSION_STRING << "\n";
 return false;
   }
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D56946: [Documentation] Use HTTPS whenever possible in Clang

2019-01-21 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

Did you test all url?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56946/new/

https://reviews.llvm.org/D56946



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


[PATCH] D56803: clang -dumpversion returns 4.2.1 for legacy reason, update it

2019-01-23 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@ddunbar is that ok with you? Thanks
See
https://bugs.llvm.org/show_bug.cgi?id=38836
https://bugs.launchpad.net/ubuntu/+source/llvm-defaults/+bug/1810860


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56803/new/

https://reviews.llvm.org/D56803



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


[PATCH] D33440: clang-format: better handle statement macros

2019-01-28 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@Typz
I think this should be part of the release notes for v8. 
This is changing the output on some code base and this is a new feature.

By the way, an example in the doc would be great (including with the 
configuration)

merci!


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D33440/new/

https://reviews.llvm.org/D33440



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


[PATCH] D56803: clang -dumpversion returns 4.2.1 for legacy reason, update it

2019-01-28 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

ping?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56803/new/

https://reviews.llvm.org/D56803



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


[PATCH] D34329: [clang-diff] Initial implementation.

2018-11-01 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@johannes Someone asked for that in Debian: 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907269


Repository:
  rL LLVM

https://reviews.llvm.org/D34329



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


[PATCH] D52034: [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov

2018-11-07 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

Can be done in a new commit but I think this should be mentioned in the clang 
release notes.


Repository:
  rC Clang

https://reviews.llvm.org/D52034



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


[PATCH] D56803: clang -dumpversion returns 4.2.1 for legacy reason, update it

2019-03-13 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.
Herald added a subscriber: jdoerfert.
Herald added a project: clang.

@ddunbar ping?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56803/new/

https://reviews.llvm.org/D56803



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


[PATCH] D59702: Unbreak the build of compiler-rt on Linux/mips64el

2019-03-22 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.
sylvestre.ledru added a reviewer: atanasyan.
Herald added subscribers: llvm-commits, Sanitizers, jdoerfert, delcypher, 
arichardson, dberris, kubamracek, sdardis.
Herald added projects: LLVM, Sanitizers.
sylvestre.ledru added a comment.

Not sure what I am doing but it fixes the issue


Fails with:

/<>/llvm-toolchain-8-8~+rc5/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:343:72:
 error: size of array 'assertion_failed__73' is negative

  typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
 ^

/<>/llvm-toolchain-8-8~+rc5/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:337:30:
 note: in expansion of macro 'IMPL_COMPILER_ASSERT'

  #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
  ^~~~

/<>/llvm-toolchain-8-8~+rc5/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc:73:1:
 note: in expansion of macro 'COMPILER_CHECK'

  COMPILER_CHECK(struct_kernel_stat_sz == sizeof(struct stat));


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D59702

Files:
  lib/sanitizer_common/sanitizer_platform_limits_linux.cc
  lib/sanitizer_common/sanitizer_platform_limits_posix.h


Index: lib/sanitizer_common/sanitizer_platform_limits_posix.h
===
--- lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -81,7 +81,7 @@
 #elif defined(__mips__)
   const unsigned struct_kernel_stat_sz =
  SANITIZER_ANDROID ? FIRST_32_SECOND_64(104, 128) :
- FIRST_32_SECOND_64(160, 216);
+ FIRST_32_SECOND_64(144, 104);
   const unsigned struct_kernel_stat64_sz = 104;
 #elif defined(__s390__) && !defined(__s390x__)
   const unsigned struct_kernel_stat_sz = 64;
Index: lib/sanitizer_common/sanitizer_platform_limits_linux.cc
===
--- lib/sanitizer_common/sanitizer_platform_limits_linux.cc
+++ lib/sanitizer_common/sanitizer_platform_limits_linux.cc
@@ -28,7 +28,7 @@
 // are not defined anywhere in userspace headers. Fake them. This seems to work
 // fine with newer headers, too.
 #include 
-#if defined(__x86_64__) ||  defined(__mips__)
+#if defined(__x86_64__)
 #include 
 #else
 #define ino_t __kernel_ino_t


Index: lib/sanitizer_common/sanitizer_platform_limits_posix.h
===
--- lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -81,7 +81,7 @@
 #elif defined(__mips__)
   const unsigned struct_kernel_stat_sz =
  SANITIZER_ANDROID ? FIRST_32_SECOND_64(104, 128) :
- FIRST_32_SECOND_64(160, 216);
+ FIRST_32_SECOND_64(144, 104);
   const unsigned struct_kernel_stat64_sz = 104;
 #elif defined(__s390__) && !defined(__s390x__)
   const unsigned struct_kernel_stat_sz = 64;
Index: lib/sanitizer_common/sanitizer_platform_limits_linux.cc
===
--- lib/sanitizer_common/sanitizer_platform_limits_linux.cc
+++ lib/sanitizer_common/sanitizer_platform_limits_linux.cc
@@ -28,7 +28,7 @@
 // are not defined anywhere in userspace headers. Fake them. This seems to work
 // fine with newer headers, too.
 #include 
-#if defined(__x86_64__) ||  defined(__mips__)
+#if defined(__x86_64__)
 #include 
 #else
 #define ino_t __kernel_ino_t
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D59702: Unbreak the build of compiler-rt on Linux/mips64el

2019-03-22 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

Not sure what I am doing but it fixes the issue


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59702/new/

https://reviews.llvm.org/D59702



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


[PATCH] D58186: Sync some doc changes ClangFormatStyleOptions.rst with doc comments in `Format.h`

2019-03-23 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 191999.
sylvestre.ledru edited the summary of this revision.
sylvestre.ledru added a comment.
Herald added a subscriber: jdoerfert.

Svn version


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58186/new/

https://reviews.llvm.org/D58186

Files:
  clang/
  clang/include/
  clang/include/clang/
  clang/include/clang/Format/
  clang/include/clang/Tooling/
  clang/include/clang/Tooling/Inclusions/
  include/clang/Format/Format.h
  include/clang/Tooling/Inclusions/IncludeStyle.h
  lib/Driver/Driver.cpp


Index: lib/Driver/Driver.cpp
===
--- lib/Driver/Driver.cpp
+++ lib/Driver/Driver.cpp
@@ -1640,11 +1640,7 @@
   if (C.getArgs().hasArg(options::OPT_dumpversion)) {
 // Since -dumpversion is only implemented for pedantic GCC compatibility, 
we
 // return an answer which matches our definition of __VERSION__.
-//
-// If we want to return a more correct answer some day, then we should
-// introduce a non-pedantically GCC compatible mode to Clang in which we
-// provide sensible definitions for -dumpversion, __VERSION__, etc.
-llvm::outs() << "4.2.1\n";
+llvm::outs() << CLANG_VERSION_STRING << "\n";
 return false;
   }
 
Index: include/clang/Tooling/Inclusions/IncludeStyle.h
===
--- include/clang/Tooling/Inclusions/IncludeStyle.h
+++ include/clang/Tooling/Inclusions/IncludeStyle.h
@@ -67,7 +67,7 @@
   /// used for ordering ``#includes``.
   ///
   /// `POSIX extended
-  /// 
`_
+  /// 
`_
   /// regular expressions are supported.
   ///
   /// These regular expressions are matched against the filename of an include
@@ -79,7 +79,7 @@
   /// If none of the regular expressions match, INT_MAX is assigned as
   /// category. The main header for a source file automatically gets category 
0.
   /// so that it is generally kept at the beginning of the ``#includes``
-  /// (http://llvm.org/docs/CodingStandards.html#include-style). However, you
+  /// (https://llvm.org/docs/CodingStandards.html#include-style). However, you
   /// can also assign negative priorities if you have certain headers that
   /// always need to be first.
   ///
Index: include/clang/Format/Format.h
===
--- include/clang/Format/Format.h
+++ include/clang/Format/Format.h
@@ -1201,7 +1201,7 @@
 
   /// A vector of prefixes ordered by the desired groups for Java imports.
   ///
-  /// Each group is seperated by a newline. Static imports will also follow the
+  /// Each group is separated by a newline. Static imports will also follow the
   /// same grouping convention above all non-static imports. One group's prefix
   /// can be a subset of another - the longest prefix is always matched. Within
   /// a group, the imports are ordered lexicographically.


Index: lib/Driver/Driver.cpp
===
--- lib/Driver/Driver.cpp
+++ lib/Driver/Driver.cpp
@@ -1640,11 +1640,7 @@
   if (C.getArgs().hasArg(options::OPT_dumpversion)) {
 // Since -dumpversion is only implemented for pedantic GCC compatibility, we
 // return an answer which matches our definition of __VERSION__.
-//
-// If we want to return a more correct answer some day, then we should
-// introduce a non-pedantically GCC compatible mode to Clang in which we
-// provide sensible definitions for -dumpversion, __VERSION__, etc.
-llvm::outs() << "4.2.1\n";
+llvm::outs() << CLANG_VERSION_STRING << "\n";
 return false;
   }
 
Index: include/clang/Tooling/Inclusions/IncludeStyle.h
===
--- include/clang/Tooling/Inclusions/IncludeStyle.h
+++ include/clang/Tooling/Inclusions/IncludeStyle.h
@@ -67,7 +67,7 @@
   /// used for ordering ``#includes``.
   ///
   /// `POSIX extended
-  /// `_
+  /// `_
   /// regular expressions are supported.
   ///
   /// These regular expressions are matched against the filename of an include
@@ -79,7 +79,7 @@
   /// If none of the regular expressions match, INT_MAX is assigned as
   /// category. The main header for a source file automatically gets category 0.
   /// so that it is generally kept at the beginning of the ``#includes``
-  /// (http://llvm.org/docs/CodingStandards.html#include-style). However, you
+  /// (https://llvm.org/docs/CodingStandards.html#include-style). However, you
   /// can also assign negative priorities if you have certain headers that
   /// always need to be first.
   ///
Index: include/clang/Format/Format.h
==

[PATCH] D58186: Sync some doc changes ClangFormatStyleOptions.rst with doc comments in `Format.h`

2019-03-23 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 192001.
sylvestre.ledru added a comment.

Remove unrelated changes


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58186/new/

https://reviews.llvm.org/D58186

Files:
  include/clang/Format/Format.h
  include/clang/Tooling/Inclusions/IncludeStyle.h
  lib/Driver/Driver.cpp


Index: lib/Driver/Driver.cpp
===
--- lib/Driver/Driver.cpp
+++ lib/Driver/Driver.cpp
@@ -1643,7 +1643,7 @@
 //
 // If we want to return a more correct answer some day, then we should
 // introduce a non-pedantically GCC compatible mode to Clang in which we
-// provide sensible definitions for -dumpversion, __VERSION__, etc.
+// provide sensible definitions for -dumpversion, __VERSION__, etc.
​
 llvm::outs() << "4.2.1\n";
 return false;
   }
Index: include/clang/Tooling/Inclusions/IncludeStyle.h
===
--- include/clang/Tooling/Inclusions/IncludeStyle.h
+++ include/clang/Tooling/Inclusions/IncludeStyle.h
@@ -67,7 +67,7 @@
   /// used for ordering ``#includes``.
   ///
   /// `POSIX extended
-  /// 
`_
+  /// 
`_
   /// regular expressions are supported.
   ///
   /// These regular expressions are matched against the filename of an include
@@ -79,7 +79,7 @@
   /// If none of the regular expressions match, INT_MAX is assigned as
   /// category. The main header for a source file automatically gets category 
0.
   /// so that it is generally kept at the beginning of the ``#includes``
-  /// (http://llvm.org/docs/CodingStandards.html#include-style). However, you
+  /// (https://llvm.org/docs/CodingStandards.html#include-style). However, you
   /// can also assign negative priorities if you have certain headers that
   /// always need to be first.
   ///
Index: include/clang/Format/Format.h
===
--- include/clang/Format/Format.h
+++ include/clang/Format/Format.h
@@ -1201,7 +1201,7 @@
 
   /// A vector of prefixes ordered by the desired groups for Java imports.
   ///
-  /// Each group is seperated by a newline. Static imports will also follow the
+  /// Each group is separated by a newline. Static imports will also follow the
   /// same grouping convention above all non-static imports. One group's prefix
   /// can be a subset of another - the longest prefix is always matched. Within
   /// a group, the imports are ordered lexicographically.


Index: lib/Driver/Driver.cpp
===
--- lib/Driver/Driver.cpp
+++ lib/Driver/Driver.cpp
@@ -1643,7 +1643,7 @@
 //
 // If we want to return a more correct answer some day, then we should
 // introduce a non-pedantically GCC compatible mode to Clang in which we
-// provide sensible definitions for -dumpversion, __VERSION__, etc.
+// provide sensible definitions for -dumpversion, __VERSION__, etc.	​
 llvm::outs() << "4.2.1\n";
 return false;
   }
Index: include/clang/Tooling/Inclusions/IncludeStyle.h
===
--- include/clang/Tooling/Inclusions/IncludeStyle.h
+++ include/clang/Tooling/Inclusions/IncludeStyle.h
@@ -67,7 +67,7 @@
   /// used for ordering ``#includes``.
   ///
   /// `POSIX extended
-  /// `_
+  /// `_
   /// regular expressions are supported.
   ///
   /// These regular expressions are matched against the filename of an include
@@ -79,7 +79,7 @@
   /// If none of the regular expressions match, INT_MAX is assigned as
   /// category. The main header for a source file automatically gets category 0.
   /// so that it is generally kept at the beginning of the ``#includes``
-  /// (http://llvm.org/docs/CodingStandards.html#include-style). However, you
+  /// (https://llvm.org/docs/CodingStandards.html#include-style). However, you
   /// can also assign negative priorities if you have certain headers that
   /// always need to be first.
   ///
Index: include/clang/Format/Format.h
===
--- include/clang/Format/Format.h
+++ include/clang/Format/Format.h
@@ -1201,7 +1201,7 @@
 
   /// A vector of prefixes ordered by the desired groups for Java imports.
   ///
-  /// Each group is seperated by a newline. Static imports will also follow the
+  /// Each group is separated by a newline. Static imports will also follow the
   /// same grouping convention above all non-static imports. One group's prefix
   /// can be a subset of another - the longest prefix is always matched. Within
   /// a group, the imports ar

[PATCH] D58186: Sync some doc changes ClangFormatStyleOptions.rst with doc comments in `Format.h`

2019-03-23 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 192002.
sylvestre.ledru added a comment.

Try again


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58186/new/

https://reviews.llvm.org/D58186

Files:
  include/clang/Format/Format.h
  include/clang/Tooling/Inclusions/IncludeStyle.h


Index: include/clang/Tooling/Inclusions/IncludeStyle.h
===
--- include/clang/Tooling/Inclusions/IncludeStyle.h
+++ include/clang/Tooling/Inclusions/IncludeStyle.h
@@ -67,7 +67,7 @@
   /// used for ordering ``#includes``.
   ///
   /// `POSIX extended
-  /// 
`_
+  /// 
`_
   /// regular expressions are supported.
   ///
   /// These regular expressions are matched against the filename of an include
@@ -79,7 +79,7 @@
   /// If none of the regular expressions match, INT_MAX is assigned as
   /// category. The main header for a source file automatically gets category 
0.
   /// so that it is generally kept at the beginning of the ``#includes``
-  /// (http://llvm.org/docs/CodingStandards.html#include-style). However, you
+  /// (https://llvm.org/docs/CodingStandards.html#include-style). However, you
   /// can also assign negative priorities if you have certain headers that
   /// always need to be first.
   ///
Index: include/clang/Format/Format.h
===
--- include/clang/Format/Format.h
+++ include/clang/Format/Format.h
@@ -1201,7 +1201,7 @@
 
   /// A vector of prefixes ordered by the desired groups for Java imports.
   ///
-  /// Each group is seperated by a newline. Static imports will also follow the
+  /// Each group is separated by a newline. Static imports will also follow the
   /// same grouping convention above all non-static imports. One group's prefix
   /// can be a subset of another - the longest prefix is always matched. Within
   /// a group, the imports are ordered lexicographically.


Index: include/clang/Tooling/Inclusions/IncludeStyle.h
===
--- include/clang/Tooling/Inclusions/IncludeStyle.h
+++ include/clang/Tooling/Inclusions/IncludeStyle.h
@@ -67,7 +67,7 @@
   /// used for ordering ``#includes``.
   ///
   /// `POSIX extended
-  /// `_
+  /// `_
   /// regular expressions are supported.
   ///
   /// These regular expressions are matched against the filename of an include
@@ -79,7 +79,7 @@
   /// If none of the regular expressions match, INT_MAX is assigned as
   /// category. The main header for a source file automatically gets category 0.
   /// so that it is generally kept at the beginning of the ``#includes``
-  /// (http://llvm.org/docs/CodingStandards.html#include-style). However, you
+  /// (https://llvm.org/docs/CodingStandards.html#include-style). However, you
   /// can also assign negative priorities if you have certain headers that
   /// always need to be first.
   ///
Index: include/clang/Format/Format.h
===
--- include/clang/Format/Format.h
+++ include/clang/Format/Format.h
@@ -1201,7 +1201,7 @@
 
   /// A vector of prefixes ordered by the desired groups for Java imports.
   ///
-  /// Each group is seperated by a newline. Static imports will also follow the
+  /// Each group is separated by a newline. Static imports will also follow the
   /// same grouping convention above all non-static imports. One group's prefix
   /// can be a subset of another - the longest prefix is always matched. Within
   /// a group, the imports are ordered lexicographically.
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D59702: Unbreak the build of compiler-rt on Linux/mips64el

2019-03-25 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@atanasyan  ok with you?


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59702/new/

https://reviews.llvm.org/D59702



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


[PATCH] D59702: Unbreak the build of compiler-rt on Linux/mips64el

2019-03-25 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

I agree that 104 looks strange... but it worked.
As I said, I am no expert in mips64el. :/


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59702/new/

https://reviews.llvm.org/D59702



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


[PATCH] D59702: Unbreak the build of compiler-rt on Linux/mips64el

2019-03-25 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

Debian testing
you can see the full log here:
https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-8&arch=mips64el&ver=1%3A8~%2Brc5-1&stamp=1552412165&raw=0


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59702/new/

https://reviews.llvm.org/D59702



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


[PATCH] D56803: clang -dumpversion returns 4.2.1 for legacy reason, update it

2019-03-25 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@rnk btw, do you think it should be added to the clang release notes?




Comment at: lib/Driver/Driver.cpp:1631
-// introduce a non-pedantically GCC compatible mode to Clang in which we
-// provide sensible definitions for -dumpversion, __VERSION__, etc.
-llvm::outs() << "4.2.1\n";

rnk wrote:
> We really ought to reconsider `__VERSION__` as well, although I don't think 
> anyone checks that. Today I get this for it:
>   "4.2.1 Compatible Clang 9.0.0 (g...@github.com:llvm/llvm-project.git 
> bd6354105b055af6193fb2b7561fe6f5ae0eb0d8)"
I can have a look to that if you want


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56803/new/

https://reviews.llvm.org/D56803



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


[PATCH] D56803: clang -dumpversion returns 4.2.1 for legacy reason, update it

2019-03-25 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 192159.
sylvestre.ledru marked 3 inline comments as done.
sylvestre.ledru edited the summary of this revision.
sylvestre.ledru added a comment.

Improve the test (thanks rnk)


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56803/new/

https://reviews.llvm.org/D56803

Files:
  clang/
  clang/include/
  clang/include/clang/
  clang/include/clang/Format/
  clang/include/clang/Tooling/
  clang/include/clang/Tooling/Inclusions/
  lib/Driver/Driver.cpp
  test/Driver/immediate-options.c


Index: test/Driver/immediate-options.c
===
--- test/Driver/immediate-options.c
+++ test/Driver/immediate-options.c
@@ -7,7 +7,7 @@
 // HELP-HIDDEN: driver-mode
 
 // RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
-// DUMPVERSION: 4.2.1
+// DUMPVERSION: {{[0-9]+\.[0-9.]+}}
 
 // RUN: %clang -print-search-dirs | FileCheck %s 
-check-prefix=PRINT-SEARCH-DIRS
 // PRINT-SEARCH-DIRS: programs: ={{.*}}
Index: lib/Driver/Driver.cpp
===
--- lib/Driver/Driver.cpp
+++ lib/Driver/Driver.cpp
@@ -1640,11 +1640,7 @@
   if (C.getArgs().hasArg(options::OPT_dumpversion)) {
 // Since -dumpversion is only implemented for pedantic GCC compatibility, 
we
 // return an answer which matches our definition of __VERSION__.
-//
-// If we want to return a more correct answer some day, then we should
-// introduce a non-pedantically GCC compatible mode to Clang in which we
-// provide sensible definitions for -dumpversion, __VERSION__, etc.
-llvm::outs() << "4.2.1\n";
+llvm::outs() << CLANG_VERSION_STRING << "\n";
 return false;
   }
 


Index: test/Driver/immediate-options.c
===
--- test/Driver/immediate-options.c
+++ test/Driver/immediate-options.c
@@ -7,7 +7,7 @@
 // HELP-HIDDEN: driver-mode
 
 // RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
-// DUMPVERSION: 4.2.1
+// DUMPVERSION: {{[0-9]+\.[0-9.]+}}
 
 // RUN: %clang -print-search-dirs | FileCheck %s -check-prefix=PRINT-SEARCH-DIRS
 // PRINT-SEARCH-DIRS: programs: ={{.*}}
Index: lib/Driver/Driver.cpp
===
--- lib/Driver/Driver.cpp
+++ lib/Driver/Driver.cpp
@@ -1640,11 +1640,7 @@
   if (C.getArgs().hasArg(options::OPT_dumpversion)) {
 // Since -dumpversion is only implemented for pedantic GCC compatibility, we
 // return an answer which matches our definition of __VERSION__.
-//
-// If we want to return a more correct answer some day, then we should
-// introduce a non-pedantically GCC compatible mode to Clang in which we
-// provide sensible definitions for -dumpversion, __VERSION__, etc.
-llvm::outs() << "4.2.1\n";
+llvm::outs() << CLANG_VERSION_STRING << "\n";
 return false;
   }
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D56803: clang -dumpversion returns 4.2.1 for legacy reason, update it

2019-03-25 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 192160.
sylvestre.ledru added a comment.

Remove the empty directories


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56803/new/

https://reviews.llvm.org/D56803

Files:
  lib/Driver/Driver.cpp
  test/Driver/immediate-options.c


Index: test/Driver/immediate-options.c
===
--- test/Driver/immediate-options.c
+++ test/Driver/immediate-options.c
@@ -7,7 +7,7 @@
 // HELP-HIDDEN: driver-mode
 
 // RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
-// DUMPVERSION: 4.2.1
+// DUMPVERSION: {{[0-9]+\.[0-9.]+}}
 
 // RUN: %clang -print-search-dirs | FileCheck %s 
-check-prefix=PRINT-SEARCH-DIRS
 // PRINT-SEARCH-DIRS: programs: ={{.*}}
Index: lib/Driver/Driver.cpp
===
--- lib/Driver/Driver.cpp
+++ lib/Driver/Driver.cpp
@@ -1640,11 +1640,7 @@
   if (C.getArgs().hasArg(options::OPT_dumpversion)) {
 // Since -dumpversion is only implemented for pedantic GCC compatibility, 
we
 // return an answer which matches our definition of __VERSION__.
-//
-// If we want to return a more correct answer some day, then we should
-// introduce a non-pedantically GCC compatible mode to Clang in which we
-// provide sensible definitions for -dumpversion, __VERSION__, etc.
-llvm::outs() << "4.2.1\n";
+llvm::outs() << CLANG_VERSION_STRING << "\n";
 return false;
   }
 


Index: test/Driver/immediate-options.c
===
--- test/Driver/immediate-options.c
+++ test/Driver/immediate-options.c
@@ -7,7 +7,7 @@
 // HELP-HIDDEN: driver-mode
 
 // RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
-// DUMPVERSION: 4.2.1
+// DUMPVERSION: {{[0-9]+\.[0-9.]+}}
 
 // RUN: %clang -print-search-dirs | FileCheck %s -check-prefix=PRINT-SEARCH-DIRS
 // PRINT-SEARCH-DIRS: programs: ={{.*}}
Index: lib/Driver/Driver.cpp
===
--- lib/Driver/Driver.cpp
+++ lib/Driver/Driver.cpp
@@ -1640,11 +1640,7 @@
   if (C.getArgs().hasArg(options::OPT_dumpversion)) {
 // Since -dumpversion is only implemented for pedantic GCC compatibility, we
 // return an answer which matches our definition of __VERSION__.
-//
-// If we want to return a more correct answer some day, then we should
-// introduce a non-pedantically GCC compatible mode to Clang in which we
-// provide sensible definitions for -dumpversion, __VERSION__, etc.
-llvm::outs() << "4.2.1\n";
+llvm::outs() << CLANG_VERSION_STRING << "\n";
 return false;
   }
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D60050: Spelling correction for docs for cppcoreguidelines-owning-memory

2019-03-31 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

If you have permissions on the repo, no need for a review for such change!


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60050/new/

https://reviews.llvm.org/D60050



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


[PATCH] D60115: Adding 'CLion integration' to clang-format doc

2019-04-02 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added inline comments.



Comment at: docs/ClangFormat.rst:171
+
+:program:`clang-format` is integrated into CLion as an alternative code
+formatter. It is disabled by default and can be turned on in

Maybe add a link to CLion here? I didn't know what it was :)



Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60115/new/

https://reviews.llvm.org/D60115



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


[PATCH] D60115: Adding 'CLion integration' to clang-format doc

2019-04-03 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru accepted this revision.
sylvestre.ledru added a comment.
This revision is now accepted and ready to land.

works for me, thanks


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60115/new/

https://reviews.llvm.org/D60115



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


[PATCH] D60115: Adding 'CLion integration' to clang-format doc

2019-04-03 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

Sure, i will do it for you


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60115/new/

https://reviews.llvm.org/D60115



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


[PATCH] D60115: Adding 'CLion integration' to clang-format doc

2019-04-03 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

You are welcome, thanks for your contribution!


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60115/new/

https://reviews.llvm.org/D60115



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


[PATCH] D60379: Make precompiled headers reproducible

2019-04-07 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.
sylvestre.ledru added reviewers: yaxunl, Anastasia.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This patch have been applied to Debian packages for a few months without
any regression.

Patch by Rebecca N. Palmer


Repository:
  rC Clang

https://reviews.llvm.org/D60379

Files:
  lib/Serialization/ASTWriter.cpp


Index: lib/Serialization/ASTWriter.cpp
===
--- lib/Serialization/ASTWriter.cpp
+++ lib/Serialization/ASTWriter.cpp
@@ -4279,9 +4279,13 @@
 return;
 
   RecordData Record;
+  // Sort to allow reproducible .pch files - https://bugs.debian.org/877359
+  std::map> sortedOpenCLTypeExtMap;
   for (const auto &I : SemaRef.OpenCLTypeExtMap) {
-Record.push_back(
-static_cast(getTypeID(I.first->getCanonicalTypeInternal(;
+
sortedOpenCLTypeExtMap[getTypeID(I.first->getCanonicalTypeInternal())]=I.second;
+  }
+  for (const auto &I : sortedOpenCLTypeExtMap) {
+Record.push_back(static_cast(I.first));
 Record.push_back(I.second.size());
 for (auto Ext : I.second)
   AddString(Ext, Record);
@@ -4294,8 +4298,12 @@
 return;
 
   RecordData Record;
+  std::map> sortedOpenCLDeclExtMap;
   for (const auto &I : SemaRef.OpenCLDeclExtMap) {
-Record.push_back(getDeclID(I.first));
+sortedOpenCLDeclExtMap[getDeclID(I.first)]=I.second;
+  }
+  for (const auto &I : sortedOpenCLDeclExtMap) {
+Record.push_back(I.first);
 Record.push_back(static_cast(I.second.size()));
 for (auto Ext : I.second)
   AddString(Ext, Record);


Index: lib/Serialization/ASTWriter.cpp
===
--- lib/Serialization/ASTWriter.cpp
+++ lib/Serialization/ASTWriter.cpp
@@ -4279,9 +4279,13 @@
 return;
 
   RecordData Record;
+  // Sort to allow reproducible .pch files - https://bugs.debian.org/877359
+  std::map> sortedOpenCLTypeExtMap;
   for (const auto &I : SemaRef.OpenCLTypeExtMap) {
-Record.push_back(
-static_cast(getTypeID(I.first->getCanonicalTypeInternal(;
+sortedOpenCLTypeExtMap[getTypeID(I.first->getCanonicalTypeInternal())]=I.second;
+  }
+  for (const auto &I : sortedOpenCLTypeExtMap) {
+Record.push_back(static_cast(I.first));
 Record.push_back(I.second.size());
 for (auto Ext : I.second)
   AddString(Ext, Record);
@@ -4294,8 +4298,12 @@
 return;
 
   RecordData Record;
+  std::map> sortedOpenCLDeclExtMap;
   for (const auto &I : SemaRef.OpenCLDeclExtMap) {
-Record.push_back(getDeclID(I.first));
+sortedOpenCLDeclExtMap[getDeclID(I.first)]=I.second;
+  }
+  for (const auto &I : sortedOpenCLDeclExtMap) {
+Record.push_back(I.first);
 Record.push_back(static_cast(I.second.size()));
 for (auto Ext : I.second)
   AddString(Ext, Record);
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D60380: Also document -arch as -arch is mac specific

2019-04-07 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.
sylvestre.ledru added a reviewer: rsmith.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Repository:
  rC Clang

https://reviews.llvm.org/D60380

Files:
  docs/CommandGuide/clang.rst


Index: docs/CommandGuide/clang.rst
===
--- docs/CommandGuide/clang.rst
+++ docs/CommandGuide/clang.rst
@@ -312,7 +312,11 @@
 
 .. option:: -arch 
 
-  Specify the architecture to build for.
+  Specify the architecture to build for (Mac OS X specific)
+
+.. option:: -target 
+
+  Specify the architecture to build for (Linux and others)
 
 .. option:: -mmacosx-version-min=
 


Index: docs/CommandGuide/clang.rst
===
--- docs/CommandGuide/clang.rst
+++ docs/CommandGuide/clang.rst
@@ -312,7 +312,11 @@
 
 .. option:: -arch 
 
-  Specify the architecture to build for.
+  Specify the architecture to build for (Mac OS X specific)
+
+.. option:: -target 
+
+  Specify the architecture to build for (Linux and others)
 
 .. option:: -mmacosx-version-min=
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D60379: Make precompiled headers reproducible

2019-04-08 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

I won't have time to write the test for that (and would not know where to 
start). I am just the messenger :)


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60379/new/

https://reviews.llvm.org/D60379



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


[PATCH] D60379: Make precompiled headers reproducible

2019-04-08 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

To be clear, this isn't about format stability and distributing but making sure 
that two same runs of clang produces the same output.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60379/new/

https://reviews.llvm.org/D60379



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


[PATCH] D58573: [analyzer] Move UninitializedObjectChecker out of alpha

2019-04-27 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

I took the liberty to add that in the release notes of clang
https://reviews.llvm.org/rG5f163c7e2e62


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58573/new/

https://reviews.llvm.org/D58573



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


[PATCH] D59702: Unbreak the build of compiler-rt on Linux/mips64el

2019-05-01 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@atanasyan, I tried with

  -DCMAKE_C_FLAGS="-mabi=32"
  -DCMAKE_CXX_FLAGS="-mabi=32"

but it still fails with:

  cd /<>/build-llvm/projects/compiler-rt/lib/sanitizer_common && 
/usr/bin/g++-8  -DHAVE_RPC_XDR_H=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/<>/build-llvm/projects/compiler-rt/lib/sanitizer_common 
-I/<>/projects/compiler-rt/lib/sanitizer_common 
-I/<>/build-llvm/include -I/<>/include 
-I/<>/projects/compiler-rt/lib/sanitizer_common/..  -g -O2 
-fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat 
-Werror=format-security -fPIC -fvisibility-inlines-hidden -Werror=date-time 
-std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-maybe-uninitialized -Wno-class-memaccess -Wno-noexcept-type 
-Wdelete-non-virtual-dtor -Wno-comment -ffunction-sections -fdata-sections 
-Wall -std=c++11 -Wno-unused-parameter -O2 -DNDEBUG -g1-mips32r2 -mabi=32 
-fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables 
-fno-stack-protector -fvisibility=hidden -fno-lto -O3 -g -Wno-variadic-macros 
-Wno-non-virtual-dtor -fno-rtti -o 
CMakeFiles/RTSanitizerCommon.mipsel.dir/sanitizer_platform_limits_linux.cc.o -c 
/<>/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc
  In file included from 
/<>/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc:22:
  
/<>/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:343:72:
 error: size of array 'assertion_failed__73' is negative
   typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
  ^
  
/<>/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:337:30:
 note: in expansion of macro 'IMPL_COMPILER_ASSERT'
   #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
^~~~
  
/<>/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc:73:1:
 note: in expansion of macro 'COMPILER_CHECK'
   COMPILER_CHECK(struct_kernel_stat_sz == sizeof(struct stat));
   ^~

Full log:
https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-8&arch=mips64el&ver=1%3A8-4&stamp=1556705174&raw=0
better idea? :)


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59702/new/

https://reviews.llvm.org/D59702



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


[PATCH] D52151: Also manages clang-X as tool for scan-build

2018-09-16 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.
sylvestre.ledru added a reviewer: jroelofs.

This will make
scan-build-7 clang-7 -c foo.c &> /dev/null


Repository:
  rC Clang

https://reviews.llvm.org/D52151

Files:
  tools/scan-build/bin/scan-build


Index: tools/scan-build/bin/scan-build
===
--- tools/scan-build/bin/scan-build
+++ tools/scan-build/bin/scan-build
@@ -1079,7 +1079,7 @@
   if ($Cmd =~ /(.*\/?gcc[^\/]*$)/ or
   $Cmd =~ /(.*\/?cc[^\/]*$)/ or
   $Cmd =~ /(.*\/?llvm-gcc[^\/]*$)/ or
-  $Cmd =~ /(.*\/?clang$)/ or
+  $Cmd =~ /(.*\/?clang[^\/]*$)/ or
   $Cmd =~ /(.*\/?ccc-analyzer[^\/]*$)/) {
 
 if (!($Cmd =~ /ccc-analyzer/) and !defined $ENV{"CCC_CC"}) {


Index: tools/scan-build/bin/scan-build
===
--- tools/scan-build/bin/scan-build
+++ tools/scan-build/bin/scan-build
@@ -1079,7 +1079,7 @@
   if ($Cmd =~ /(.*\/?gcc[^\/]*$)/ or
   $Cmd =~ /(.*\/?cc[^\/]*$)/ or
   $Cmd =~ /(.*\/?llvm-gcc[^\/]*$)/ or
-  $Cmd =~ /(.*\/?clang$)/ or
+  $Cmd =~ /(.*\/?clang[^\/]*$)/ or
   $Cmd =~ /(.*\/?ccc-analyzer[^\/]*$)/) {
 
 if (!($Cmd =~ /ccc-analyzer/) and !defined $ENV{"CCC_CC"}) {
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D52153: scan-build: Add support of the option --exclude like in scan-build-py

2018-09-16 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.
sylvestre.ledru added a reviewer: jroelofs.
Herald added a subscriber: whisperity.
sylvestre.ledru edited the summary of this revision.

To exclude thirdparty code.

To test:
With /tmp/foo.c

  void test() {
  int x;
  x = 1; // warn
  }  



  $ scan-build --exclude non-existing/  --exclude /tmp/ -v gcc -c foo.c 


  
  
  scan-build: Using '/usr/lib/llvm-7/bin/clang' for static analysis
  scan-build: Emitting reports for this run to 
'/tmp/scan-build-2018-09-16-214531-8410-1'.
  foo.c:3:3: warning: Value stored to 'x' is never read
x = 1; // warn
^   ~
  1 warning generated.
  scan-build: File '/tmp/foo.c' deleted: part of an ignored directory.
  scan-build: 0 bugs found.


Repository:
  rC Clang

https://reviews.llvm.org/D52153

Files:
  tools/scan-build/bin/scan-build


Index: tools/scan-build/bin/scan-build
===
--- tools/scan-build/bin/scan-build
+++ tools/scan-build/bin/scan-build
@@ -58,6 +58,7 @@
   KeepEmpty => 0,# Don't remove output directory even with 0 
results.
   EnableCheckers => {},
   DisableCheckers => {},
+  Excludes => [],
   UseCC => undef,# C compiler to use for compilation.
   UseCXX => undef,   # C++ compiler to use for compilation.
   AnalyzerTarget => undef,
@@ -420,6 +421,20 @@
  # The file no longer exists: use the original path.
  $BugFile = $1;
   }
+
+  # Get just the path
+  my $p = dirname($BugFile);
+  # Check if the path is found in the list of exclude
+  if (grep { $p =~ m/$_/ } @{$Options{Excludes}}) {
+ if ($Options{Verbose}) {
+ Diag("File '$BugFile' deleted: part of an ignored directory.\n");
+ }
+
+ # File in an ignored directory. Remove it
+ unlink("$Dir/$FName");
+ return;
+  }
+
   UpdatePrefix($BugFile);
 }
 elsif (/$/) {
@@ -1194,6 +1209,12 @@
command. Specifying this option causes the exit status of scan-build to be 1
if it found potential bugs and 0 otherwise.
 
+ --exclude 
+
+   Do not run static analyzer against files found in this
+   directory (You can specify this option multiple times).
+   Could be useful when project contains 3rd party libraries.
+
  --use-cc [compiler path]
  --use-cc=[compiler path]
 
@@ -1698,6 +1719,15 @@
   next;
 }
 
+if ($arg eq "--exclude") {
+  shift @$Args;
+  my $arg = shift @$Args;
+  # Remove the trailing slash if any
+  $arg =~ s|/$||;
+  push @{$Options{Excludes}}, $arg;
+  next;
+}
+
 if ($arg eq "-load-plugin") {
   shift @$Args;
   push @{$Options{PluginsToLoad}}, shift @$Args;


Index: tools/scan-build/bin/scan-build
===
--- tools/scan-build/bin/scan-build
+++ tools/scan-build/bin/scan-build
@@ -58,6 +58,7 @@
   KeepEmpty => 0,# Don't remove output directory even with 0 results.
   EnableCheckers => {},
   DisableCheckers => {},
+  Excludes => [],
   UseCC => undef,# C compiler to use for compilation.
   UseCXX => undef,   # C++ compiler to use for compilation.
   AnalyzerTarget => undef,
@@ -420,6 +421,20 @@
  # The file no longer exists: use the original path.
  $BugFile = $1;
   }
+
+  # Get just the path
+  my $p = dirname($BugFile);
+  # Check if the path is found in the list of exclude
+  if (grep { $p =~ m/$_/ } @{$Options{Excludes}}) {
+	  if ($Options{Verbose}) {
+	  Diag("File '$BugFile' deleted: part of an ignored directory.\n");
+	  }
+
+	  # File in an ignored directory. Remove it
+	  unlink("$Dir/$FName");
+	  return;
+  }
+
   UpdatePrefix($BugFile);
 }
 elsif (/$/) {
@@ -1194,6 +1209,12 @@
command. Specifying this option causes the exit status of scan-build to be 1
if it found potential bugs and 0 otherwise.
 
+ --exclude 
+
+   Do not run static analyzer against files found in this
+   directory (You can specify this option multiple times).
+   Could be useful when project contains 3rd party libraries.
+
  --use-cc [compiler path]
  --use-cc=[compiler path]
 
@@ -1698,6 +1719,15 @@
   next;
 }
 
+if ($arg eq "--exclude") {
+  shift @$Args;
+  my $arg = shift @$Args;
+  # Remove the trailing slash if any
+  $arg =~ s|/$||;
+  push @{$Options{Excludes}}, $arg;
+  next;
+}
+
 if ($arg eq "-load-plugin") {
   shift @$Args;
   push @{$Options{PluginsToLoad}}, shift @$Args;
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D52153: scan-build: Add support of the option --exclude like in scan-build-py

2018-09-16 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 165691.
sylvestre.ledru added a comment.

Fix the indentation


Repository:
  rC Clang

https://reviews.llvm.org/D52153

Files:
  tools/scan-build/bin/scan-build


Index: tools/scan-build/bin/scan-build
===
--- tools/scan-build/bin/scan-build
+++ tools/scan-build/bin/scan-build
@@ -58,6 +58,7 @@
   KeepEmpty => 0,# Don't remove output directory even with 0 
results.
   EnableCheckers => {},
   DisableCheckers => {},
+  Excludes => [],
   UseCC => undef,# C compiler to use for compilation.
   UseCXX => undef,   # C++ compiler to use for compilation.
   AnalyzerTarget => undef,
@@ -420,6 +421,20 @@
  # The file no longer exists: use the original path.
  $BugFile = $1;
   }
+
+  # Get just the path
+  my $p = dirname($BugFile);
+  # Check if the path is found in the list of exclude
+  if (grep { $p =~ m/$_/ } @{$Options{Excludes}}) {
+ if ($Options{Verbose}) {
+ Diag("File '$BugFile' deleted: part of an ignored directory.\n");
+ }
+
+   # File in an ignored directory. Remove it
+   unlink("$Dir/$FName");
+   return;
+  }
+
   UpdatePrefix($BugFile);
 }
 elsif (/$/) {
@@ -1194,6 +1209,12 @@
command. Specifying this option causes the exit status of scan-build to be 1
if it found potential bugs and 0 otherwise.
 
+ --exclude 
+
+   Do not run static analyzer against files found in this
+   directory (You can specify this option multiple times).
+   Could be useful when project contains 3rd party libraries.
+
  --use-cc [compiler path]
  --use-cc=[compiler path]
 
@@ -1698,6 +1719,15 @@
   next;
 }
 
+if ($arg eq "--exclude") {
+  shift @$Args;
+  my $arg = shift @$Args;
+  # Remove the trailing slash if any
+  $arg =~ s|/$||;
+  push @{$Options{Excludes}}, $arg;
+  next;
+}
+
 if ($arg eq "-load-plugin") {
   shift @$Args;
   push @{$Options{PluginsToLoad}}, shift @$Args;


Index: tools/scan-build/bin/scan-build
===
--- tools/scan-build/bin/scan-build
+++ tools/scan-build/bin/scan-build
@@ -58,6 +58,7 @@
   KeepEmpty => 0,# Don't remove output directory even with 0 results.
   EnableCheckers => {},
   DisableCheckers => {},
+  Excludes => [],
   UseCC => undef,# C compiler to use for compilation.
   UseCXX => undef,   # C++ compiler to use for compilation.
   AnalyzerTarget => undef,
@@ -420,6 +421,20 @@
  # The file no longer exists: use the original path.
  $BugFile = $1;
   }
+
+  # Get just the path
+  my $p = dirname($BugFile);
+  # Check if the path is found in the list of exclude
+  if (grep { $p =~ m/$_/ } @{$Options{Excludes}}) {
+ if ($Options{Verbose}) {
+ Diag("File '$BugFile' deleted: part of an ignored directory.\n");
+ }
+
+   # File in an ignored directory. Remove it
+   unlink("$Dir/$FName");
+   return;
+  }
+
   UpdatePrefix($BugFile);
 }
 elsif (/$/) {
@@ -1194,6 +1209,12 @@
command. Specifying this option causes the exit status of scan-build to be 1
if it found potential bugs and 0 otherwise.
 
+ --exclude 
+
+   Do not run static analyzer against files found in this
+   directory (You can specify this option multiple times).
+   Could be useful when project contains 3rd party libraries.
+
  --use-cc [compiler path]
  --use-cc=[compiler path]
 
@@ -1698,6 +1719,15 @@
   next;
 }
 
+if ($arg eq "--exclude") {
+  shift @$Args;
+  my $arg = shift @$Args;
+  # Remove the trailing slash if any
+  $arg =~ s|/$||;
+  push @{$Options{Excludes}}, $arg;
+  next;
+}
+
 if ($arg eq "-load-plugin") {
   shift @$Args;
   push @{$Options{PluginsToLoad}}, shift @$Args;
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D52151: Also manages clang-X as tool for scan-build

2018-09-16 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@kristina sorry, I missed your comment. I just followed what we are doing with 
gcc. Do you want me to update it?


Repository:
  rC Clang

https://reviews.llvm.org/D52151



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


[PATCH] D53014: Add CMAKE_BUILD_TYPE to the list of BOOTSTRAP_DEFAULT_PASSTHROUGH variables

2018-10-09 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.
sylvestre.ledru added a reviewer: ecbeckmann.
Herald added a subscriber: mgorny.

When building clang in stage2, when -DCMAKE_BUILD_TYPE=RelWithDebInfo is set,
the developer can expect that the stage2 clang is built using the same mode.
Especially as the performances are much worst in debug mode.
(Principle of least astonishment)


Repository:
  rC Clang

https://reviews.llvm.org/D53014

Files:
  CMakeLists.txt


Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -609,6 +609,7 @@
 CLANG_REPOSITORY_STRING
 CMAKE_MAKE_PROGRAM
 CMAKE_OSX_ARCHITECTURES
+CMAKE_BUILD_TYPE
 LLVM_ENABLE_PROJECTS
 LLVM_ENABLE_RUNTIMES)
 


Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -609,6 +609,7 @@
 CLANG_REPOSITORY_STRING
 CMAKE_MAKE_PROGRAM
 CMAKE_OSX_ARCHITECTURES
+CMAKE_BUILD_TYPE
 LLVM_ENABLE_PROJECTS
 LLVM_ENABLE_RUNTIMES)
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D58186: Sync some doc changes ClangFormatStyleOptions.rst with doc comments in `Format.h`

2019-02-21 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru accepted this revision.
sylvestre.ledru added a comment.
This revision is now accepted and ready to land.

Do you have permissions on the repo?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58186/new/

https://reviews.llvm.org/D58186



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


[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2017-08-30 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

Any news on this?
cc @djasper


Repository:
  rL LLVM

https://reviews.llvm.org/D28462



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


[PATCH] D37531: Add an usage example of BreakBeforeBraces

2017-09-06 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.

https://reviews.llvm.org/D37531

Files:
  docs/ClangFormatStyleOptions.rst


Index: docs/ClangFormatStyleOptions.rst
===
--- docs/ClangFormatStyleOptions.rst
+++ docs/ClangFormatStyleOptions.rst
@@ -533,6 +533,16 @@
   If ``BreakBeforeBraces`` is set to ``BS_Custom``, use this to specify how
   each individual brace case should be handled. Otherwise, this is ignored.
 
+  .. code-block:: yaml
+
+# Example of usage: 
+BreakBeforeBraces: Custom
+BraceWrapping:
+  AfterEnum: true
+  AfterStruct: false
+  SplitEmptyFunction: false
+
+
   Nested configuration flags:
 
 


Index: docs/ClangFormatStyleOptions.rst
===
--- docs/ClangFormatStyleOptions.rst
+++ docs/ClangFormatStyleOptions.rst
@@ -533,6 +533,16 @@
   If ``BreakBeforeBraces`` is set to ``BS_Custom``, use this to specify how
   each individual brace case should be handled. Otherwise, this is ignored.
 
+  .. code-block:: yaml
+
+# Example of usage: 
+BreakBeforeBraces: Custom
+BraceWrapping:
+  AfterEnum: true
+  AfterStruct: false
+  SplitEmptyFunction: false
+
+
   Nested configuration flags:
 
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D37531: Add an usage example of BreakBeforeBraces

2017-09-07 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 114136.
sylvestre.ledru added a comment.
Herald added a subscriber: klimek.

Thanks. I need more coffee.


https://reviews.llvm.org/D37531

Files:
  docs/ClangFormatStyleOptions.rst
  include/clang/Format/Format.h


Index: include/clang/Format/Format.h
===
--- include/clang/Format/Format.h
+++ include/clang/Format/Format.h
@@ -746,6 +746,14 @@
   ///
   /// If ``BreakBeforeBraces`` is set to ``BS_Custom``, use this to specify how
   /// each individual brace case should be handled. Otherwise, this is ignored.
+  /// \code{.yaml}
+  ///   # Example of usage:
+  ///   BreakBeforeBraces: Custom
+  ///   BraceWrapping:
+  /// AfterEnum: true
+  /// AfterStruct: false
+  /// SplitEmptyFunction: false
+  /// \endcode
   BraceWrappingFlags BraceWrapping;
 
   /// \brief If ``true``, ternary operators will be placed after line breaks.
Index: docs/ClangFormatStyleOptions.rst
===
--- docs/ClangFormatStyleOptions.rst
+++ docs/ClangFormatStyleOptions.rst
@@ -533,6 +533,15 @@
   If ``BreakBeforeBraces`` is set to ``BS_Custom``, use this to specify how
   each individual brace case should be handled. Otherwise, this is ignored.
 
+  .. code-block:: yaml
+
+# Example of usage:
+BreakBeforeBraces: Custom
+BraceWrapping:
+  AfterEnum: true
+  AfterStruct: false
+  SplitEmptyFunction: false
+
   Nested configuration flags:
 
 


Index: include/clang/Format/Format.h
===
--- include/clang/Format/Format.h
+++ include/clang/Format/Format.h
@@ -746,6 +746,14 @@
   ///
   /// If ``BreakBeforeBraces`` is set to ``BS_Custom``, use this to specify how
   /// each individual brace case should be handled. Otherwise, this is ignored.
+  /// \code{.yaml}
+  ///   # Example of usage:
+  ///   BreakBeforeBraces: Custom
+  ///   BraceWrapping:
+  /// AfterEnum: true
+  /// AfterStruct: false
+  /// SplitEmptyFunction: false
+  /// \endcode
   BraceWrappingFlags BraceWrapping;
 
   /// \brief If ``true``, ternary operators will be placed after line breaks.
Index: docs/ClangFormatStyleOptions.rst
===
--- docs/ClangFormatStyleOptions.rst
+++ docs/ClangFormatStyleOptions.rst
@@ -533,6 +533,15 @@
   If ``BreakBeforeBraces`` is set to ``BS_Custom``, use this to specify how
   each individual brace case should be handled. Otherwise, this is ignored.
 
+  .. code-block:: yaml
+
+# Example of usage:
+BreakBeforeBraces: Custom
+BraceWrapping:
+  AfterEnum: true
+  AfterStruct: false
+  SplitEmptyFunction: false
+
   Nested configuration flags:
 
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D37558: Refresh the clang format options doc with the recent changes

2017-09-07 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.

Looks like we are out of sync between the doc and the code.


https://reviews.llvm.org/D37558

Files:
  docs/ClangFormatStyleOptions.rst

Index: docs/ClangFormatStyleOptions.rst
===
--- docs/ClangFormatStyleOptions.rst
+++ docs/ClangFormatStyleOptions.rst
@@ -679,7 +679,7 @@
 
   * ``bool IndentBraces`` Indent the wrapped braces themselves.
 
-  * ``bool SplitEmptyFunctionBody`` If ``false``, empty function body can be put on a single line.
+  * ``bool SplitEmptyFunction`` If ``false``, empty function body can be put on a single line.
 This option is used only if the opening brace of the function has
 already been wrapped, i.e. the `AfterFunction` brace wrapping mode is
 set, and the function could/should not be put on a single line (as per
@@ -691,7 +691,29 @@
   {}  {
   }
 
+  * ``bool SplitEmptyRecord`` If ``false``, empty record (e.g. class, struct or union) body
+can be put on a single line. This option is used only if the opening
+brace of the record has already been wrapped, i.e. the `AfterClass`
+(for classes) brace wrapping mode is set.
 
+.. code-block:: c++
+
+  class Foo   vs.  class Foo
+  {}   {
+   }
+
+  * ``bool SplitEmptyNamespace`` If ``false``, empty namespace body can be put on a single line.
+This option is used only if the opening brace of the namespace has
+already been wrapped, i.e. the `AfterNamespace` brace wrapping mode is
+set.
+
+.. code-block:: c++
+
+  namespace Foo   vs.  namespace Foo
+  {}   {
+   }
+
+
 **BreakAfterJavaFieldAnnotations** (``bool``)
   Break after each annotation on a field in Java files.
 
@@ -1144,7 +1166,7 @@
 IncludeCategories:
   - Regex:   '^"(llvm|llvm-c|clang|clang-c)/'
 Priority:2
-  - Regex:   '^(<|"(gtest|isl|json)/)'
+  - Regex:   '^(<|"(gtest|gmock|isl|json)/)'
 Priority:3
   - Regex:   '.*'
 Priority:1
@@ -1180,7 +1202,7 @@
  }  }
 
 **IndentPPDirectives** (``PPDirectiveIndentStyle``)
-  Indent preprocessor directives on conditionals.
+  The preprocessor directive indenting style to use.
 
   Possible values:
 
@@ -1189,11 +1211,11 @@
 
 .. code-block:: c++
 
-  #if FOO
-  #if BAR
-  #include 
-  #endif
-  #endif
+   #if FOO
+   #if BAR
+   #include 
+   #endif
+   #endif
 
   * ``PPDIS_AfterHash`` (in configuration: ``AfterHash``)
 Indents directives after the hash.
@@ -1200,12 +1222,14 @@
 
 .. code-block:: c++
 
-  #if FOO
-  #  if BAR
-  #include 
-  #  endif
-  #endif
+   #if FOO
+   #  if BAR
+   #include 
+   #  endif
+   #endif
 
+
+
 **IndentWidth** (``unsigned``)
   The number of columns to use for indentation.
 
@@ -1318,8 +1342,12 @@
   * ``LK_TableGen`` (in configuration: ``TableGen``)
 Should be used for TableGen code.
 
+  * ``LK_TextProto`` (in configuration: ``TextProto``)
+Should be used for Protocol Buffer messages in text format
+(https://developers.google.com/protocol-buffers/).
 
 
+
 **MacroBlockBegin** (``std::string``)
   A regular expression matching macros that start a block.
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D37795: SplitEmptyFunction should be true in the Mozilla coding style

2017-09-13 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.
Herald added a subscriber: klimek.

As defined here: 
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Classes
See for the downstream bug report: 
https://bugzilla.mozilla.org/show_bug.cgi?id=1399359


https://reviews.llvm.org/D37795

Files:
  lib/Format/Format.cpp


Index: lib/Format/Format.cpp
===
--- lib/Format/Format.cpp
+++ lib/Format/Format.cpp
@@ -515,7 +515,7 @@
 Expanded.BraceWrapping.AfterFunction = true;
 Expanded.BraceWrapping.AfterStruct = true;
 Expanded.BraceWrapping.AfterUnion = true;
-Expanded.BraceWrapping.SplitEmptyFunction = false;
+Expanded.BraceWrapping.SplitEmptyFunction = true;
 Expanded.BraceWrapping.SplitEmptyRecord = false;
 break;
   case FormatStyle::BS_Stroustrup:


Index: lib/Format/Format.cpp
===
--- lib/Format/Format.cpp
+++ lib/Format/Format.cpp
@@ -515,7 +515,7 @@
 Expanded.BraceWrapping.AfterFunction = true;
 Expanded.BraceWrapping.AfterStruct = true;
 Expanded.BraceWrapping.AfterUnion = true;
-Expanded.BraceWrapping.SplitEmptyFunction = false;
+Expanded.BraceWrapping.SplitEmptyFunction = true;
 Expanded.BraceWrapping.SplitEmptyRecord = false;
 break;
   case FormatStyle::BS_Stroustrup:
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D38124: Hide some symbols to avoid a crash on shutdown when using code coverage

2017-09-21 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.
sylvestre.ledru added a project: clang.

gcov / gcda-based profiling crashes when shared libraries are unloaded

Patch by Benoit Belley and tested by Marco Castelluccio for Firefox

See https://bugs.llvm.org/show_bug.cgi?id=27224 & 
https://bugzilla.mozilla.org/show_bug.cgi?id=1401230


https://reviews.llvm.org/D38124

Files:
  lib/profile/GCDAProfiling.c

Index: lib/profile/GCDAProfiling.c
===
--- lib/profile/GCDAProfiling.c
+++ lib/profile/GCDAProfiling.c
@@ -21,6 +21,7 @@
 \*===--===*/
 
 #include "InstrProfilingUtil.h"
+#include "InstrProfilingPort.h" /* for COMPILER_RT_VISIBILITY */
 
 #include 
 #include 
@@ -251,6 +252,7 @@
  * profiling enabled will emit to a different file. Only one file may be
  * started at a time.
  */
+COMPILER_RT_VISIBILITY
 void llvm_gcda_start_file(const char *orig_filename, const char version[4],
   uint32_t checksum) {
   const char *mode = "r+b";
@@ -318,6 +320,7 @@
 /* Given an array of pointers to counters (counters), increment the n-th one,
  * where we're also given a pointer to n (predecessor).
  */
+COMPILER_RT_VISIBILITY
 void llvm_gcda_increment_indirect_counter(uint32_t *predecessor,
   uint64_t **counters) {
   uint64_t *counter;
@@ -340,6 +343,7 @@
 #endif
 }
 
+COMPILER_RT_VISIBILITY
 void llvm_gcda_emit_function(uint32_t ident, const char *function_name,
  uint32_t func_checksum, uint8_t use_extra_checksum,
  uint32_t cfg_checksum) {
@@ -366,6 +370,7 @@
 write_string(function_name);
 }
 
+COMPILER_RT_VISIBILITY
 void llvm_gcda_emit_arcs(uint32_t num_counters, uint64_t *counters) {
   uint32_t i;
   uint64_t *old_ctrs = NULL;
@@ -417,6 +422,7 @@
 #endif
 }
 
+COMPILER_RT_VISIBILITY
 void llvm_gcda_summary_info() {
   const uint32_t obj_summary_len = 9; /* Length for gcov compatibility. */
   uint32_t i;
@@ -470,6 +476,7 @@
 #endif
 }
 
+COMPILER_RT_VISIBILITY
 void llvm_gcda_end_file() {
   /* Write out EOF record. */
   if (output_file) {
@@ -494,6 +501,7 @@
 #endif
 }
 
+COMPILER_RT_VISIBILITY
 void llvm_register_writeout_function(writeout_fn fn) {
   struct writeout_fn_node *new_node = malloc(sizeof(struct writeout_fn_node));
   new_node->fn = fn;
@@ -507,6 +515,7 @@
   }
 }
 
+COMPILER_RT_VISIBILITY
 void llvm_writeout_files() {
   struct writeout_fn_node *curr = writeout_fn_head;
 
@@ -516,6 +525,7 @@
   }
 }
 
+COMPILER_RT_VISIBILITY
 void llvm_delete_writeout_function_list() {
   while (writeout_fn_head) {
 struct writeout_fn_node *node = writeout_fn_head;
@@ -526,6 +536,7 @@
   writeout_fn_head = writeout_fn_tail = NULL;
 }
 
+COMPILER_RT_VISIBILITY
 void llvm_register_flush_function(flush_fn fn) {
   struct flush_fn_node *new_node = malloc(sizeof(struct flush_fn_node));
   new_node->fn = fn;
@@ -539,6 +550,7 @@
   }
 }
 
+COMPILER_RT_VISIBILITY
 void __gcov_flush() {
   struct flush_fn_node *curr = flush_fn_head;
 
@@ -548,6 +560,7 @@
   }
 }
 
+COMPILER_RT_VISIBILITY
 void llvm_delete_flush_function_list() {
   while (flush_fn_head) {
 struct flush_fn_node *node = flush_fn_head;
@@ -558,6 +571,7 @@
   flush_fn_head = flush_fn_tail = NULL;
 }
 
+COMPILER_RT_VISIBILITY
 void llvm_gcov_init(writeout_fn wfn, flush_fn ffn) {
   static int atexit_ran = 0;
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D37042: Teach clang to tolerate the 'p = nullptr + n' idiom used by glibc

2017-09-22 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

For the record, Firefox was using this trick. This patch is breaking a ci build 
(clang trunk + warning as errors)
More information here: https://bugzilla.mozilla.org/show_bug.cgi?id=1402362


Repository:
  rL LLVM

https://reviews.llvm.org/D37042



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


[PATCH] D38186: Add the new -Wnull-pointer-arithmetic warnings to the release notes

2017-09-22 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.
sylvestre.ledru added a project: clang.

https://reviews.llvm.org/D38186

Files:
  ReleaseNotes.rst


Index: ReleaseNotes.rst
===
--- ReleaseNotes.rst
+++ ReleaseNotes.rst
@@ -78,6 +78,12 @@
   when the signed integer is coerced to an unsigned type for the comparison.
   ``-Wsign-compare`` was adjusted not to warn in this case.
 
+- ``-Wnull-pointer-arithmetic`` now warns about performing pointer arithmetic
+  on a null pointer. It has an undefined behavior if the offset is nonzero.
+
+- ``-Wnull-pointer-arithmetic`` now warns about arithmetic on a null pointer
+  treated as a cast from integer to pointer (GNU extension).
+
 Non-comprehensive list of changes in this release
 -
 


Index: ReleaseNotes.rst
===
--- ReleaseNotes.rst
+++ ReleaseNotes.rst
@@ -78,6 +78,12 @@
   when the signed integer is coerced to an unsigned type for the comparison.
   ``-Wsign-compare`` was adjusted not to warn in this case.
 
+- ``-Wnull-pointer-arithmetic`` now warns about performing pointer arithmetic
+  on a null pointer. It has an undefined behavior if the offset is nonzero.
+
+- ``-Wnull-pointer-arithmetic`` now warns about arithmetic on a null pointer
+  treated as a cast from integer to pointer (GNU extension).
+
 Non-comprehensive list of changes in this release
 -
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D38228: Fix clangd when built with LLVM_LINK_LLVM_DYLIB=ON

2017-09-25 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

For the record, this is the same approach as in 
https://reviews.llvm.org/rL240104


https://reviews.llvm.org/D38228



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


[PATCH] D38228: Fix clangd when built with LLVM_LINK_LLVM_DYLIB=ON

2017-09-25 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.
Herald added subscribers: ilya-biryukov, mgorny.

https://reviews.llvm.org/D38228

Files:
  clangd/tool/CMakeLists.txt


Index: clangd/tool/CMakeLists.txt
===
--- clangd/tool/CMakeLists.txt
+++ clangd/tool/CMakeLists.txt
@@ -6,6 +6,10 @@
 
 install(TARGETS clangd RUNTIME DESTINATION bin)
 
+set(LLVM_LINK_COMPONENTS
+  support
+  )
+
 target_link_libraries(clangd
   clangBasic
   clangDaemon
@@ -14,5 +18,4 @@
   clangSema
   clangTooling
   clangToolingCore
-  LLVMSupport
   )


Index: clangd/tool/CMakeLists.txt
===
--- clangd/tool/CMakeLists.txt
+++ clangd/tool/CMakeLists.txt
@@ -6,6 +6,10 @@
 
 install(TARGETS clangd RUNTIME DESTINATION bin)
 
+set(LLVM_LINK_COMPONENTS
+  support
+  )
+
 target_link_libraries(clangd
   clangBasic
   clangDaemon
@@ -14,5 +18,4 @@
   clangSema
   clangTooling
   clangToolingCore
-  LLVMSupport
   )
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-06-08 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.
sylvestre.ledru added a reviewer: rnk.
Herald added a subscriber: fedor.sergeev.
Herald added a project: clang.

Just like in https://reviews.llvm.org/D56803
for -dumpversion


Repository:
  rC Clang

https://reviews.llvm.org/D63048

Files:
  lib/Frontend/InitPreprocessor.cpp
  test/Preprocessor/init.c


Index: test/Preprocessor/init.c
===
--- test/Preprocessor/init.c
+++ test/Preprocessor/init.c
@@ -8169,7 +8169,7 @@
 // SPARC:#define __UINT_LEAST8_MAX__ 255
 // SPARC:#define __UINT_LEAST8_TYPE__ unsigned char
 // SPARC:#define __USER_LABEL_PREFIX__
-// SPARC:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// SPARC:#define __VERSION__ "{{[0-9]+\.[0-9.]+}} Compatible{{.*}}
 // SPARC:#define __WCHAR_MAX__ 2147483647
 // SPARC:#define __WCHAR_TYPE__ int
 // SPARC:#define __WCHAR_WIDTH__ 32
@@ -9041,7 +9041,7 @@
 // X86_64-CLOUDABI:#define __UINT_LEAST8_MAX__ 255
 // X86_64-CLOUDABI:#define __UINT_LEAST8_TYPE__ unsigned char
 // X86_64-CLOUDABI:#define __USER_LABEL_PREFIX__
-// X86_64-CLOUDABI:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// X86_64-CLOUDABI:#define __VERSION__ "{{[0-9]+\.[0-9.]+}} Compatible{{.*}}
 // X86_64-CLOUDABI:#define __WCHAR_MAX__ 2147483647
 // X86_64-CLOUDABI:#define __WCHAR_TYPE__ int
 // X86_64-CLOUDABI:#define __WCHAR_WIDTH__ 32
Index: lib/Frontend/InitPreprocessor.cpp
===
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -604,11 +604,11 @@
   // Support for #pragma redefine_extname (Sun compatibility)
   Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1");
 
-  // As sad as it is, enough software depends on the __VERSION__ for version
-  // checks that it is necessary to report 4.2.1 (the base GCC version we claim
-  // compatibility with) first.
-  Builder.defineMacro("__VERSION__", "\"4.2.1 Compatible " +
-  Twine(getClangFullCPPVersion()) + "\"");
+  // We used to report 4.2.1 as compatibility with gcc
+  // Now, we returns the clang version.
+  Builder.defineMacro("__VERSION__", "\"" CLANG_VERSION_STRING
+  " Compatible " + Twine(getClangFullCPPVersion()) +
+  "\"");
 
   // Initialize language-specific preprocessor defines.
 


Index: test/Preprocessor/init.c
===
--- test/Preprocessor/init.c
+++ test/Preprocessor/init.c
@@ -8169,7 +8169,7 @@
 // SPARC:#define __UINT_LEAST8_MAX__ 255
 // SPARC:#define __UINT_LEAST8_TYPE__ unsigned char
 // SPARC:#define __USER_LABEL_PREFIX__
-// SPARC:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// SPARC:#define __VERSION__ "{{[0-9]+\.[0-9.]+}} Compatible{{.*}}
 // SPARC:#define __WCHAR_MAX__ 2147483647
 // SPARC:#define __WCHAR_TYPE__ int
 // SPARC:#define __WCHAR_WIDTH__ 32
@@ -9041,7 +9041,7 @@
 // X86_64-CLOUDABI:#define __UINT_LEAST8_MAX__ 255
 // X86_64-CLOUDABI:#define __UINT_LEAST8_TYPE__ unsigned char
 // X86_64-CLOUDABI:#define __USER_LABEL_PREFIX__
-// X86_64-CLOUDABI:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// X86_64-CLOUDABI:#define __VERSION__ "{{[0-9]+\.[0-9.]+}} Compatible{{.*}}
 // X86_64-CLOUDABI:#define __WCHAR_MAX__ 2147483647
 // X86_64-CLOUDABI:#define __WCHAR_TYPE__ int
 // X86_64-CLOUDABI:#define __WCHAR_WIDTH__ 32
Index: lib/Frontend/InitPreprocessor.cpp
===
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -604,11 +604,11 @@
   // Support for #pragma redefine_extname (Sun compatibility)
   Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1");
 
-  // As sad as it is, enough software depends on the __VERSION__ for version
-  // checks that it is necessary to report 4.2.1 (the base GCC version we claim
-  // compatibility with) first.
-  Builder.defineMacro("__VERSION__", "\"4.2.1 Compatible " +
-  Twine(getClangFullCPPVersion()) + "\"");
+  // We used to report 4.2.1 as compatibility with gcc
+  // Now, we returns the clang version.
+  Builder.defineMacro("__VERSION__", "\"" CLANG_VERSION_STRING
+  " Compatible " + Twine(getClangFullCPPVersion()) +
+  "\"");
 
   // Initialize language-specific preprocessor defines.
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D60379: Make precompiled headers reproducible

2019-06-08 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru abandoned this revision.
sylvestre.ledru added a comment.

yeah
thanks


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60379/new/

https://reviews.llvm.org/D60379



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


[PATCH] D59702: Unbreak the build of compiler-rt on Linux/mips64el

2019-06-08 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru abandoned this revision.
sylvestre.ledru added a comment.

indeed, closing


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59702/new/

https://reviews.llvm.org/D59702



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


[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-06-08 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 203693.
sylvestre.ledru added a comment.

update of the release notes


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63048/new/

https://reviews.llvm.org/D63048

Files:
  docs/ReleaseNotes.rst
  lib/Frontend/InitPreprocessor.cpp
  test/Preprocessor/init.c


Index: test/Preprocessor/init.c
===
--- test/Preprocessor/init.c
+++ test/Preprocessor/init.c
@@ -8169,7 +8169,7 @@
 // SPARC:#define __UINT_LEAST8_MAX__ 255
 // SPARC:#define __UINT_LEAST8_TYPE__ unsigned char
 // SPARC:#define __USER_LABEL_PREFIX__
-// SPARC:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// SPARC:#define __VERSION__ "{{[0-9]+\.[0-9.]+}} Compatible{{.*}}
 // SPARC:#define __WCHAR_MAX__ 2147483647
 // SPARC:#define __WCHAR_TYPE__ int
 // SPARC:#define __WCHAR_WIDTH__ 32
@@ -9041,7 +9041,7 @@
 // X86_64-CLOUDABI:#define __UINT_LEAST8_MAX__ 255
 // X86_64-CLOUDABI:#define __UINT_LEAST8_TYPE__ unsigned char
 // X86_64-CLOUDABI:#define __USER_LABEL_PREFIX__
-// X86_64-CLOUDABI:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// X86_64-CLOUDABI:#define __VERSION__ "{{[0-9]+\.[0-9.]+}} Compatible{{.*}}
 // X86_64-CLOUDABI:#define __WCHAR_MAX__ 2147483647
 // X86_64-CLOUDABI:#define __WCHAR_TYPE__ int
 // X86_64-CLOUDABI:#define __WCHAR_WIDTH__ 32
Index: lib/Frontend/InitPreprocessor.cpp
===
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -604,11 +604,11 @@
   // Support for #pragma redefine_extname (Sun compatibility)
   Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1");
 
-  // As sad as it is, enough software depends on the __VERSION__ for version
-  // checks that it is necessary to report 4.2.1 (the base GCC version we claim
-  // compatibility with) first.
-  Builder.defineMacro("__VERSION__", "\"4.2.1 Compatible " +
-  Twine(getClangFullCPPVersion()) + "\"");
+  // We used to report 4.2.1 as compatibility with gcc
+  // Now, we returns the clang version.
+  Builder.defineMacro("__VERSION__", "\"" CLANG_VERSION_STRING
+  " Compatible " + Twine(getClangFullCPPVersion()) +
+  "\"");
 
   // Initialize language-specific preprocessor defines.
 
Index: docs/ReleaseNotes.rst
===
--- docs/ReleaseNotes.rst
+++ docs/ReleaseNotes.rst
@@ -76,6 +76,7 @@
 ---
 
 - ``clang -dumpversion`` now returns the version of Clang itself.
+  Similarly, __VERSION__ returns the Clang version instead of 4.2.1.
 
 - ...
 


Index: test/Preprocessor/init.c
===
--- test/Preprocessor/init.c
+++ test/Preprocessor/init.c
@@ -8169,7 +8169,7 @@
 // SPARC:#define __UINT_LEAST8_MAX__ 255
 // SPARC:#define __UINT_LEAST8_TYPE__ unsigned char
 // SPARC:#define __USER_LABEL_PREFIX__
-// SPARC:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// SPARC:#define __VERSION__ "{{[0-9]+\.[0-9.]+}} Compatible{{.*}}
 // SPARC:#define __WCHAR_MAX__ 2147483647
 // SPARC:#define __WCHAR_TYPE__ int
 // SPARC:#define __WCHAR_WIDTH__ 32
@@ -9041,7 +9041,7 @@
 // X86_64-CLOUDABI:#define __UINT_LEAST8_MAX__ 255
 // X86_64-CLOUDABI:#define __UINT_LEAST8_TYPE__ unsigned char
 // X86_64-CLOUDABI:#define __USER_LABEL_PREFIX__
-// X86_64-CLOUDABI:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// X86_64-CLOUDABI:#define __VERSION__ "{{[0-9]+\.[0-9.]+}} Compatible{{.*}}
 // X86_64-CLOUDABI:#define __WCHAR_MAX__ 2147483647
 // X86_64-CLOUDABI:#define __WCHAR_TYPE__ int
 // X86_64-CLOUDABI:#define __WCHAR_WIDTH__ 32
Index: lib/Frontend/InitPreprocessor.cpp
===
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -604,11 +604,11 @@
   // Support for #pragma redefine_extname (Sun compatibility)
   Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1");
 
-  // As sad as it is, enough software depends on the __VERSION__ for version
-  // checks that it is necessary to report 4.2.1 (the base GCC version we claim
-  // compatibility with) first.
-  Builder.defineMacro("__VERSION__", "\"4.2.1 Compatible " +
-  Twine(getClangFullCPPVersion()) + "\"");
+  // We used to report 4.2.1 as compatibility with gcc
+  // Now, we returns the clang version.
+  Builder.defineMacro("__VERSION__", "\"" CLANG_VERSION_STRING
+  " Compatible " + Twine(getClangFullCPPVersion()) +
+  "\"");
 
   // Initialize language-specific preprocessor defines.
 
Index: docs/ReleaseNotes.rst
===
--- docs/ReleaseNotes.rst
+++ docs/ReleaseNotes.rst
@@ -76,6 +76,7 @@
 ---
 
 - ``clang -dumpversion`` now returns the version of Clang itself.
+  Similarly, __VERSION__ returns the Clang versi

[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-06-08 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

In D63048#1535222 , @xbolva00 wrote:

> Btw, what about this code
>
>   // Currently claim to be compatible with GCC 4.2.1-5621, but only if we're
>   // not compiling for MSVC compatibility
>   Builder.defineMacro("__GNUC_MINOR__", "2");
>   Builder.defineMacro("__GNUC_PATCHLEVEL__", "1");
>   Builder.defineMacro("__GNUC__", "4");
>
>
> ?


Dunno, what do you think @rnk  ?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63048/new/

https://reviews.llvm.org/D63048



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


[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-06-08 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 203695.
sylvestre.ledru added a comment.

Fix the typo (thanks hubert)


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63048/new/

https://reviews.llvm.org/D63048

Files:
  docs/ReleaseNotes.rst
  lib/Frontend/InitPreprocessor.cpp
  test/Preprocessor/init.c


Index: test/Preprocessor/init.c
===
--- test/Preprocessor/init.c
+++ test/Preprocessor/init.c
@@ -8169,7 +8169,7 @@
 // SPARC:#define __UINT_LEAST8_MAX__ 255
 // SPARC:#define __UINT_LEAST8_TYPE__ unsigned char
 // SPARC:#define __USER_LABEL_PREFIX__
-// SPARC:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// SPARC:#define __VERSION__ "{{[0-9]+\.[0-9.]+}} Compatible{{.*}}
 // SPARC:#define __WCHAR_MAX__ 2147483647
 // SPARC:#define __WCHAR_TYPE__ int
 // SPARC:#define __WCHAR_WIDTH__ 32
@@ -9041,7 +9041,7 @@
 // X86_64-CLOUDABI:#define __UINT_LEAST8_MAX__ 255
 // X86_64-CLOUDABI:#define __UINT_LEAST8_TYPE__ unsigned char
 // X86_64-CLOUDABI:#define __USER_LABEL_PREFIX__
-// X86_64-CLOUDABI:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// X86_64-CLOUDABI:#define __VERSION__ "{{[0-9]+\.[0-9.]+}} Compatible{{.*}}
 // X86_64-CLOUDABI:#define __WCHAR_MAX__ 2147483647
 // X86_64-CLOUDABI:#define __WCHAR_TYPE__ int
 // X86_64-CLOUDABI:#define __WCHAR_WIDTH__ 32
Index: lib/Frontend/InitPreprocessor.cpp
===
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -604,11 +604,11 @@
   // Support for #pragma redefine_extname (Sun compatibility)
   Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1");
 
-  // As sad as it is, enough software depends on the __VERSION__ for version
-  // checks that it is necessary to report 4.2.1 (the base GCC version we claim
-  // compatibility with) first.
-  Builder.defineMacro("__VERSION__", "\"4.2.1 Compatible " +
-  Twine(getClangFullCPPVersion()) + "\"");
+  // We used to report 4.2.1 for compatibility with GCC.
+  // Now, we return the Clang version.
+  Builder.defineMacro("__VERSION__", "\"" CLANG_VERSION_STRING
+  " Compatible " + Twine(getClangFullCPPVersion()) +
+  "\"");
 
   // Initialize language-specific preprocessor defines.
 
Index: docs/ReleaseNotes.rst
===
--- docs/ReleaseNotes.rst
+++ docs/ReleaseNotes.rst
@@ -76,6 +76,7 @@
 ---
 
 - ``clang -dumpversion`` now returns the version of Clang itself.
+  Similarly, `__VERSION__` returns the Clang version instead of 4.2.1.
 
 - ...
 


Index: test/Preprocessor/init.c
===
--- test/Preprocessor/init.c
+++ test/Preprocessor/init.c
@@ -8169,7 +8169,7 @@
 // SPARC:#define __UINT_LEAST8_MAX__ 255
 // SPARC:#define __UINT_LEAST8_TYPE__ unsigned char
 // SPARC:#define __USER_LABEL_PREFIX__
-// SPARC:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// SPARC:#define __VERSION__ "{{[0-9]+\.[0-9.]+}} Compatible{{.*}}
 // SPARC:#define __WCHAR_MAX__ 2147483647
 // SPARC:#define __WCHAR_TYPE__ int
 // SPARC:#define __WCHAR_WIDTH__ 32
@@ -9041,7 +9041,7 @@
 // X86_64-CLOUDABI:#define __UINT_LEAST8_MAX__ 255
 // X86_64-CLOUDABI:#define __UINT_LEAST8_TYPE__ unsigned char
 // X86_64-CLOUDABI:#define __USER_LABEL_PREFIX__
-// X86_64-CLOUDABI:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// X86_64-CLOUDABI:#define __VERSION__ "{{[0-9]+\.[0-9.]+}} Compatible{{.*}}
 // X86_64-CLOUDABI:#define __WCHAR_MAX__ 2147483647
 // X86_64-CLOUDABI:#define __WCHAR_TYPE__ int
 // X86_64-CLOUDABI:#define __WCHAR_WIDTH__ 32
Index: lib/Frontend/InitPreprocessor.cpp
===
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -604,11 +604,11 @@
   // Support for #pragma redefine_extname (Sun compatibility)
   Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1");
 
-  // As sad as it is, enough software depends on the __VERSION__ for version
-  // checks that it is necessary to report 4.2.1 (the base GCC version we claim
-  // compatibility with) first.
-  Builder.defineMacro("__VERSION__", "\"4.2.1 Compatible " +
-  Twine(getClangFullCPPVersion()) + "\"");
+  // We used to report 4.2.1 for compatibility with GCC.
+  // Now, we return the Clang version.
+  Builder.defineMacro("__VERSION__", "\"" CLANG_VERSION_STRING
+  " Compatible " + Twine(getClangFullCPPVersion()) +
+  "\"");
 
   // Initialize language-specific preprocessor defines.
 
Index: docs/ReleaseNotes.rst
===
--- docs/ReleaseNotes.rst
+++ docs/ReleaseNotes.rst
@@ -76,6 +76,7 @@
 ---
 
 - ``clang -dumpversion`` now returns the version of Clang itself.
+  Similarly, `__VERSION__` returns the Clan

[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-06-08 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 203700.
sylvestre.ledru added a comment.

fix rst syntax


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63048/new/

https://reviews.llvm.org/D63048

Files:
  docs/ReleaseNotes.rst
  lib/Frontend/InitPreprocessor.cpp
  test/Preprocessor/init.c


Index: test/Preprocessor/init.c
===
--- test/Preprocessor/init.c
+++ test/Preprocessor/init.c
@@ -8169,7 +8169,7 @@
 // SPARC:#define __UINT_LEAST8_MAX__ 255
 // SPARC:#define __UINT_LEAST8_TYPE__ unsigned char
 // SPARC:#define __USER_LABEL_PREFIX__
-// SPARC:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// SPARC:#define __VERSION__ "{{[0-9]+\.[0-9.]+}} Compatible{{.*}}
 // SPARC:#define __WCHAR_MAX__ 2147483647
 // SPARC:#define __WCHAR_TYPE__ int
 // SPARC:#define __WCHAR_WIDTH__ 32
@@ -9041,7 +9041,7 @@
 // X86_64-CLOUDABI:#define __UINT_LEAST8_MAX__ 255
 // X86_64-CLOUDABI:#define __UINT_LEAST8_TYPE__ unsigned char
 // X86_64-CLOUDABI:#define __USER_LABEL_PREFIX__
-// X86_64-CLOUDABI:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// X86_64-CLOUDABI:#define __VERSION__ "{{[0-9]+\.[0-9.]+}} Compatible{{.*}}
 // X86_64-CLOUDABI:#define __WCHAR_MAX__ 2147483647
 // X86_64-CLOUDABI:#define __WCHAR_TYPE__ int
 // X86_64-CLOUDABI:#define __WCHAR_WIDTH__ 32
Index: lib/Frontend/InitPreprocessor.cpp
===
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -604,11 +604,11 @@
   // Support for #pragma redefine_extname (Sun compatibility)
   Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1");
 
-  // As sad as it is, enough software depends on the __VERSION__ for version
-  // checks that it is necessary to report 4.2.1 (the base GCC version we claim
-  // compatibility with) first.
-  Builder.defineMacro("__VERSION__", "\"4.2.1 Compatible " +
-  Twine(getClangFullCPPVersion()) + "\"");
+  // We used to report 4.2.1 for compatibility with GCC.
+  // Now, we return the Clang version.
+  Builder.defineMacro("__VERSION__", "\"" CLANG_VERSION_STRING
+  " Compatible " + Twine(getClangFullCPPVersion()) +
+  "\"");
 
   // Initialize language-specific preprocessor defines.
 
Index: docs/ReleaseNotes.rst
===
--- docs/ReleaseNotes.rst
+++ docs/ReleaseNotes.rst
@@ -76,6 +76,7 @@
 ---
 
 - ``clang -dumpversion`` now returns the version of Clang itself.
+  Similarly, ``__VERSION__`` returns the Clang version instead of 4.2.1.
 
 - ...
 


Index: test/Preprocessor/init.c
===
--- test/Preprocessor/init.c
+++ test/Preprocessor/init.c
@@ -8169,7 +8169,7 @@
 // SPARC:#define __UINT_LEAST8_MAX__ 255
 // SPARC:#define __UINT_LEAST8_TYPE__ unsigned char
 // SPARC:#define __USER_LABEL_PREFIX__
-// SPARC:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// SPARC:#define __VERSION__ "{{[0-9]+\.[0-9.]+}} Compatible{{.*}}
 // SPARC:#define __WCHAR_MAX__ 2147483647
 // SPARC:#define __WCHAR_TYPE__ int
 // SPARC:#define __WCHAR_WIDTH__ 32
@@ -9041,7 +9041,7 @@
 // X86_64-CLOUDABI:#define __UINT_LEAST8_MAX__ 255
 // X86_64-CLOUDABI:#define __UINT_LEAST8_TYPE__ unsigned char
 // X86_64-CLOUDABI:#define __USER_LABEL_PREFIX__
-// X86_64-CLOUDABI:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// X86_64-CLOUDABI:#define __VERSION__ "{{[0-9]+\.[0-9.]+}} Compatible{{.*}}
 // X86_64-CLOUDABI:#define __WCHAR_MAX__ 2147483647
 // X86_64-CLOUDABI:#define __WCHAR_TYPE__ int
 // X86_64-CLOUDABI:#define __WCHAR_WIDTH__ 32
Index: lib/Frontend/InitPreprocessor.cpp
===
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -604,11 +604,11 @@
   // Support for #pragma redefine_extname (Sun compatibility)
   Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1");
 
-  // As sad as it is, enough software depends on the __VERSION__ for version
-  // checks that it is necessary to report 4.2.1 (the base GCC version we claim
-  // compatibility with) first.
-  Builder.defineMacro("__VERSION__", "\"4.2.1 Compatible " +
-  Twine(getClangFullCPPVersion()) + "\"");
+  // We used to report 4.2.1 for compatibility with GCC.
+  // Now, we return the Clang version.
+  Builder.defineMacro("__VERSION__", "\"" CLANG_VERSION_STRING
+  " Compatible " + Twine(getClangFullCPPVersion()) +
+  "\"");
 
   // Initialize language-specific preprocessor defines.
 
Index: docs/ReleaseNotes.rst
===
--- docs/ReleaseNotes.rst
+++ docs/ReleaseNotes.rst
@@ -76,6 +76,7 @@
 ---
 
 - ``clang -dumpversion`` now returns the version of Clang itself.
+  Similarly, ``__VERSION__`` returns the Clang version 

[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-06-08 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru marked an inline comment as done.
sylvestre.ledru added inline comments.



Comment at: lib/Frontend/InitPreprocessor.cpp:610
+  Builder.defineMacro("__VERSION__", "\"" CLANG_VERSION_STRING
+  " Compatible " + Twine(getClangFullCPPVersion()) +
+  "\"");

lebedev.ri wrote:
> So how does the entire `__VERSION__` macro looks like now?
```
#define __VERSION__ "9.0.0 Compatible Clang 9.0.0 (trunk 362877)"

```
instead of

```
#define __VERSION__ "4.2.1 Compatible Clang 9.0.0 (trunk 362877)"
```



```
clang -dM -E -xc - < /dev/null 
```
to see it


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63048/new/

https://reviews.llvm.org/D63048



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


[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-06-11 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

I will wait for @dexonsmith 's opinion


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63048/new/

https://reviews.llvm.org/D63048



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


[PATCH] D64062: Remove both -dumpversion and __VERSION__

2019-07-11 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

In D64062#1581290 , @rnk wrote:

> Perhaps we should just remove `__VERSION__` and keep `-dumpversion`.


As you wish. clang --version seems an alternative and dumpversion never 
//worked// for clang. so, I don't expect software to use it for clang.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64062/new/

https://reviews.llvm.org/D64062



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


[PATCH] D64062: Remove both -dumpversion and __VERSION__

2019-07-12 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 209473.
sylvestre.ledru added a comment.

Keep -dumpversion


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64062/new/

https://reviews.llvm.org/D64062

Files:
  docs/ClangCommandLineReference.rst
  docs/LanguageExtensions.rst
  docs/ReleaseNotes.rst
  include/clang/Driver/Options.td
  lib/Basic/Version.cpp
  lib/Driver/Driver.cpp
  lib/Frontend/InitPreprocessor.cpp
  test/Driver/immediate-options.c
  test/Index/complete-exprs.c
  test/Preprocessor/init.c
  utils/builtin-defines.c

Index: utils/builtin-defines.c
===
--- utils/builtin-defines.c
+++ utils/builtin-defines.c
@@ -49,7 +49,6 @@
 #undef __INT8_TYPE__
 #undef __SSP__
 #undef __APPLE_CC__
-#undef __VERSION__
 #undef __clang__
 #undef __llvm__
 #undef __nocona
Index: test/Preprocessor/init.c
===
--- test/Preprocessor/init.c
+++ test/Preprocessor/init.c
@@ -101,7 +101,6 @@
 // COMMON:#define __ORDER_PDP_ENDIAN__ 3412
 // COMMON:#define __STDC_HOSTED__ 1
 // COMMON:#define __STDC__ 1
-// COMMON:#define __VERSION__ {{.*}}
 // COMMON:#define __clang__ 1
 // COMMON:#define __clang_major__ {{[0-9]+}}
 // COMMON:#define __clang_minor__ {{[0-9]+}}
@@ -8169,7 +8168,6 @@
 // SPARC:#define __UINT_LEAST8_MAX__ 255
 // SPARC:#define __UINT_LEAST8_TYPE__ unsigned char
 // SPARC:#define __USER_LABEL_PREFIX__
-// SPARC:#define __VERSION__ "4.2.1 Compatible{{.*}}
 // SPARC:#define __WCHAR_MAX__ 2147483647
 // SPARC:#define __WCHAR_TYPE__ int
 // SPARC:#define __WCHAR_WIDTH__ 32
@@ -9041,7 +9039,6 @@
 // X86_64-CLOUDABI:#define __UINT_LEAST8_MAX__ 255
 // X86_64-CLOUDABI:#define __UINT_LEAST8_TYPE__ unsigned char
 // X86_64-CLOUDABI:#define __USER_LABEL_PREFIX__
-// X86_64-CLOUDABI:#define __VERSION__ "4.2.1 Compatible{{.*}}
 // X86_64-CLOUDABI:#define __WCHAR_MAX__ 2147483647
 // X86_64-CLOUDABI:#define __WCHAR_TYPE__ int
 // X86_64-CLOUDABI:#define __WCHAR_WIDTH__ 32
@@ -10043,7 +10040,6 @@
 // WEBASSEMBLY-NEXT:#define __UINT_LEAST8_MAX__ 255
 // WEBASSEMBLY-NEXT:#define __UINT_LEAST8_TYPE__ unsigned char
 // WEBASSEMBLY-NEXT:#define __USER_LABEL_PREFIX__
-// WEBASSEMBLY-NEXT:#define __VERSION__ "{{.*}}"
 // WEBASSEMBLY-NEXT:#define __WCHAR_MAX__ 2147483647
 // WEBASSEMBLY-NEXT:#define __WCHAR_TYPE__ int
 // WEBASSEMBLY-NOT:#define __WCHAR_UNSIGNED__
Index: test/Index/complete-exprs.c
===
--- test/Index/complete-exprs.c
+++ test/Index/complete-exprs.c
@@ -27,7 +27,6 @@
 // RUN: c-index-test -code-completion-at=%s:7:10 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
 // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:7:10 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
 // CHECK-CC1: NotImplemented:{TypedText __PRETTY_FUNCTION__} (65)
-// CHECK-CC1: macro definition:{TypedText __VERSION__} (70)
 // CHECK-CC1: FunctionDecl:{ResultType int}{TypedText f}{LeftParen (}{Placeholder int}{RightParen )} (12) (unavailable)
 // CHECK-CC1-NOT: NotImplemented:{TypedText float} (65)
 // CHECK-CC1: ParmDecl:{ResultType int}{TypedText j} (8)
@@ -39,7 +38,6 @@
 // RUN: c-index-test -code-completion-at=%s:7:18 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
 // RUN: c-index-test -code-completion-at=%s:7:22 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
 // RUN: c-index-test -code-completion-at=%s:7:2 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC2 %s
-// CHECK-CC2: macro definition:{TypedText __VERSION__} (70)
 // CHECK-CC2: FunctionDecl:{ResultType int}{TypedText f}{LeftParen (}{Placeholder int}{RightParen )} (50)
 // CHECK-CC2: NotImplemented:{TypedText float} (50)
 // CHECK-CC2: ParmDecl:{ResultType int}{TypedText j} (34)
Index: test/Driver/immediate-options.c
===
--- test/Driver/immediate-options.c
+++ test/Driver/immediate-options.c
@@ -6,9 +6,6 @@
 // RUN: %clang --help-hidden | FileCheck %s -check-prefix=HELP-HIDDEN
 // HELP-HIDDEN: driver-mode
 
-// RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
-// DUMPVERSION: {{[0-9]+\.[0-9.]+}}
-
 // RUN: %clang -print-search-dirs | FileCheck %s -check-prefix=PRINT-SEARCH-DIRS
 // PRINT-SEARCH-DIRS: programs: ={{.*}}
 // PRINT-SEARCH-DIRS: libraries: ={{.*}}
Index: lib/Frontend/InitPreprocessor.cpp
===
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -604,12 +604,6 @@
   // Support for #pragma redefine_extname (Sun compatibility)
   Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1");
 
-  // As sad as it is, enough software depends on the __VERSION__ for version
-  // checks that it is necessary to report 4.2.1 (

[PATCH] D64062: Remove both -dumpversion and __VERSION__

2019-07-12 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 209474.
sylvestre.ledru added a comment.

Actually remove it


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64062/new/

https://reviews.llvm.org/D64062

Files:
  docs/LanguageExtensions.rst
  docs/ReleaseNotes.rst
  lib/Basic/Version.cpp
  lib/Frontend/InitPreprocessor.cpp
  test/Index/complete-exprs.c
  test/Preprocessor/init.c
  utils/builtin-defines.c

Index: utils/builtin-defines.c
===
--- utils/builtin-defines.c
+++ utils/builtin-defines.c
@@ -49,7 +49,6 @@
 #undef __INT8_TYPE__
 #undef __SSP__
 #undef __APPLE_CC__
-#undef __VERSION__
 #undef __clang__
 #undef __llvm__
 #undef __nocona
Index: test/Preprocessor/init.c
===
--- test/Preprocessor/init.c
+++ test/Preprocessor/init.c
@@ -101,7 +101,6 @@
 // COMMON:#define __ORDER_PDP_ENDIAN__ 3412
 // COMMON:#define __STDC_HOSTED__ 1
 // COMMON:#define __STDC__ 1
-// COMMON:#define __VERSION__ {{.*}}
 // COMMON:#define __clang__ 1
 // COMMON:#define __clang_major__ {{[0-9]+}}
 // COMMON:#define __clang_minor__ {{[0-9]+}}
@@ -8169,7 +8168,6 @@
 // SPARC:#define __UINT_LEAST8_MAX__ 255
 // SPARC:#define __UINT_LEAST8_TYPE__ unsigned char
 // SPARC:#define __USER_LABEL_PREFIX__
-// SPARC:#define __VERSION__ "4.2.1 Compatible{{.*}}
 // SPARC:#define __WCHAR_MAX__ 2147483647
 // SPARC:#define __WCHAR_TYPE__ int
 // SPARC:#define __WCHAR_WIDTH__ 32
@@ -9041,7 +9039,6 @@
 // X86_64-CLOUDABI:#define __UINT_LEAST8_MAX__ 255
 // X86_64-CLOUDABI:#define __UINT_LEAST8_TYPE__ unsigned char
 // X86_64-CLOUDABI:#define __USER_LABEL_PREFIX__
-// X86_64-CLOUDABI:#define __VERSION__ "4.2.1 Compatible{{.*}}
 // X86_64-CLOUDABI:#define __WCHAR_MAX__ 2147483647
 // X86_64-CLOUDABI:#define __WCHAR_TYPE__ int
 // X86_64-CLOUDABI:#define __WCHAR_WIDTH__ 32
@@ -10043,7 +10040,6 @@
 // WEBASSEMBLY-NEXT:#define __UINT_LEAST8_MAX__ 255
 // WEBASSEMBLY-NEXT:#define __UINT_LEAST8_TYPE__ unsigned char
 // WEBASSEMBLY-NEXT:#define __USER_LABEL_PREFIX__
-// WEBASSEMBLY-NEXT:#define __VERSION__ "{{.*}}"
 // WEBASSEMBLY-NEXT:#define __WCHAR_MAX__ 2147483647
 // WEBASSEMBLY-NEXT:#define __WCHAR_TYPE__ int
 // WEBASSEMBLY-NOT:#define __WCHAR_UNSIGNED__
Index: test/Index/complete-exprs.c
===
--- test/Index/complete-exprs.c
+++ test/Index/complete-exprs.c
@@ -27,7 +27,6 @@
 // RUN: c-index-test -code-completion-at=%s:7:10 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
 // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:7:10 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
 // CHECK-CC1: NotImplemented:{TypedText __PRETTY_FUNCTION__} (65)
-// CHECK-CC1: macro definition:{TypedText __VERSION__} (70)
 // CHECK-CC1: FunctionDecl:{ResultType int}{TypedText f}{LeftParen (}{Placeholder int}{RightParen )} (12) (unavailable)
 // CHECK-CC1-NOT: NotImplemented:{TypedText float} (65)
 // CHECK-CC1: ParmDecl:{ResultType int}{TypedText j} (8)
@@ -39,7 +38,6 @@
 // RUN: c-index-test -code-completion-at=%s:7:18 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
 // RUN: c-index-test -code-completion-at=%s:7:22 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
 // RUN: c-index-test -code-completion-at=%s:7:2 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC2 %s
-// CHECK-CC2: macro definition:{TypedText __VERSION__} (70)
 // CHECK-CC2: FunctionDecl:{ResultType int}{TypedText f}{LeftParen (}{Placeholder int}{RightParen )} (50)
 // CHECK-CC2: NotImplemented:{TypedText float} (50)
 // CHECK-CC2: ParmDecl:{ResultType int}{TypedText j} (34)
Index: lib/Frontend/InitPreprocessor.cpp
===
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -604,12 +604,6 @@
   // Support for #pragma redefine_extname (Sun compatibility)
   Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1");
 
-  // As sad as it is, enough software depends on the __VERSION__ for version
-  // checks that it is necessary to report 4.2.1 (the base GCC version we claim
-  // compatibility with) first.
-  Builder.defineMacro("__VERSION__", "\"4.2.1 Compatible " +
-  Twine(getClangFullCPPVersion()) + "\"");
-
   // Initialize language-specific preprocessor defines.
 
   // Standard conforming mode?
Index: lib/Basic/Version.cpp
===
--- lib/Basic/Version.cpp
+++ lib/Basic/Version.cpp
@@ -136,8 +136,6 @@
 }
 
 std::string getClangFullCPPVersion() {
-  // The version string we report in __VERSION__ is just a compacted version of
-  // the one we report on the command line.
   std::string buf;
   llvm::raw_string_ostream OS(buf);
 #ifdef CLANG_VENDOR

[PATCH] D64062: Remove __VERSION__

2019-07-12 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@rnk Should be good this time :)


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64062/new/

https://reviews.llvm.org/D64062



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


[PATCH] D64062: Remove __VERSION__

2019-07-12 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

Thanks @rnk :)


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64062/new/

https://reviews.llvm.org/D64062



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


[PATCH] D64687: [clang] Revert "Remove __VERSION__"

2019-07-12 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru accepted this revision.
sylvestre.ledru added a comment.
This revision is now accepted and ready to land.

I went ahead and committed your revert in r365992. Thanks!

Next time, please remove the clang/ from your patch
arc could not apply it:

  Committing 'D64687: [clang] Revert "Remove __VERSION__"'...
  Revision includes changes to paths that do not exist:
  
  clang/docs/LanguageExtensions.rst


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64687/new/

https://reviews.llvm.org/D64687



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


[PATCH] D64062: Remove __VERSION__

2019-07-12 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru reopened this revision.
sylvestre.ledru added a comment.
This revision is now accepted and ready to land.

@rnk looks like it is too risky to remove it.
What about changing it from

  #define __VERSION__ "4.2.1 Compatible Clang 7.0.1 (tags/RELEASE_701/final)"

to

  #define __VERSION__ "Clang 7.0.1 (tags/RELEASE_701/final)"

Hopefully, it won't break much stuff


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64062/new/

https://reviews.llvm.org/D64062



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


[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-07-14 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 209715.
sylvestre.ledru added a comment.

Implement the change (just update __VERSION__)


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63048/new/

https://reviews.llvm.org/D63048

Files:
  docs/LanguageExtensions.rst
  docs/ReleaseNotes.rst
  lib/Frontend/InitPreprocessor.cpp
  test/Preprocessor/init.c


Index: test/Preprocessor/init.c
===
--- test/Preprocessor/init.c
+++ test/Preprocessor/init.c
@@ -8169,7 +8169,7 @@
 // SPARC:#define __UINT_LEAST8_MAX__ 255
 // SPARC:#define __UINT_LEAST8_TYPE__ unsigned char
 // SPARC:#define __USER_LABEL_PREFIX__
-// SPARC:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// SPARC:#define __VERSION__ "Clang{{.*}}
 // SPARC:#define __WCHAR_MAX__ 2147483647
 // SPARC:#define __WCHAR_TYPE__ int
 // SPARC:#define __WCHAR_WIDTH__ 32
@@ -9041,7 +9041,7 @@
 // X86_64-CLOUDABI:#define __UINT_LEAST8_MAX__ 255
 // X86_64-CLOUDABI:#define __UINT_LEAST8_TYPE__ unsigned char
 // X86_64-CLOUDABI:#define __USER_LABEL_PREFIX__
-// X86_64-CLOUDABI:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// X86_64-CLOUDABI:#define __VERSION__ "Clang{{.*}}
 // X86_64-CLOUDABI:#define __WCHAR_MAX__ 2147483647
 // X86_64-CLOUDABI:#define __WCHAR_TYPE__ int
 // X86_64-CLOUDABI:#define __WCHAR_WIDTH__ 32
Index: lib/Frontend/InitPreprocessor.cpp
===
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -604,10 +604,9 @@
   // Support for #pragma redefine_extname (Sun compatibility)
   Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1");
 
-  // As sad as it is, enough software depends on the __VERSION__ for version
-  // checks that it is necessary to report 4.2.1 (the base GCC version we claim
-  // compatibility with) first.
-  Builder.defineMacro("__VERSION__", "\"4.2.1 Compatible " +
+  // Previously this macro was set to a string aiming to achieve compatibility
+  // with GCC 4.2.1. Now, just return the full Clang version
+  Builder.defineMacro("__VERSION__", "\"" +
   Twine(getClangFullCPPVersion()) + "\"");
 
   // Initialize language-specific preprocessor defines.
Index: docs/ReleaseNotes.rst
===
--- docs/ReleaseNotes.rst
+++ docs/ReleaseNotes.rst
@@ -56,6 +56,12 @@
 Non-comprehensive list of changes in this release
 -
 
+- The ``__VERSION__`` macro has been updated.
+  Previously this macro contained the string '4.2.1 Compatible' to achieve
+  compatibility with GCC 4.2.1, but that should no longer be necessary.
+  However, to retrieve Clang's version, please favor the one of the macro
+  defined in :ref:`clang namespaced version macros 
`.
+
 - ...
 
 
Index: docs/LanguageExtensions.rst
===
--- docs/LanguageExtensions.rst
+++ docs/LanguageExtensions.rst
@@ -324,6 +324,8 @@
   ...
   #endif
 
+.. _languageextensions-builtin-macros:
+
 Builtin Macros
 ==
 


Index: test/Preprocessor/init.c
===
--- test/Preprocessor/init.c
+++ test/Preprocessor/init.c
@@ -8169,7 +8169,7 @@
 // SPARC:#define __UINT_LEAST8_MAX__ 255
 // SPARC:#define __UINT_LEAST8_TYPE__ unsigned char
 // SPARC:#define __USER_LABEL_PREFIX__
-// SPARC:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// SPARC:#define __VERSION__ "Clang{{.*}}
 // SPARC:#define __WCHAR_MAX__ 2147483647
 // SPARC:#define __WCHAR_TYPE__ int
 // SPARC:#define __WCHAR_WIDTH__ 32
@@ -9041,7 +9041,7 @@
 // X86_64-CLOUDABI:#define __UINT_LEAST8_MAX__ 255
 // X86_64-CLOUDABI:#define __UINT_LEAST8_TYPE__ unsigned char
 // X86_64-CLOUDABI:#define __USER_LABEL_PREFIX__
-// X86_64-CLOUDABI:#define __VERSION__ "4.2.1 Compatible{{.*}}
+// X86_64-CLOUDABI:#define __VERSION__ "Clang{{.*}}
 // X86_64-CLOUDABI:#define __WCHAR_MAX__ 2147483647
 // X86_64-CLOUDABI:#define __WCHAR_TYPE__ int
 // X86_64-CLOUDABI:#define __WCHAR_WIDTH__ 32
Index: lib/Frontend/InitPreprocessor.cpp
===
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -604,10 +604,9 @@
   // Support for #pragma redefine_extname (Sun compatibility)
   Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1");
 
-  // As sad as it is, enough software depends on the __VERSION__ for version
-  // checks that it is necessary to report 4.2.1 (the base GCC version we claim
-  // compatibility with) first.
-  Builder.defineMacro("__VERSION__", "\"4.2.1 Compatible " +
+  // Previously this macro was set to a string aiming to achieve compatibility
+  // with GCC 4.2.1. Now, just return the full Clang version
+  Builder.defineMacro("__VERSION__", "\"" +
   Twine(getClangFullCPPVersion()) + "\"");
 
   // Initialize language-sp

[PATCH] D64278: Rename libclang_shared to libclang-cpp

2019-07-14 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@beanz By the way, maybe we should add this in the 9 release notes?
Thanks


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64278/new/

https://reviews.llvm.org/D64278



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


[PATCH] D66046: Add new tautological compare warning for bitwise-or with a non-zero constant

2019-08-16 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

You should also probably add a note in the release notes (maybe for the others 
changes too)
thanks for the work btw!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66046/new/

https://reviews.llvm.org/D66046



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


[PATCH] D59253: [AIX][libcxx] AIX system headers need stdint.h and inttypes.h to be re-enterable when macro _STD_TYPES_T is defined

2019-06-21 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

FYI, I had similar patches for Linux/Debian packaging.
Thanks!


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59253/new/

https://reviews.llvm.org/D59253



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


[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-06-26 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@dexonsmith ping?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63048/new/

https://reviews.llvm.org/D63048



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


[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-06-27 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@rnk how do you feel about removing both? I can take care of that if you want


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63048/new/

https://reviews.llvm.org/D63048



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


[PATCH] D61909: Add Clang shared library with C++ exports

2019-06-30 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

For now, it isn't part of the debian packaging.
https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/blob/snapshot/debian/rules#L563
it is removed as packaging phase as I have been told it isn't ready.

Anyway, the lib should not keep this name.
By definition, on linux, .so means shared. It should have a more explicit name.

@beanz Can you please rename it? thanks


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61909/new/

https://reviews.llvm.org/D61909



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


[PATCH] D64062: Remove both -dumpversion and __VERSION__

2019-07-02 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.
sylvestre.ledru added reviewers: rnk, dexonsmith.
Herald added subscribers: cfe-commits, arphaman, fedor.sergeev, aheejin, 
dschuff.
Herald added a project: clang.

It has been introduced in 2011 for gcc compat:
https://github.com/llvm-mirror/clang/commit/95a907fc0f2f717dca38a379c1d2353bfea06d4f
https://github.com/llvm-mirror/clang/commit/ad1a4c6e89594e704775ddb6b036ac982fd68cad
it is probably time to remove it to remove it.

reported: https://bugs.llvm.org/show_bug.cgi?id=38836
https://bugs.launchpad.net/ubuntu/+source/llvm-defaults/+bug/1810860


Repository:
  rC Clang

https://reviews.llvm.org/D64062

Files:
  docs/ClangCommandLineReference.rst
  docs/ReleaseNotes.rst
  include/clang/Driver/Options.td
  lib/Basic/Version.cpp
  lib/Driver/Driver.cpp
  lib/Frontend/InitPreprocessor.cpp
  test/Driver/immediate-options.c
  test/Index/complete-exprs.c
  test/Preprocessor/init.c
  utils/builtin-defines.c

Index: utils/builtin-defines.c
===
--- utils/builtin-defines.c
+++ utils/builtin-defines.c
@@ -49,7 +49,6 @@
 #undef __INT8_TYPE__
 #undef __SSP__
 #undef __APPLE_CC__
-#undef __VERSION__
 #undef __clang__
 #undef __llvm__
 #undef __nocona
Index: test/Preprocessor/init.c
===
--- test/Preprocessor/init.c
+++ test/Preprocessor/init.c
@@ -101,7 +101,6 @@
 // COMMON:#define __ORDER_PDP_ENDIAN__ 3412
 // COMMON:#define __STDC_HOSTED__ 1
 // COMMON:#define __STDC__ 1
-// COMMON:#define __VERSION__ {{.*}}
 // COMMON:#define __clang__ 1
 // COMMON:#define __clang_major__ {{[0-9]+}}
 // COMMON:#define __clang_minor__ {{[0-9]+}}
@@ -8169,7 +8168,6 @@
 // SPARC:#define __UINT_LEAST8_MAX__ 255
 // SPARC:#define __UINT_LEAST8_TYPE__ unsigned char
 // SPARC:#define __USER_LABEL_PREFIX__
-// SPARC:#define __VERSION__ "4.2.1 Compatible{{.*}}
 // SPARC:#define __WCHAR_MAX__ 2147483647
 // SPARC:#define __WCHAR_TYPE__ int
 // SPARC:#define __WCHAR_WIDTH__ 32
@@ -9041,7 +9039,6 @@
 // X86_64-CLOUDABI:#define __UINT_LEAST8_MAX__ 255
 // X86_64-CLOUDABI:#define __UINT_LEAST8_TYPE__ unsigned char
 // X86_64-CLOUDABI:#define __USER_LABEL_PREFIX__
-// X86_64-CLOUDABI:#define __VERSION__ "4.2.1 Compatible{{.*}}
 // X86_64-CLOUDABI:#define __WCHAR_MAX__ 2147483647
 // X86_64-CLOUDABI:#define __WCHAR_TYPE__ int
 // X86_64-CLOUDABI:#define __WCHAR_WIDTH__ 32
@@ -10043,7 +10040,6 @@
 // WEBASSEMBLY-NEXT:#define __UINT_LEAST8_MAX__ 255
 // WEBASSEMBLY-NEXT:#define __UINT_LEAST8_TYPE__ unsigned char
 // WEBASSEMBLY-NEXT:#define __USER_LABEL_PREFIX__
-// WEBASSEMBLY-NEXT:#define __VERSION__ "{{.*}}"
 // WEBASSEMBLY-NEXT:#define __WCHAR_MAX__ 2147483647
 // WEBASSEMBLY-NEXT:#define __WCHAR_TYPE__ int
 // WEBASSEMBLY-NOT:#define __WCHAR_UNSIGNED__
Index: test/Index/complete-exprs.c
===
--- test/Index/complete-exprs.c
+++ test/Index/complete-exprs.c
@@ -27,7 +27,6 @@
 // RUN: c-index-test -code-completion-at=%s:7:10 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
 // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:7:10 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
 // CHECK-CC1: NotImplemented:{TypedText __PRETTY_FUNCTION__} (65)
-// CHECK-CC1: macro definition:{TypedText __VERSION__} (70)
 // CHECK-CC1: FunctionDecl:{ResultType int}{TypedText f}{LeftParen (}{Placeholder int}{RightParen )} (12) (unavailable)
 // CHECK-CC1-NOT: NotImplemented:{TypedText float} (65)
 // CHECK-CC1: ParmDecl:{ResultType int}{TypedText j} (8)
@@ -39,7 +38,6 @@
 // RUN: c-index-test -code-completion-at=%s:7:18 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
 // RUN: c-index-test -code-completion-at=%s:7:22 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
 // RUN: c-index-test -code-completion-at=%s:7:2 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC2 %s
-// CHECK-CC2: macro definition:{TypedText __VERSION__} (70)
 // CHECK-CC2: FunctionDecl:{ResultType int}{TypedText f}{LeftParen (}{Placeholder int}{RightParen )} (50)
 // CHECK-CC2: NotImplemented:{TypedText float} (50)
 // CHECK-CC2: ParmDecl:{ResultType int}{TypedText j} (34)
Index: test/Driver/immediate-options.c
===
--- test/Driver/immediate-options.c
+++ test/Driver/immediate-options.c
@@ -6,9 +6,6 @@
 // RUN: %clang --help-hidden | FileCheck %s -check-prefix=HELP-HIDDEN
 // HELP-HIDDEN: driver-mode
 
-// RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
-// DUMPVERSION: {{[0-9]+\.[0-9.]+}}
-
 // RUN: %clang -print-search-dirs | FileCheck %s -check-prefix=PRINT-SEARCH-DIRS
 // PRINT-SEARCH-DIRS: programs: ={{.*}}
 // PRINT-SEARCH-DIRS: libraries: ={{.*}}
Index: lib/Frontend/InitPreprocessor.cpp
===

[PATCH] D64062: Remove both -dumpversion and __VERSION__

2019-07-02 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

Actually, I don't think removing -dumpversion is a great idea. it will remove 
the capability of clang to be a dropped in replacement.

I see a lot of occurrences:
https://github.com/search?q=%22-dumpversion%22&type=Code
https://codesearch.debian.net/search?q=%22-dumpversion%22

(just in the source of Firefox, I see 6 different usage)


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64062/new/

https://reviews.llvm.org/D64062



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


[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-07-02 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

Actually, not sure it is a good idea to remove them: 
https://reviews.llvm.org/D64062#1566460


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63048/new/

https://reviews.llvm.org/D63048



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


[PATCH] D64062: Remove both -dumpversion and __VERSION__

2019-07-02 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

This isn't firefox per say but thirdparty apps.
If you feel confident, sure, we can land that and see what happens :)


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64062/new/

https://reviews.llvm.org/D64062



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


[PATCH] D64278: Rename libclang_shared to libclang-cpp

2019-07-06 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision.
sylvestre.ledru added reviewers: beanz, tstellar.
Herald added subscribers: cfe-commits, mgorny.
Herald added a project: clang.
sylvestre.ledru edited the summary of this revision.

Fix bug 42475


Repository:
  rC Clang

https://reviews.llvm.org/D64278

Files:
  CMakeLists.txt
  cmake/modules/AddClang.cmake
  tools/clang-shlib/CMakeLists.txt


Index: tools/clang-shlib/CMakeLists.txt
===
--- tools/clang-shlib/CMakeLists.txt
+++ tools/clang-shlib/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Building libclang_shared.so fails if LLVM_ENABLE_PIC=Off
+# Building libclang-cpp.so fails if LLVM_ENABLE_PIC=Off
 if (NOT LLVM_ENABLE_PIC)
   return()
 endif()
@@ -11,7 +11,7 @@
   list(APPEND _DEPS $)
 endforeach ()
 
-add_clang_library(clang_shared
+add_clang_library(clang-cpp
   SHARED
   clang-shlib.cpp
   ${_OBJECTS}
Index: cmake/modules/AddClang.cmake
===
--- cmake/modules/AddClang.cmake
+++ cmake/modules/AddClang.cmake
@@ -175,7 +175,7 @@
 
 function(clang_target_link_libraries target type)
   if (CLANG_LINK_CLANG_DYLIB)
-target_link_libraries(${target} ${type} clang_shared)
+target_link_libraries(${target} ${type} clang-cpp)
   else()
 target_link_libraries(${target} ${type} ${ARGN})
   endif()
Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -324,7 +324,7 @@
 "Python versions to install libclang python bindings for")
 
 set(CLANG_LINK_CLANG_DYLIB ${LLVM_LINK_LLVM_DYLIB} CACHE BOOL
-"Link tools against libclang_shared.so")
+"Link tools against libclang-cpp.so")
 
 if (NOT LLVM_LINK_LLVM_DYLIB AND CLANG_LINK_CLANG_DYLIB)
   message(FATAL_ERROR "Cannot set CLANG_LINK_CLANG_DYLIB=ON when "


Index: tools/clang-shlib/CMakeLists.txt
===
--- tools/clang-shlib/CMakeLists.txt
+++ tools/clang-shlib/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Building libclang_shared.so fails if LLVM_ENABLE_PIC=Off
+# Building libclang-cpp.so fails if LLVM_ENABLE_PIC=Off
 if (NOT LLVM_ENABLE_PIC)
   return()
 endif()
@@ -11,7 +11,7 @@
   list(APPEND _DEPS $)
 endforeach ()
 
-add_clang_library(clang_shared
+add_clang_library(clang-cpp
   SHARED
   clang-shlib.cpp
   ${_OBJECTS}
Index: cmake/modules/AddClang.cmake
===
--- cmake/modules/AddClang.cmake
+++ cmake/modules/AddClang.cmake
@@ -175,7 +175,7 @@
 
 function(clang_target_link_libraries target type)
   if (CLANG_LINK_CLANG_DYLIB)
-target_link_libraries(${target} ${type} clang_shared)
+target_link_libraries(${target} ${type} clang-cpp)
   else()
 target_link_libraries(${target} ${type} ${ARGN})
   endif()
Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -324,7 +324,7 @@
 "Python versions to install libclang python bindings for")
 
 set(CLANG_LINK_CLANG_DYLIB ${LLVM_LINK_LLVM_DYLIB} CACHE BOOL
-"Link tools against libclang_shared.so")
+"Link tools against libclang-cpp.so")
 
 if (NOT LLVM_LINK_LLVM_DYLIB AND CLANG_LINK_CLANG_DYLIB)
   message(FATAL_ERROR "Cannot set CLANG_LINK_CLANG_DYLIB=ON when "
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D64062: Remove both -dumpversion and __VERSION__

2019-07-06 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@rnk is it good for you ?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64062/new/

https://reviews.llvm.org/D64062



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


[PATCH] D64278: Rename libclang_shared to libclang-cpp

2019-07-09 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@beanz works for you?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64278/new/

https://reviews.llvm.org/D64278



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


[PATCH] D64062: Remove both -dumpversion and __VERSION__

2019-07-09 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 208619.
sylvestre.ledru added a comment.

Update of the release note.
thanks to @rnk for the suggestion


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64062/new/

https://reviews.llvm.org/D64062

Files:
  docs/ClangCommandLineReference.rst
  docs/LanguageExtensions.rst
  docs/ReleaseNotes.rst
  include/clang/Driver/Options.td
  lib/Basic/Version.cpp
  lib/Driver/Driver.cpp
  lib/Frontend/InitPreprocessor.cpp
  test/Driver/immediate-options.c
  test/Index/complete-exprs.c
  test/Preprocessor/init.c
  utils/builtin-defines.c

Index: utils/builtin-defines.c
===
--- utils/builtin-defines.c
+++ utils/builtin-defines.c
@@ -49,7 +49,6 @@
 #undef __INT8_TYPE__
 #undef __SSP__
 #undef __APPLE_CC__
-#undef __VERSION__
 #undef __clang__
 #undef __llvm__
 #undef __nocona
Index: test/Preprocessor/init.c
===
--- test/Preprocessor/init.c
+++ test/Preprocessor/init.c
@@ -101,7 +101,6 @@
 // COMMON:#define __ORDER_PDP_ENDIAN__ 3412
 // COMMON:#define __STDC_HOSTED__ 1
 // COMMON:#define __STDC__ 1
-// COMMON:#define __VERSION__ {{.*}}
 // COMMON:#define __clang__ 1
 // COMMON:#define __clang_major__ {{[0-9]+}}
 // COMMON:#define __clang_minor__ {{[0-9]+}}
@@ -8169,7 +8168,6 @@
 // SPARC:#define __UINT_LEAST8_MAX__ 255
 // SPARC:#define __UINT_LEAST8_TYPE__ unsigned char
 // SPARC:#define __USER_LABEL_PREFIX__
-// SPARC:#define __VERSION__ "4.2.1 Compatible{{.*}}
 // SPARC:#define __WCHAR_MAX__ 2147483647
 // SPARC:#define __WCHAR_TYPE__ int
 // SPARC:#define __WCHAR_WIDTH__ 32
@@ -9041,7 +9039,6 @@
 // X86_64-CLOUDABI:#define __UINT_LEAST8_MAX__ 255
 // X86_64-CLOUDABI:#define __UINT_LEAST8_TYPE__ unsigned char
 // X86_64-CLOUDABI:#define __USER_LABEL_PREFIX__
-// X86_64-CLOUDABI:#define __VERSION__ "4.2.1 Compatible{{.*}}
 // X86_64-CLOUDABI:#define __WCHAR_MAX__ 2147483647
 // X86_64-CLOUDABI:#define __WCHAR_TYPE__ int
 // X86_64-CLOUDABI:#define __WCHAR_WIDTH__ 32
@@ -10043,7 +10040,6 @@
 // WEBASSEMBLY-NEXT:#define __UINT_LEAST8_MAX__ 255
 // WEBASSEMBLY-NEXT:#define __UINT_LEAST8_TYPE__ unsigned char
 // WEBASSEMBLY-NEXT:#define __USER_LABEL_PREFIX__
-// WEBASSEMBLY-NEXT:#define __VERSION__ "{{.*}}"
 // WEBASSEMBLY-NEXT:#define __WCHAR_MAX__ 2147483647
 // WEBASSEMBLY-NEXT:#define __WCHAR_TYPE__ int
 // WEBASSEMBLY-NOT:#define __WCHAR_UNSIGNED__
Index: test/Index/complete-exprs.c
===
--- test/Index/complete-exprs.c
+++ test/Index/complete-exprs.c
@@ -27,7 +27,6 @@
 // RUN: c-index-test -code-completion-at=%s:7:10 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
 // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:7:10 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
 // CHECK-CC1: NotImplemented:{TypedText __PRETTY_FUNCTION__} (65)
-// CHECK-CC1: macro definition:{TypedText __VERSION__} (70)
 // CHECK-CC1: FunctionDecl:{ResultType int}{TypedText f}{LeftParen (}{Placeholder int}{RightParen )} (12) (unavailable)
 // CHECK-CC1-NOT: NotImplemented:{TypedText float} (65)
 // CHECK-CC1: ParmDecl:{ResultType int}{TypedText j} (8)
@@ -39,7 +38,6 @@
 // RUN: c-index-test -code-completion-at=%s:7:18 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
 // RUN: c-index-test -code-completion-at=%s:7:22 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
 // RUN: c-index-test -code-completion-at=%s:7:2 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC2 %s
-// CHECK-CC2: macro definition:{TypedText __VERSION__} (70)
 // CHECK-CC2: FunctionDecl:{ResultType int}{TypedText f}{LeftParen (}{Placeholder int}{RightParen )} (50)
 // CHECK-CC2: NotImplemented:{TypedText float} (50)
 // CHECK-CC2: ParmDecl:{ResultType int}{TypedText j} (34)
Index: test/Driver/immediate-options.c
===
--- test/Driver/immediate-options.c
+++ test/Driver/immediate-options.c
@@ -6,9 +6,6 @@
 // RUN: %clang --help-hidden | FileCheck %s -check-prefix=HELP-HIDDEN
 // HELP-HIDDEN: driver-mode
 
-// RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
-// DUMPVERSION: {{[0-9]+\.[0-9.]+}}
-
 // RUN: %clang -print-search-dirs | FileCheck %s -check-prefix=PRINT-SEARCH-DIRS
 // PRINT-SEARCH-DIRS: programs: ={{.*}}
 // PRINT-SEARCH-DIRS: libraries: ={{.*}}
Index: lib/Frontend/InitPreprocessor.cpp
===
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -604,12 +604,6 @@
   // Support for #pragma redefine_extname (Sun compatibility)
   Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1");
 
-  // As sad as it is, enough software depends on the __VERSION__ for version
-  // c

[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2019-07-09 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

Sure, done in r365445 
thanks for your work!


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D28462/new/

https://reviews.llvm.org/D28462



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


[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2019-07-09 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@VelocityRa could you please add it to the release notes?
https://github.com/llvm-mirror/clang/blob/master/docs/ReleaseNotes.rst
I can commit the change if you need


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D28462/new/

https://reviews.llvm.org/D28462



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


[PATCH] D64062: Remove both -dumpversion and __VERSION__

2019-07-10 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@rnk Works for you?
I would like to land that before the 9 branch. Thanks


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64062/new/

https://reviews.llvm.org/D64062



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


[PATCH] D64278: Rename libclang_shared to libclang-cpp

2019-07-10 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

I would like to land that before the 9 branch. @tstellar do you sign off on 
this change? Thanks


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64278/new/

https://reviews.llvm.org/D64278



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


[PATCH] D61909: Add Clang shared library with C++ exports

2019-05-17 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment.

@beanz @tstellar 
I am wondering what to do wrt apt.llvm.org 
should it be part of libclang or create a libclang++ package
what do you think?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61909/new/

https://reviews.llvm.org/D61909



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


  1   2   3   4   5   >