Page MenuHomePhabricator

sberg (Stephan Bergmann)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 26 2015, 8:20 AM (396 w, 3 d)

Recent Activity

Mar 2 2023

sberg committed rGd812488d3c54: Call MarkVirtualMembersReferenced on an actual class definition (authored by sberg).
Call MarkVirtualMembersReferenced on an actual class definition
Mar 2 2023, 6:51 AM · Restricted Project, Restricted Project
sberg closed D145123: Call MarkVirtualMembersReferenced on an actual class definition.
Mar 2 2023, 6:50 AM · Restricted Project, Restricted Project

Mar 1 2023

sberg added inline comments to D145123: Call MarkVirtualMembersReferenced on an actual class definition.
Mar 1 2023, 2:51 PM · Restricted Project, Restricted Project
sberg requested review of D145123: Call MarkVirtualMembersReferenced on an actual class definition.
Mar 1 2023, 2:46 PM · Restricted Project, Restricted Project

Jan 4 2023

sberg abandoned D139847: Also allow __is_unsigned to be used as an identifier.

Do you know if folks are hitting problems here in practice, or is this speculative?

Jan 4 2023, 11:34 PM · Restricted Project, Restricted Project

Dec 21 2022

Herald added a project to D86881: Make -fvisibility-inlines-hidden apply to static local variables in inline functions on Darwin: Restricted Project.

Hey, thanks for following up on this PR. I've done some more digging and I think we can remove this Darwin-specific workaround in the near future. I'm hoping to provide an update in the next few weeks.

Dec 21 2022, 12:18 AM · Restricted Project, Restricted Project

Dec 12 2022

sberg requested review of D139847: Also allow __is_unsigned to be used as an identifier.
Dec 12 2022, 8:28 AM · Restricted Project, Restricted Project

Oct 9 2022

sberg added a comment to D134529: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For.

I just ran into newly-failing

$ cat test.cc
struct S1 {
    bool operator==(int);
    bool operator!=(int);
};
struct S2;
bool operator ==(S2, S2);
bool f(S1 s) { return 0 == s; }
$ clang++ -std=c++20 -fsyntax-only test.cc
test.cc:7:25: error: invalid operands to binary expression ('int' and 'S1')
bool f(S1 s) { return 0 == s; }
                      ~ ^  ~
test.cc:6:6: note: candidate function not viable: no known conversion from 'int' to 'S2' for 1st argument
bool operator ==(S2, S2);
     ^
1 error generated.

It looks to me like this is correctly rejected now per P2468R2. But it is rather confusing that a note mentions the S2 candidate, while the relevant S1 operators == and != are not mentioned at all.

Oct 9 2022, 7:30 AM · Restricted Project, Restricted Project

Aug 29 2022

sberg added a comment to D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.

I'm surprised that

[...]

causes a warning? I would have expected it to be suppressed in this case, as with the lax -fstrict-flex-arrays=0 default, and only to hit with the stricter -fstrict-flex-arrays=2.

Aug 29 2022, 10:49 PM · Restricted Project, Restricted Project

Aug 16 2022

sberg added a comment to D68365: [libc++] Implement P1004R2 (constexpr std::vector).

For a -DLIBCXX_ENABLE_DEBUG_MODE=ON build this now causes

$ cat test.cc
#define _LIBCPP_DEBUG 1
#include <vector>
static std::vector<int> v;
int main() {
    v.push_back(0);
    int a = 0;
    for (auto i: v) a += i;
    return a;
}
Aug 16 2022, 5:15 AM · Restricted Project, Restricted Project

Aug 12 2022

sberg added a comment to D131307: [Clang] Allow downgrading to a warning the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values.

With this commit,

$ cat test.cc
#include "boost/numeric/conversion/cast.hpp"
int main() { return boost::numeric_cast<int>(0L); }

$ clang++ test.cc

succeeds without any diagnostic, while with its parent commit https://github.com/llvm/llvm-project/commit/b3645353041818f61e2580635409ddb81ff5a272 " [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values" it had started to fail with

Yes, that is intended. When modifying the change to allow it to be turned into a warning it started applying outside of constant expression contexts and that broke a lot more stuff.

Aug 12 2022, 1:13 AM · Restricted Project, Restricted Project

Aug 10 2022

sberg added a comment to D131307: [Clang] Allow downgrading to a warning the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values.

With this commit,

$ cat test.cc
#include "boost/numeric/conversion/cast.hpp"
int main() { return boost::numeric_cast<int>(0L); }
Aug 10 2022, 8:52 AM · Restricted Project, Restricted Project

Aug 4 2022

sberg added a comment to D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.

I'm surprised that

$ cat test.c
struct S {
    int m1;
    int m2[1];
};
void f(struct S * s) {
    s->m2[1] = 0;
}
Aug 4 2022, 12:57 AM · Restricted Project, Restricted Project

Jul 6 2022

sberg added a comment to D129142: [LLD][ELF] Drop duplicates from rpath.

This GNU ld behavior is surprising (deviating from how options are usually handled, e.g. --auxiliary a --auxiliary b) and not matching it does not actually cause a problem to reasonable users.

But still, both ld.bdf and ld.gold have code to explicitly prune such duplicate -rpath arguments (see the code pointers in the summary). So even though neither of those two linkers appears to give a rationale for that behavior, it nevertheless appears to be a deliberate decision to behave that way. I asked for a rationale now at https://sourceware.org/pipermail/binutils/2022-July/121626.html "Deliberate deduplication of -rpath arguments in ld.bfd and ld.gold?"

Jul 6 2022, 5:29 AM · Restricted Project, Restricted Project, lld
sberg added a comment to D129142: [LLD][ELF] Drop duplicates from rpath.

This GNU ld behavior is surprising (deviating from how options are usually handled, e.g. --auxiliary a --auxiliary b) and not matching it does not actually cause a problem to reasonable users.

Jul 6 2022, 2:08 AM · Restricted Project, Restricted Project, lld

Jul 5 2022

sberg added a comment to D129142: [LLD][ELF] Drop duplicates from rpath.

I did not mean this behavior. I mean whether this complexity brings anything beneficial. I don't think the runtime behavior is affected.
Put it another way: is this change necessary.

Jul 5 2022, 11:47 PM · Restricted Project, Restricted Project, lld
sberg added a comment to D129142: [LLD][ELF] Drop duplicates from rpath.

Does this change the behavior in any way?

Jul 5 2022, 11:24 PM · Restricted Project, Restricted Project, lld
sberg updated the diff for D129142: [LLD][ELF] Drop duplicates from rpath.

addressed comments on test file

Jul 5 2022, 11:20 PM · Restricted Project, Restricted Project, lld
sberg updated the diff for D129142: [LLD][ELF] Drop duplicates from rpath.

added to release notes

Jul 5 2022, 6:45 AM · Restricted Project, Restricted Project, lld
sberg requested review of D129142: [LLD][ELF] Drop duplicates from rpath.
Jul 5 2022, 6:23 AM · Restricted Project, Restricted Project, lld

Jul 4 2022

sberg committed rG4996e3f68315: [test] Check for more -fsanitize=array-bounds behavior (authored by sberg).
[test] Check for more -fsanitize=array-bounds behavior
Jul 4 2022, 11:15 PM · Restricted Project, Restricted Project
sberg closed D128783: [test] Check for more -fsanitize=array-bounds regressions.
Jul 4 2022, 11:14 PM · Restricted Project, Restricted Project

Jul 1 2022

sberg added inline comments to D128783: [test] Check for more -fsanitize=array-bounds regressions.
Jul 1 2022, 2:06 AM · Restricted Project, Restricted Project
sberg updated the diff for D128783: [test] Check for more -fsanitize=array-bounds regressions.

added test involving template argument substitution

Jul 1 2022, 2:05 AM · Restricted Project, Restricted Project

Jun 30 2022

sberg updated the diff for D128783: [test] Check for more -fsanitize=array-bounds regressions.

Updated the prospective git commit message as follow:

[test] Check for more -fsanitize=array-bounds behavior
Jun 30 2022, 2:01 AM · Restricted Project, Restricted Project

Jun 28 2022

sberg added a comment to D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.

Oh, I did not see this when pushing a test efd90ffbfc427ad4c4675ac1fcae9d53cc7f1322 . Consider adding additional tests in clang/test/CodeGen/bounds-checking-fam.c.

Jun 28 2022, 11:43 PM · Restricted Project, Restricted Project
sberg requested review of D128783: [test] Check for more -fsanitize=array-bounds regressions.
Jun 28 2022, 11:33 PM · Restricted Project, Restricted Project

Jun 27 2022

sberg added a comment to D128661: [libc++] Re-add transitive includes that had been removed since LLVM 14.

[sorry for the noise; my previous, removed comment was due to some local modifications on my end]

Jun 27 2022, 11:59 PM · Restricted Project, Restricted Project
sberg added a comment to D128661: [libc++] Re-add transitive includes that had been removed since LLVM 14.
Jun 27 2022, 11:43 PM · Restricted Project, Restricted Project
sberg abandoned D128643: [clang] -fsanitize=array-bounds: treat all trailing size-1 arrays as flexible.

I'm abandoning this as the underlying https://reviews.llvm.org/D126864 "[clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays" has been reverted for now.

Jun 27 2022, 11:02 PM · Restricted Project, Restricted Project
sberg added a comment to D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.

see https://reviews.llvm.org/D128643 "[clang] -fsanitize=array-bounds: treat all trailing size-1 arrays as flexible" for another regression

Jun 27 2022, 10:58 PM · Restricted Project, Restricted Project
sberg added a comment to D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.

see https://reviews.llvm.org/D128643 "[clang] -fsanitize=array-bounds: treat all trailing size-1 arrays as flexible" for another regression

Jun 27 2022, 7:07 AM · Restricted Project, Restricted Project
sberg requested review of D128643: [clang] -fsanitize=array-bounds: treat all trailing size-1 arrays as flexible.
Jun 27 2022, 7:06 AM · Restricted Project, Restricted Project

Jun 21 2022

sberg added a comment to D127593: [clang] Fix trivially copyable for copy constructor and copy assignment operator.

Is it possible to check how often PDFium uses __has_trivial_assign? Depending on how large this breakage is we might need to revert and proceed more carefully..

Jun 21 2022, 1:40 AM · Restricted Project, Restricted Project, Restricted Project

Jun 20 2022

sberg added a comment to D127593: [clang] Fix trivially copyable for copy constructor and copy assignment operator.

Is it intended that a deleted copy assignment op as in struct S { void operator =(S &) = delete; }; (though, somewhat oddly, not in struct S { void operator =(S) = delete; };) is now marked as trivial?

I think that's the root cause why a build of PDFium with clang-cl against the MSVC standard library started to fail for me now, effectively complaining that __is_trivially_assignable(std::pair<int,int> &, std::pair<int,int> const &) is false (as expected) while __has_trivial_assign(std::pair<int,int>) is (unexpectedly) true.

I don't see it on godbolt trunk: https://godbolt.org/z/KPfxWqnhd.

Jun 20 2022, 2:17 PM · Restricted Project, Restricted Project, Restricted Project
sberg added a comment to D127593: [clang] Fix trivially copyable for copy constructor and copy assignment operator.

Is it intended that a deleted copy assignment op as in struct S { void operator =(S &) = delete; }; (though, somewhat oddly, not in struct S { void operator =(S) = delete; };) is now marked as trivial?

Jun 20 2022, 7:35 AM · Restricted Project, Restricted Project, Restricted Project

Jun 15 2022

sberg added a comment to D127675: [libc++] Removes unneeded <iterator> includes..

But now

#include <array>
auto b = std::begin("");

fails to compile, even though [iterator.range]/1 states: "In addition to being available via inclusion of the <iterator> header, the function templates in 23.7 are
available when any of the following headers are included: <array> (22.3.2), [...]"

Jun 15 2022, 10:35 PM · Restricted Project, Restricted Project

Jun 10 2022

sberg added a comment to D117977: [cmake] Don't export `LLVM_TOOLS_INSTALL_DIR` anymore.

There might be something fishy with this commit. My fresh from-scratch cmake --build . && cmake --build . --target install monorepo build now lacked e.g. the bin/clang++ symlink in the installation dir, and locally reverting this commit fixed that.

Jun 10 2022, 10:07 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project

May 9 2022

sberg added a comment to D115750: [SLP]Further improvement of the cost model for scalars used in buildvectors..
May 9 2022, 11:53 AM · Restricted Project, Restricted Project

Mar 22 2022

Herald added a project to D119721: [clang][lex] Use `ConstSearchDirIterator` in lookup cache: Restricted Project.

I started to experience Clang crashing when building Firebird (as part of building LibreOffice) in clang-cl mode on Windows, and I think it is due to this change in combination with D2733 by @rnk:

Mar 22 2022, 8:20 AM · Restricted Project, Restricted Project

Dec 14 2021

sberg added a comment to D115715: [clang-tidy] Fix llvm-header-guard for Windows paths containing drive letter (e.g. C:)..

So the check, for a file called e.g. "C:\test\test.h" would suggest the guard C:_TEST_TEST_H being an invalid name due to the presence of the colon.

Dec 14 2021, 1:59 AM · Restricted Project

Nov 29 2021

sberg added a comment to D113349: [SCEV] Fix and validate ValueExprMap/ExprValueMap consistency.

I commented inline at https://reviews.llvm.org/rG2b160e95c89f28a30e2481e6131073659d866a8c#1040993 "Reland [SCEV] Fix and validate ValueExprMap/ExprValueMap consistency":

Nov 29 2021, 6:43 AM · Restricted Project
sberg added inline comments to rG2b160e95c89f: Reland [SCEV] Fix and validate ValueExprMap/ExprValueMap consistency.
Nov 29 2021, 6:36 AM

Nov 5 2021

sberg added a comment to D108567: Implement #pragma clang final extension.

Final macros will always warn on redefinition, including situations with identical bodies and in system headers.

Nov 5 2021, 2:08 AM · Restricted Project

Sep 23 2021

sberg abandoned D110309: [Sanitizer] Add #include to fix (some) Windows build.

ah, even better :)

Sep 23 2021, 8:15 AM · Restricted Project

Sep 22 2021

sberg added a reviewer for D110310: State the kind of VerifyDiagnosticConsumer regex syntax (NFC): rsmith.
Sep 22 2021, 11:46 PM · Restricted Project
sberg requested review of D110310: State the kind of VerifyDiagnosticConsumer regex syntax (NFC).
Sep 22 2021, 11:44 PM · Restricted Project
sberg requested review of D110309: [Sanitizer] Add #include to fix (some) Windows build.
Sep 22 2021, 11:32 PM · Restricted Project

Aug 25 2021

sberg added a comment to D106924: [Preprocessor] -E -P: Ensure newline after 8 skipped lines..

Bisecting shows that this commit causes

$ echo foo | clang -E -P -

foo

to emit a leading newline now.

That breaks e.g. LibreOffice's configure, which uses echo __clang_version__ | clang -E -P - to obtain the value of that macro, and expects a single line of output.

Aug 25 2021, 1:32 AM · Restricted Project

Aug 2 2021

sberg added a comment to D106924: [Preprocessor] -E -P: Ensure newline after 8 skipped lines..

Bisecting shows that this commit causes

$ echo foo | clang -E -P -
Aug 2 2021, 3:05 AM · Restricted Project
sberg added a comment to rG610a6bf50141: Introduce the VTable interleaving scheme to the CFI design documentation.
Aug 2 2021, 3:04 AM

Jun 28 2021

sberg added a comment to D99005: [clang] Implement P2266 Simpler implicit move.

I have talked to the MSVC STL maintainers. They would be open to a pull request for fixing this.
The repo can be found at https://github.com/microsoft/STL
Be my guest if you want to submit that fix yourself.
If not, I can probably do it in the near future.

Jun 28 2021, 12:24 AM · Restricted Project

Jun 25 2021

sberg added a comment to D99005: [clang] Implement P2266 Simpler implicit move.

And, again for the record, with a build of LibreOffice with clang-cl (and -Xclang -std=c++2b) on Windows, at least against the C++ standard library from Visual Studio 2019 version 16.20.2, I ran into two issues in the standard library itself, when using std::getline and std::istream::operator>>:

In file included from C:/lo-clang/core/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx:12:
C:/PROGRA~2/MIB055~1/2019/COMMUN~1/VC/Tools/MSVC/1429~1.300/Include\string(66,12): error: non-const lvalue reference to type 'basic_istream<...>' cannot bind to a temporary of type 'basic_istream<...>'
    return _Istr;
           ^~~~~
C:/PROGRA~2/MIB055~1/2019/COMMUN~1/VC/Tools/MSVC/1429~1.300/Include\string(78,12): note: in instantiation of function template specialization 'std::getline<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>>' requested here
    return getline(_STD move(_Istr), _Str, _Delim);
           ^
C:/lo-clang/core/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx(197,17): note: in instantiation of function template specialization 'std::getline<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>>' requested here
    while (std::getline(ss, sToken, L'|'))
                ^
1 error generated.
make[1]: *** [C:/lo-clang/core/solenv/gbuild/LinkTarget.mk:298: C:/lo-clang/core/workdir/CxxObject/setup_native/source/win32/customactions/reg_dlls/reg_dlls.o] Error 1
Jun 25 2021, 2:12 AM · Restricted Project

Jun 17 2021

sberg added a comment to D99005: [clang] Implement P2266 Simpler implicit move.

For the record, the one other breakage of a LibreOffice build with this is the handful of places that needed https://git.libreoffice.org/core/+/433ab39b2175bdadb4916373cd2dc8e1aabc08a5%5E%21 "Adapt implicit OString return value construction to C++23 P2266R1": In a nutshell, LO has an OString class with (non-explicit) constructors from any kind of char pointer or array, where the "array of N const char" variant (no. 3 below) is special, as it determines the string length as N - 1 (whereas all the other variants search for the terminating NUL to determine the length). That requires another constructor overload (no. 2 below) for non-const arrays, taking a non-const lvalue reference, which now causes issues when that constructor shall implicitly be used in return statements:

$ cat test.cc
#include <cstddef>
Jun 17 2021, 1:28 AM · Restricted Project

Jun 14 2021

sberg added a comment to D99005: [clang] Implement P2266 Simpler implicit move.

(In a build prior to https://reviews.llvm.org/rGc60dd3b2626a4d9eefd9f82f9a406b0d28d3fd72 "Revert '[clang] NRVO: Improvements and handling of more cases.'") I see the following (reduced from https://git.libreoffice.org/core/+/649313625b94e6b879848fc19b607b74375100bf/o3tl/qa/compile-temporary.cxx) started to fail under -std=c++2b with this change (and continues to compile fine with -std=c++20):

$ cat test.cc
template <typename T> constexpr T& temporary(T&& x) { return x; }
template <typename T> constexpr T& temporary(T&) = delete;
void f(int*);
int g();
void h()
{
    f(&temporary(int()));
    f(&temporary(g()));
}
Jun 14 2021, 11:20 PM · Restricted Project

Jun 13 2021

sberg committed rGb5b9489b2415: Only consider built-in compound assignment operators for -Wunused-but-set-* (authored by sberg).
Only consider built-in compound assignment operators for -Wunused-but-set-*
Jun 13 2021, 11:04 PM
sberg closed D103949: Only consider built-in compound assignment operators for -Wunused-but-set-*.
Jun 13 2021, 11:04 PM · Restricted Project

Jun 9 2021

sberg added inline comments to D103949: Only consider built-in compound assignment operators for -Wunused-but-set-*.
Jun 9 2021, 11:11 PM · Restricted Project
sberg accepted D103623: [Clang] Test case for -Wunused-but-set-variable, warn for volatile..

LGTM

Jun 9 2021, 5:33 AM · Restricted Project
sberg added a comment to D103949: Only consider built-in compound assignment operators for -Wunused-but-set-*.

gcc also ignores it?

Jun 9 2021, 3:24 AM · Restricted Project
sberg requested review of D103949: Only consider built-in compound assignment operators for -Wunused-but-set-*.
Jun 9 2021, 2:19 AM · Restricted Project

Jun 3 2021

sberg added a comment to D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable.

Is it intentional that this warns about volatile variables as in

void f(char * p) {
    volatile char c = 0;
    c ^= *p;
}

(I see that GCC warns about volatile too, at least when you replace the ^= with =, so assume the answer is "yes", but would just like to see that confirmed (ideally with a test case even?).)

Jun 3 2021, 3:59 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

May 6 2021

sberg added a comment to D97687: [SEH] Fix capture of this in lambda functions.

Bisecting shows that this started to break

$ cat test.cc
void f() noexcept { __try {} __finally {} }
$ clang-cl -EHs -c test.cc
clang-cl: ~/github.com/llvm/llvm-project/clang/lib/CodeGen/CGCleanup.h:568: void clang::CodeGen::EHScopeStack::popTerminate(): Assertion `!empty() && "popping exception stack when not empty"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: ~/llvm/inst/bin/clang-cl -EHs -c test.cc
1.	<eof> parser at end of file
2.	test.cc:1:6: LLVM IR generation of declaration 'f'
3.	test.cc:1:6: Generating code for declaration 'f'
 #0 0x00007f2fd211624d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) ~/github.com/llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:569:3
 #1 0x00007f2fd2114174 llvm::sys::RunSignalHandlers() ~/github.com/llvm/llvm-project/llvm/lib/Support/Signals.cpp:71:20
 #2 0x00007f2fd20368c8 HandleCrash ~/github.com/llvm/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:75:5
 #3 0x00007f2fd20368c8 CrashRecoverySignalHandler(int) ~/github.com/llvm/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:388:62
 #4 0x00007f2fd68f91e0 __restore_rt sigaction.c:0:0
 #5 0x00007f2fd1a4b9d5 raise /usr/src/debug/glibc-2.32-37-g760e1d2878/signal/../sysdeps/unix/sysv/linux/raise.c:50:1
 #6 0x00007f2fd1a348a4 abort /usr/src/debug/glibc-2.32-37-g760e1d2878/stdlib/abort.c:81:7
 #7 0x00007f2fd1a34789 get_sysdep_segment_value /usr/src/debug/glibc-2.32-37-g760e1d2878/intl/loadmsgcat.c:509:8
 #8 0x00007f2fd1a34789 _nl_load_domain.cold /usr/src/debug/glibc-2.32-37-g760e1d2878/intl/loadmsgcat.c:970:34
 #9 0x00007f2fd1a44026 .annobin___GI___assert_fail.end assert.c:0:0
#10 0x00007f2fd5871973 (~/llvm/inst/bin/../lib/libclangCodeGen.so.13git+0x44b973)
#11 0x00007f2fd587612a (~/llvm/inst/bin/../lib/libclangCodeGen.so.13git+0x45012a)
#12 0x00007f2fd5a85bbc clang::CodeGen::CodeGenFunction::FinishFunction(clang::SourceLocation) ~/github.com/llvm/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:405:3
#13 0x00007f2fd587f703 clang::CodeGen::CodeGenFunction::GenerateSEHFinallyFunction(clang::CodeGen::CodeGenFunction&, clang::SEHFinallyStmt const&) ~/github.com/llvm/llvm-project/clang/lib/CodeGen/CGException.cpp:2005:10
#14 0x00007f2fd587f776 pushCleanup<(anonymous namespace)::PerformSEHFinally, llvm::Function*> ~/github.com/llvm/llvm-project/clang/lib/CodeGen/EHScopeStack.h:273:31
#15 0x00007f2fd587f776 clang::CodeGen::CodeGenFunction::EnterSEHTryStmt(clang::SEHTryStmt const&) ~/github.com/llvm/llvm-project/clang/lib/CodeGen/CGException.cpp:2082:43
#16 0x00007f2fd587fa87 clang::CodeGen::CodeGenFunction::getJumpDestInCurrentScope(llvm::StringRef) ~/github.com/llvm/llvm-project/clang/lib/CodeGen/CodeGenFunction.h:1096:59
#17 0x00007f2fd587fa87 clang::CodeGen::CodeGenFunction::EmitSEHTryStmt(clang::SEHTryStmt const&) ~/github.com/llvm/llvm-project/clang/lib/CodeGen/CGException.cpp:1605:65
#18 0x00007f2fd5a21de4 clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) ~/github.com/llvm/llvm-project/clang/lib/CodeGen/CGStmt.cpp:447:31
#19 0x00007f2fd5a8499b clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) ~/github.com/llvm/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:1185:36
#20 0x00007f2fd5a9214a clang::CodeGen::CodeGenModule::getLangOpts() const ~/github.com/llvm/llvm-project/clang/lib/CodeGen/CodeGenModule.h:686:51
#21 0x00007f2fd5a9214a clang::CodeGen::CodeGenFunction::getLangOpts() const ~/github.com/llvm/llvm-project/clang/lib/CodeGen/CodeGenFunction.h:1921:67
#22 0x00007f2fd5a9214a clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) ~/github.com/llvm/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:1352:19
#23 0x00007f2fd5ad447c clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) ~/github.com/llvm/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:4791:3
#24 0x00007f2fd5ad0f7b clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) ~/github.com/llvm/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:3177:47
#25 0x00007f2fd5ad8c8a clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) (.part.0) ~/github.com/llvm/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:5895:1
#26 0x00007f2fd5b4e9a1 (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) ~/github.com/llvm/llvm-project/clang/lib/CodeGen/ModuleBuilder.cpp:169:67
#27 0x00007f2fd5a70b13 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) ~/github.com/llvm/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:217:7
#28 0x00007f2fcfbbd814 clang::ParseAST(clang::Sema&, bool, bool) ~/github.com/llvm/llvm-project/clang/lib/Parse/ParseAST.cpp:162:17
#29 0x00007f2fd3e3f4b9 clang::FrontendAction::Execute() ~/github.com/llvm/llvm-project/clang/lib/Frontend/FrontendAction.cpp:949:21
#30 0x00007f2fd3dd4cd6 llvm::Error::setChecked(bool) ~/github.com/llvm/llvm-project/llvm/include/llvm/Support/Error.h:305:22
#31 0x00007f2fd3dd4cd6 llvm::Error::operator bool() ~/github.com/llvm/llvm-project/llvm/include/llvm/Support/Error.h:236:15
#32 0x00007f2fd3dd4cd6 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) ~/github.com/llvm/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:955:42
#33 0x00007f2fd68e1a5b clang::ExecuteCompilerInvocation(clang::CompilerInstance*) ~/github.com/llvm/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:279:32
#34 0x0000000000219694 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) ~/github.com/llvm/llvm-project/clang/tools/driver/cc1_main.cpp:246:40
#35 0x0000000000212ced ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) ~/github.com/llvm/llvm-project/clang/tools/driver/driver.cpp:335:20
#36 0x00007f2fd3b56c85 operator() ~/github.com/llvm/llvm-project/clang/lib/Driver/Job.cpp:404:32
#37 0x00007f2fd3b56c85 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::'lambda'()>(long) ~/github.com/llvm/llvm-project/llvm/include/llvm/ADT/STLExtras.h:185:52
#38 0x00007f2fd2036a34 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) ~/github.com/llvm/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:425:10
#39 0x00007f2fd3b578eb clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (.part.0) ~/github.com/llvm/llvm-project/clang/lib/Driver/Job.cpp:408:10
#40 0x00007f2fd3b28552 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const ~/github.com/llvm/llvm-project/clang/lib/Driver/Compilation.cpp:196:3
#41 0x00007f2fd3b28c31 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const ~/github.com/llvm/llvm-project/clang/lib/Driver/Compilation.cpp:248:5
#42 0x00007f2fd3b34d71 llvm::SmallVectorBase<unsigned int>::empty() const ~/github.com/llvm/llvm-project/llvm/include/llvm/ADT/SmallVector.h:73:47
#43 0x00007f2fd3b34d71 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) ~/github.com/llvm/llvm-project/clang/lib/Driver/Driver.cpp:1539:28
#44 0x000000000021640a main ~/github.com/llvm/llvm-project/clang/tools/driver/driver.cpp:510:5
#45 0x00007f2fd1a361e2 __libc_start_main /usr/src/debug/glibc-2.32-37-g760e1d2878/csu/../csu/libc-start.c:314:16
#46 0x00000000002120ee _start (~/llvm/inst/bin/clang-cl+0x2120ee)
clang-12: error: clang frontend command failed with exit code 134 (use -v to see invocation)
clang version 13.0.0 (git@github.com:llvm/llvm-project 2224221fb3fa9738bd84221ed048247089187fce)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: ~/llvm/inst/bin

(It still works fine if you change the function's exception specification from noexcept to throw().)

May 6 2021, 1:57 AM · Restricted Project

Mar 23 2021

sberg added a comment to D98971: [C++20] [P1825] Fix bugs with implicit-move from variables of reference type.

FWIW, LibreOffice make check (which started to consistently fail with D88220) succeeds with this change.

Mar 23 2021, 6:50 AM · Restricted Project

Mar 19 2021

sberg added a comment to D88220: [C++20] P1825R0: More implicit moves.

This change causes

Mar 19 2021, 8:25 AM · Restricted Project

Jan 19 2021

sberg added a comment to D94536: [dsymutil] Warn on timestmap mismatch between object file and debug map.

As also reported at https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20210118/872711.html "Re: [llvm] 48d2068 - [dsymutil] Warn on timestmap mismatch between object file and debug map" about the re-revert https://github.com/llvm/llvm-project/commit/48d2068fb738302b9fba91c9bf8e4b051c3909eb "[dsymutil] Warn on timestmap mismatch between object file and debug map" (but for which there appears to be no Phabricator review of its own):

Jan 19 2021, 8:21 AM · Restricted Project

Jan 12 2021

sberg committed rG215ed9b33ccb: Adapt CastExpr::getSubExprAsWritten to ConstantExpr (authored by sberg).
Adapt CastExpr::getSubExprAsWritten to ConstantExpr
Jan 12 2021, 12:41 AM
sberg closed D87030: Adapt CastExpr::getSubExprAsWritten to ConstantExpr.
Jan 12 2021, 12:41 AM · Restricted Project

Dec 16 2020

sberg committed rG75f98f0f8c81: [PATCH] [compiler-rt] [builtins] Fix name of __aarch64_have_lse_atomics on… (authored by sberg).
[PATCH] [compiler-rt] [builtins] Fix name of __aarch64_have_lse_atomics on…
Dec 16 2020, 5:42 AM
sberg closed D93390: [compiler-rt] [builtins] Fix name of __aarch64_have_lse_atomics on Darwin.
Dec 16 2020, 5:42 AM · Restricted Project
sberg added a comment to D93390: [compiler-rt] [builtins] Fix name of __aarch64_have_lse_atomics on Darwin.

The one in cpu_model.c has 2 underscores. Where do the three come from for non-Apple?

Dec 16 2020, 4:01 AM · Restricted Project
sberg added a comment to D87030: Adapt CastExpr::getSubExprAsWritten to ConstantExpr.

Ping; OK to submit? (I meanwhile also get this when compiling some code with plain Clang, not just with the LibreOffice Clang plugin where I saw it originally.)

Dec 16 2020, 3:56 AM · Restricted Project
sberg requested review of D93390: [compiler-rt] [builtins] Fix name of __aarch64_have_lse_atomics on Darwin.
Dec 16 2020, 3:53 AM · Restricted Project

Nov 23 2020

sberg added a reverting change for rGf04d92af94a8: [X86] Produce R_X86_64_GOTPCRELX for test/binop instructions (MOV32rm/TEST32rm/.: D91965: Revert "[X86] Produce R_X86_64_GOTPCRELX for test/binop instructions (MOV32rm/TEST32rm/...) when -Wa,-mrelax-relocations=yes is enabled".
Nov 23 2020, 7:07 AM
sberg requested review of D91965: Revert "[X86] Produce R_X86_64_GOTPCRELX for test/binop instructions (MOV32rm/TEST32rm/...) when -Wa,-mrelax-relocations=yes is enabled".
Nov 23 2020, 7:07 AM · Restricted Project

Nov 3 2020

sberg added a comment to D90572: [clang] [MinGW] Allow using the vptr sanitizer.

Smells like this breaks various bots due to a -fsanitize=...,... option now listing 18 instead of 17 items, see http://lab.llvm.org:8011/#builders/76/builds/363, http://lab.llvm.org:8011/#builders/93/builds/430, http://lab.llvm.org:8011/#builders/66/builds/315, http://lab.llvm.org:8011/#builders/7/builds/303.

Nov 3 2020, 1:44 AM · Restricted Project

Nov 2 2020

sberg added a comment to D87030: Adapt CastExpr::getSubExprAsWritten to ConstantExpr.

ping

Nov 2 2020, 11:20 PM · Restricted Project
sberg committed rG7a5184ed951a: [scan-build] Fix clang++ pathname again (authored by sberg).
[scan-build] Fix clang++ pathname again
Nov 2 2020, 11:18 PM
sberg closed D89481: [scan-build] Fix clang++ pathname again.
Nov 2 2020, 11:18 PM · Restricted Project

Oct 28 2020

sberg updated the diff for D89481: [scan-build] Fix clang++ pathname again.

Is there a reason why "NoQ accepted this revision." kept this at "Needs Review" rather than moving it to "This revision is now accepted and ready to land."?

Oct 28 2020, 7:24 AM · Restricted Project

Oct 27 2020

sberg added a comment to D87030: Adapt CastExpr::getSubExprAsWritten to ConstantExpr.

ping

Oct 27 2020, 7:51 AM · Restricted Project
sberg added a comment to D89481: [scan-build] Fix clang++ pathname again.

ping

Oct 27 2020, 7:51 AM · Restricted Project

Oct 15 2020

sberg requested review of D89481: [scan-build] Fix clang++ pathname again.
Oct 15 2020, 9:23 AM · Restricted Project

Oct 2 2020

sberg added a comment to D87030: Adapt CastExpr::getSubExprAsWritten to ConstantExpr.

friendly ping

Oct 2 2020, 4:58 AM · Restricted Project

Sep 25 2020

sberg added a comment to D87030: Adapt CastExpr::getSubExprAsWritten to ConstantExpr.

ping^2

Sep 25 2020, 4:46 AM · Restricted Project

Sep 18 2020

sberg added inline comments to D87375: [compiler-rt] Support glibc's non-standard I printf flag character.
Sep 18 2020, 8:39 AM · Restricted Project
sberg updated the diff for D87030: Adapt CastExpr::getSubExprAsWritten to ConstantExpr.

(addressed the clang-tidy nitpick)

Sep 18 2020, 2:28 AM · Restricted Project
sberg added a comment to D87375: [compiler-rt] Support glibc's non-standard I printf flag character.

ping

Sep 18 2020, 12:17 AM · Restricted Project

Sep 9 2020

sberg requested review of D87375: [compiler-rt] Support glibc's non-standard I printf flag character.
Sep 9 2020, 6:03 AM · Restricted Project

Sep 2 2020

sberg added a comment to D87030: Adapt CastExpr::getSubExprAsWritten to ConstantExpr.

I hit this with a call to getSubExprAsWriten from the LibreOffice Clang plugin, have no idea whether it can be hit from within the compiler itself. Not sure if clang/unittests/Tooling/CastExprTest.cpp is the best place to add a test for it.

Sep 2 2020, 7:33 AM · Restricted Project
sberg requested review of D87030: Adapt CastExpr::getSubExprAsWritten to ConstantExpr.
Sep 2 2020, 7:31 AM · Restricted Project

Aug 12 2020

sberg added a comment to D68720: Support -fstack-clash-protection for x86.

I filed https://bugs.llvm.org/show_bug.cgi?id=47139 "Misspelled -fnostack-clash-protection" now.

Aug 12 2020, 9:10 AM · Restricted Project, Restricted Project
sberg added a comment to D85778: More accurately compute the ranges of possible values for +, -, *, &, %..

Fixes all the false positives it had reported for LibreOffice (which had all involved expressions containing either ~ or +).

Aug 12 2020, 5:19 AM · Restricted Project

Aug 11 2020

sberg added a comment to D85256: Add -Wtautological-value-range-compare warning..

I think this generates a false positive with test.cc

enum E { E1 = 1, E2 = 2 };
bool f(E e) { return ((e & E1) ? 1 : 0) + ((e & E2) ? 1 : 0) > 1; }

and clang++ -fsyntax-only -Wtautological-value-range-compare test.cc

test.cc:2:62: warning: result of comparison of 1-bit unsigned value > 1 is always false [-Wtautological-value-range-compare]
bool f(E e) { return ((e & E1) ? 1 : 0) + ((e & E2) ? 1 : 0) > 1; }
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Aug 11 2020, 1:46 AM · Restricted Project

Aug 10 2020

sberg added inline comments to D68720: Support -fstack-clash-protection for x86.
Aug 10 2020, 12:13 PM · Restricted Project, Restricted Project

Aug 6 2020

sberg added a comment to D85287: Extend -Wtautological-bitwise-compare "bitwise or with non-zero value" warnings.

Are you planning to allow this change to other warnings that use the same helper functions?

Aug 6 2020, 5:05 AM · Restricted Project

Aug 5 2020

sberg added a comment to D85287: Extend -Wtautological-bitwise-compare "bitwise or with non-zero value" warnings.

My naive assumption was that this warning had initially been restricted to integer literals and enumerators to avoid false positives. Hence my conservative approach of extending merely to constant integer expressions for now. Maybe Richard as the original author of the warning (IIUC) can shed some light on that original restriction?

Aug 5 2020, 1:38 PM · Restricted Project
sberg updated the diff for D85287: Extend -Wtautological-bitwise-compare "bitwise or with non-zero value" warnings.
Aug 5 2020, 5:24 AM · Restricted Project
sberg requested review of D85287: Extend -Wtautological-bitwise-compare "bitwise or with non-zero value" warnings.
Aug 5 2020, 2:28 AM · Restricted Project

Jul 28 2020

sberg committed rG2ead4fca79d0: Test including rpc/xdr.h requires sunrpc (authored by sberg).
Test including rpc/xdr.h requires sunrpc
Jul 28 2020, 11:25 PM