[llvm-branch-commits] [clang] b46924e - Fix "not all control paths return a value" warning. NFCI.

2021-02-09 Thread Aaron Puchert via llvm-branch-commits

Author: Simon Pilgrim
Date: 2021-02-10T00:28:41+01:00
New Revision: b46924ee5afe234526220c29a497794bf65f8f7f

URL: 
https://github.com/llvm/llvm-project/commit/b46924ee5afe234526220c29a497794bf65f8f7f
DIFF: 
https://github.com/llvm/llvm-project/commit/b46924ee5afe234526220c29a497794bf65f8f7f.diff

LOG: Fix "not all control paths return a value" warning. NFCI.

Added: 


Modified: 
clang/lib/Basic/ProfileList.cpp

Removed: 




diff  --git a/clang/lib/Basic/ProfileList.cpp b/clang/lib/Basic/ProfileList.cpp
index 56bc37a79301..2cb05c1c3c07 100644
--- a/clang/lib/Basic/ProfileList.cpp
+++ b/clang/lib/Basic/ProfileList.cpp
@@ -82,6 +82,7 @@ static StringRef 
getSectionName(CodeGenOptions::ProfileInstrKind Kind) {
   case CodeGenOptions::ProfileCSIRInstr:
 return "csllvm";
   }
+  llvm_unreachable("Unhandled CodeGenOptions::ProfileInstrKind enum");
 }
 
 llvm::Optional



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


[llvm-branch-commits] [clang] 08642a3 - Fix syntax error in Clang release notes

2021-09-18 Thread Aaron Puchert via llvm-branch-commits

Author: Aaron Puchert
Date: 2021-09-18T16:40:42+02:00
New Revision: 08642a395f235b9186d4479c7a2307f9e8bf0bba

URL: 
https://github.com/llvm/llvm-project/commit/08642a395f235b9186d4479c7a2307f9e8bf0bba
DIFF: 
https://github.com/llvm/llvm-project/commit/08642a395f235b9186d4479c7a2307f9e8bf0bba.diff

LOG: Fix syntax error in Clang release notes

There needs to be a blank line after ".. code-block:: ".

Added: 


Modified: 
clang/docs/ReleaseNotes.rst

Removed: 




diff  --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index eb17ab7be2b45..10addbd1abba1 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -245,6 +245,7 @@ OpenMP Support in Clang
   other OpenMP loop associated constructs as in
 
   .. code-block:: c
+
 #pragma omp parallel for
 #pragma omp unroll partial(4)
 for (int i = 0; i < n; ++i)
@@ -253,6 +254,7 @@ OpenMP Support in Clang
   user-defined tile size.
 
   .. code-block:: c
+
 #pragma omp tile sizes(8,8)
 for (int i = 0; i < m; ++i)
   for (int j = 0; j < n; ++j)



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


[llvm-branch-commits] [clang] 0c5ce1d - Fix formatting in release notes

2022-08-29 Thread Aaron Puchert via llvm-branch-commits

Author: Aaron Puchert
Date: 2022-08-29T19:43:34+02:00
New Revision: 0c5ce1d7fba38948c27ed6b875f962cd60895574

URL: 
https://github.com/llvm/llvm-project/commit/0c5ce1d7fba38948c27ed6b875f962cd60895574
DIFF: 
https://github.com/llvm/llvm-project/commit/0c5ce1d7fba38948c27ed6b875f962cd60895574.diff

LOG: Fix formatting in release notes

Code needs double backticks, while single backticks produce italics.
Lists need to be fully indented and have blank lines around them.
Links are written "`text `_".

We use links instead of `:manpage:`, because the latter is meant
more for man pages cross-referencing each other.

Reviewed By: aaron.ballman, thieta

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

Added: 


Modified: 
clang/docs/ReleaseNotes.rst
llvm/docs/ReleaseNotes.rst

Removed: 




diff  --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 75ea617a554bc..383ad2983febe 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -127,7 +127,7 @@ Bug Fixes
   This fixes Issue `Issue 53488 
`_.
 - According to `CWG 1394 `_ and
   `C++20 [dcl.fct.def.general]p2 
`_,
-  Clang should not diagnose incomplete types in function definitions if the 
function body is "= delete;".
+  Clang should not diagnose incomplete types in function definitions if the 
function body is ``= delete;``.
   This fixes Issue `Issue 52802 
`_.
 - Unknown type attributes with a ``[[]]`` spelling are no longer diagnosed 
twice.
   This fixes Issue `Issue 54817 
`_.
@@ -163,7 +163,7 @@ Bug Fixes
   promise_type body for coroutines if there is any allocation function
   declaration in the scope of promise_type. Additionally, to implement CWG2585,
   a coroutine will no longer generate a call to a global allocation function
-  with the signature (std::size_t, p0, ..., pn).
+  with the signature ``(std::size_t, p0, ..., pn)``.
   This fixes Issue `Issue 54881 
`_.
 - Implement `CWG 2394 `_: Const class members
   may be initialized with a defaulted default constructor under the same
@@ -202,7 +202,7 @@ Bug Fixes
   considered to have one positive bit in order to represent the underlying
   value. This effects whether we consider the store of the value one to be well
   defined.
-- An operator introduced to the scope via a `using` statement now correctly 
references this
+- An operator introduced to the scope via a ``using`` statement now correctly 
references this
   statement in clangd (hover over the symbol, jump to definition) as well as 
in the AST dump.
   This also fixes `issue 55095 
`_ as a
   side-effect.
@@ -305,7 +305,7 @@ Improvements to Clang's diagnostics
 - When using class templates without arguments, clang now tells developers
   that template arguments are missing in certain contexts.
   This fixes `Issue 55962 
`_.
-- Printable Unicode characters within `static_assert` messages are no longer
+- Printable Unicode characters within ``static_assert`` messages are no longer
   escaped.
 - The ``-Winfinite-recursion`` diagnostic no longer warns about
   unevaluated operands of a ``typeid`` expression, as they are now
@@ -330,10 +330,10 @@ Improvements to Clang's diagnostics
 Non-comprehensive list of changes in this release
 -
 
-- Improve __builtin_dump_struct:
+- Improve ``__builtin_dump_struct``:
 
   - Support bitfields in struct and union.
-  - Improve the dump format, dump both bitwidth(if its a bitfield) and field
+  - Improve the dump format, dump both bitwidth (if its a bitfield) and field
 value.
   - Remove anonymous tag locations and flatten anonymous struct members.
   - Beautify dump format, add indent for struct members.
@@ -346,8 +346,9 @@ Non-comprehensive list of changes in this release
 custom formatting for non-aggregate types.
 
 - Previously disabled sanitizer options now enabled by default:
-  - ASAN_OPTIONS=detect_stack_use_after_return=1 (only on Linux).
-  - MSAN_OPTIONS=poison_in_dtor=1.
+
+  - ``ASAN_OPTIONS=detect_stack_use_after_return=1`` (only on Linux).
+  - ``MSAN_OPTIONS=poison_in_dtor=1``.
 
 - Some type-trait builtins, such as ``__has_trivial_assign``, have been 
documented
   as deprecated for a while because their semantics don't mix well with 
post-C++11 type-traits.
@@ -451,9 +452,9 @@ Attribute Changes in Clang
   ``__attribute__((function_return("keep")))`` was added. This is intended to
   be used by the Linux kernel to mitigate RETBLEED.
 
-- Ignore the `__prefe

[llvm-branch-commits] [clang] 825f80e - [Sema] Introduce function reference conversion, NFC

2020-11-22 Thread Aaron Puchert via llvm-branch-commits

Author: Aaron Puchert
Date: 2020-11-22T20:51:57+01:00
New Revision: 825f80e111f2815a009084f65267be3b5bf0897a

URL: 
https://github.com/llvm/llvm-project/commit/825f80e111f2815a009084f65267be3b5bf0897a
DIFF: 
https://github.com/llvm/llvm-project/commit/825f80e111f2815a009084f65267be3b5bf0897a.diff

LOG: [Sema] Introduce function reference conversion, NFC

Technically 'noexcept' isn't a qualifier, so this should be a separate 
conversion.

Also make the test a pure frontend test.

Reviewed By: rsmith

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

Added: 
clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p4-ast.cpp

Modified: 
clang/include/clang/AST/OperationKinds.def
clang/include/clang/Sema/Initialization.h
clang/lib/Sema/SemaInit.cpp

Removed: 
clang/test/CodeGenCXX/implicit-function-conversion.cpp



diff  --git a/clang/include/clang/AST/OperationKinds.def 
b/clang/include/clang/AST/OperationKinds.def
index 6daab1ffcb0a..7c82ab6e57ef 100644
--- a/clang/include/clang/AST/OperationKinds.def
+++ b/clang/include/clang/AST/OperationKinds.def
@@ -77,9 +77,10 @@ CAST_OPERATION(LValueToRValueBitCast)
 CAST_OPERATION(LValueToRValue)
 
 /// CK_NoOp - A conversion which does not affect the type other than
-/// (possibly) adding qualifiers.
+/// (possibly) adding qualifiers or removing noexcept.
 ///   int-> int
 ///   char** -> const char * const *
+///   void () noexcept -> void ()
 CAST_OPERATION(NoOp)
 
 /// CK_BaseToDerived - A conversion from a C++ class pointer/reference

diff  --git a/clang/include/clang/Sema/Initialization.h 
b/clang/include/clang/Sema/Initialization.h
index 6976e7c95c8b..2245c1505001 100644
--- a/clang/include/clang/Sema/Initialization.h
+++ b/clang/include/clang/Sema/Initialization.h
@@ -840,6 +840,9 @@ class InitializationSequence {
 /// Perform a qualification conversion, producing an lvalue.
 SK_QualificationConversionLValue,
 
+/// Perform a function reference conversion, see [dcl.init.ref]p4.
+SK_FunctionReferenceConversion,
+
 /// Perform a conversion adding _Atomic to a type.
 SK_AtomicConversion,
 
@@ -1288,6 +1291,10 @@ class InitializationSequence {
   void AddQualificationConversionStep(QualType Ty,
  ExprValueKind Category);
 
+  /// Add a new step that performs a function reference conversion to the
+  /// given type.
+  void AddFunctionReferenceConversionStep(QualType Ty);
+
   /// Add a new step that performs conversion from non-atomic to atomic
   /// type.
   void AddAtomicConversionStep(QualType Ty);

diff  --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index 5131ce446d04..6d2e6094e79c 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -3442,6 +3442,7 @@ void InitializationSequence::Step::Destroy() {
   case SK_QualificationConversionRValue:
   case SK_QualificationConversionXValue:
   case SK_QualificationConversionLValue:
+  case SK_FunctionReferenceConversion:
   case SK_AtomicConversion:
   case SK_ListInitialization:
   case SK_UnwrapInitList:
@@ -3620,6 +3621,13 @@ void 
InitializationSequence::AddQualificationConversionStep(QualType Ty,
   Steps.push_back(S);
 }
 
+void InitializationSequence::AddFunctionReferenceConversionStep(QualType Ty) {
+  Step S;
+  S.Kind = SK_FunctionReferenceConversion;
+  S.Type = Ty;
+  Steps.push_back(S);
+}
+
 void InitializationSequence::AddAtomicConversionStep(QualType Ty) {
   Step S;
   S.Kind = SK_AtomicConversion;
@@ -4653,7 +4661,7 @@ static OverloadingResult TryRefInitWithConversionFunction(
   else if (RefConv & Sema::ReferenceConversions::ObjC)
 Sequence.AddObjCObjectConversionStep(cv1T1);
   else if (RefConv & Sema::ReferenceConversions::Function)
-Sequence.AddQualificationConversionStep(cv1T1, VK);
+Sequence.AddFunctionReferenceConversionStep(cv1T1);
   else if (RefConv & Sema::ReferenceConversions::Qualification) {
 if (!S.Context.hasSameType(cv1T4, cv1T1))
   Sequence.AddQualificationConversionStep(cv1T1, VK);
@@ -4755,12 +4763,12 @@ static void TryReferenceInitializationCore(Sema &S,
   Sequence.AddDerivedToBaseCastStep(cv1T1, VK_LValue);
 else
   Sequence.AddObjCObjectConversionStep(cv1T1);
-  } else if (RefConv & (Sema::ReferenceConversions::Qualification |
-Sema::ReferenceConversions::Function)) {
+  } else if (RefConv & Sema::ReferenceConversions::Qualification) {
 // Perform a (possibly multi-level) qualification conversion.
-// FIXME: Should we use a 
diff erent step kind for function conversions?
 Sequence.AddQualificationConversionStep(cv1T1,
 Initializer->getValueKind());
+  } else if (RefConv & Sema::ReferenceConversions::Function) {
+Sequence.AddFunctionReferenceConversionStep(cv1T1);
   }
 
   // We only create a temporary he

[llvm-branch-commits] [llvm] 1a00929 - Build reproducible tarballs for releases

2020-11-22 Thread Aaron Puchert via llvm-branch-commits

Author: Aaron Puchert
Date: 2020-11-22T20:51:58+01:00
New Revision: 1a009296a4e9a50e85908f9141c3c1ea860d73e4

URL: 
https://github.com/llvm/llvm-project/commit/1a009296a4e9a50e85908f9141c3c1ea860d73e4
DIFF: 
https://github.com/llvm/llvm-project/commit/1a009296a4e9a50e85908f9141c3c1ea860d73e4.diff

LOG: Build reproducible tarballs for releases

Currently the tarballs contain superfluous metadata, like the user name
of the packager and via Pax headers even the PID of the tar process that
packaged the files. We build the monorepo projects directly from the git
repo using "git archive" and for the test-suite we add some flags as
recommended by https://reproducible-builds.org/docs/archives/. We don't
use numeric owners though to be compatible with "git archive".

The advantage of "git archive" is that the releaser doesn't have to
download the tar ball and extract it, rather the archive is built
directly from the repository. This is probably what GitHub uses
internally to produce the tarballs, so I wouldn't expect a difference.

Reviewed By: tstellar

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

Added: 


Modified: 
llvm/utils/release/export.sh

Removed: 




diff  --git a/llvm/utils/release/export.sh b/llvm/utils/release/export.sh
index 3ffd7e78dd63..0c76ed047081 100755
--- a/llvm/utils/release/export.sh
+++ b/llvm/utils/release/export.sh
@@ -13,7 +13,7 @@
 
 set -e
 
-projects="llvm clang test-suite compiler-rt libcxx libcxxabi libclc 
clang-tools-extra polly lldb lld openmp libunwind flang"
+projects="llvm clang compiler-rt libcxx libcxxabi libclc clang-tools-extra 
polly lldb lld openmp libunwind flang"
 
 release=""
 rc=""
@@ -37,26 +37,34 @@ export_sources() {
 tag="$tag-$rc"
 fi
 
-llvm_src_dir=llvm-project-$release$rc
-mkdir -p $llvm_src_dir
+llvm_src_dir=$(readlink -f $(dirname "$(readlink -f "$0")")/../../..)
+[ -d $llvm_src_dir/.git ] || ( echo "No git repository at $llvm_src_dir" ; 
exit 1 )
 
 echo $tag
-echo "Fetching LLVM project source ..."
-curl -L https://github.com/llvm/llvm-project/archive/$tag.tar.gz | \
-tar -C $llvm_src_dir --strip-components=1 -xzf -
+target_dir=$(pwd)
 
 echo "Creating tarball for llvm-project ..."
-tar -cJf llvm-project-$release$rc.tar.xz $llvm_src_dir
+pushd $llvm_src_dir/
+git archive --prefix=llvm-project-$release$rc.src/ $tag . | xz 
>$target_dir/llvm-project-$release$rc.src.tar.xz
+popd
 
-echo "Fetching LLVM test-suite source ..."
-mkdir -p $llvm_src_dir/test-suite
-curl -L https://github.com/llvm/test-suite/archive/$tag.tar.gz | \
-tar -C $llvm_src_dir/test-suite --strip-components=1 -xzf -
+if [ ! -d test-suite-$release$rc.src ]
+then
+  echo "Fetching LLVM test-suite source ..."
+  mkdir -p test-suite-$release$rc.src
+  curl -L https://github.com/llvm/test-suite/archive/$tag.tar.gz | \
+  tar -C test-suite-$release$rc.src --strip-components=1 -xzf -
+fi
+echo "Creating tarball for test-suite ..."
+tar --sort=name --owner=0 --group=0 \
+--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
+-cJf test-suite-$release$rc.src.tar.xz test-suite-$release$rc.src
 
 for proj in $projects; do
 echo "Creating tarball for $proj ..."
-mv $llvm_src_dir/$proj $llvm_src_dir/$proj-$release$rc.src
-tar -C $llvm_src_dir -cJf $proj-$release$rc.src.tar.xz 
$proj-$release$rc.src
+pushd $llvm_src_dir/$proj
+git archive --prefix=$proj-$release$rc.src/ $tag . | xz 
>$target_dir/$proj-$release$rc.src.tar.xz
+popd
 done
 }
 



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


[llvm-branch-commits] [libcxx] 4f53867 - Drop git version suffix

2020-02-17 Thread Aaron Puchert via llvm-branch-commits

Author: Aaron Puchert
Date: 2020-02-17T23:47:30+01:00
New Revision: 4f53867ec27bde33479c7891c256225f2075945a

URL: 
https://github.com/llvm/llvm-project/commit/4f53867ec27bde33479c7891c256225f2075945a
DIFF: 
https://github.com/llvm/llvm-project/commit/4f53867ec27bde33479c7891c256225f2075945a.diff

LOG: Drop git version suffix

Summary: Also fix the version for libcxxabi, which was stuck in the past.

Reviewers: hans, mclow.lists

Reviewed By: hans

Subscribers: mgorny, christof, libcxx-commits, llvm-commits, ldionne

Tags: #libc, #llvm

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

Added: 


Modified: 
libcxx/CMakeLists.txt
libcxxabi/CMakeLists.txt
libunwind/CMakeLists.txt
llvm/CMakeLists.txt

Removed: 




diff  --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 443097c090e6..1d6ab58166ef 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -27,7 +27,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR 
LIBCXX_STANDALONE_BUIL
   project(libcxx CXX C)
 
   set(PACKAGE_NAME libcxx)
-  set(PACKAGE_VERSION 10.0.0git)
+  set(PACKAGE_VERSION 10.0.0)
   set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
   set(PACKAGE_BUGREPORT "llvm-b...@lists.llvm.org")
 

diff  --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
index f3698e9c46e1..59d99971a765 100644
--- a/libcxxabi/CMakeLists.txt
+++ b/libcxxabi/CMakeLists.txt
@@ -21,7 +21,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR 
LIBCXXABI_STANDALONE_B
   project(libcxxabi CXX C)
 
   set(PACKAGE_NAME libcxxabi)
-  set(PACKAGE_VERSION 9.0.0svn)
+  set(PACKAGE_VERSION 10.0.0)
   set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
   set(PACKAGE_BUGREPORT "llvm-b...@lists.llvm.org")
 

diff  --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt
index 6dd0a15405b5..7726511b6e1f 100644
--- a/libunwind/CMakeLists.txt
+++ b/libunwind/CMakeLists.txt
@@ -83,7 +83,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR 
LIBUNWIND_STANDALONE_B
   endif()
 
   set(PACKAGE_NAME libunwind)
-  set(PACKAGE_VERSION 10.0.0git)
+  set(PACKAGE_VERSION 10.0.0)
   set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
   set(PACKAGE_BUGREPORT "llvm-b...@lists.llvm.org")
 

diff  --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 9bbcba069c1d..567396870a5c 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -25,7 +25,7 @@ if(NOT DEFINED LLVM_VERSION_PATCH)
   set(LLVM_VERSION_PATCH 0)
 endif()
 if(NOT DEFINED LLVM_VERSION_SUFFIX)
-  set(LLVM_VERSION_SUFFIX git)
+  set(LLVM_VERSION_SUFFIX "")
 endif()
 
 if (NOT PACKAGE_VERSION)



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


[llvm-branch-commits] [llvm] release/19.x: [NFC] fix build failure (#100993) (PR #112551)

2024-10-21 Thread Aaron Puchert via llvm-branch-commits

aaronpuchert wrote:

> I'm assuming this isn't an ABI break in any cases where this builds?

The function is not declared in any header file, in fact it sits in an 
([unfortunately](https://llvm.org/docs/CodingStandards.html#anonymous-namespaces)
 relatively large) anonymous namespace (starting here at line 1732). So it 
should be fine.

https://github.com/llvm/llvm-project/pull/112551
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] release/20.x: [X86] When expanding LCMPXCHG16B_SAVE_RBX, substitute RBX in base (#134109) (PR #134331)

2025-04-05 Thread Aaron Puchert via llvm-branch-commits

aaronpuchert wrote:

You might have to (formally) approve the changes.

https://github.com/llvm/llvm-project/pull/134331
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] release/20.x: [X86] When expanding LCMPXCHG16B_SAVE_RBX, substitute RBX in base (#134109) (PR #134331)

2025-04-12 Thread Aaron Puchert via llvm-branch-commits

aaronpuchert wrote:

Release note: Fixed a miscompilation on X86 when using 16-byte atomic 
compare-and-swap on a frame variable when RBX is used as frame pointer.

https://github.com/llvm/llvm-project/pull/134331
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits