Page MenuHomePhabricator

sberg (Stephan Bergmann)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 26 2015, 8:20 AM (357 w, 17 h)

Recent Activity

Tue, Jun 28

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.

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

Mon, Jun 27

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]

Mon, Jun 27, 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.
Mon, Jun 27, 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.

Mon, Jun 27, 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

Mon, Jun 27, 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

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

Tue, Jun 21

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..

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

Mon, Jun 20

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.

Mon, Jun 20, 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?

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

Wed, Jun 15

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), [...]"

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

Fri, Jun 10

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.

Fri, Jun 10, 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
sberg closed D84740: [Sanitizers] Test including rpc/xdr.h requires sunrpc.
Jul 28 2020, 11:25 PM · Restricted Project
sberg updated subscribers of D84740: [Sanitizers] Test including rpc/xdr.h requires sunrpc.
Jul 28 2020, 5:03 AM · Restricted Project
sberg requested review of D84740: [Sanitizers] Test including rpc/xdr.h requires sunrpc.
Jul 28 2020, 4:19 AM · Restricted Project

Jul 27 2020

sberg added inline comments to D76646: Rename/refactor isIntegerConstantExpression to getIntegerConstantExpression.
Jul 27 2020, 7:19 AM · Restricted Project

Mar 27 2020

sberg added a comment to D76572: Replace `T(x)` with `reinterpret_cast<T>(x)` everywhere it means reinterpret_cast. No functional change.

Nice. Does LibreOffice have anything (either in clang-tidy or in a paper guideline) against T(x)-style casts? E.g.

No, we don't have very many of those in our codebase, so we have left them alone.
Our plugin is designed to convert c-style casts to modern C++ casts.

Mar 27 2020, 1:34 AM · Restricted Project, Restricted Project

Feb 13 2020

sberg abandoned D73637: Fix handling of OO_Spaceship in DecodeOperatorCall.
Feb 13 2020, 1:17 AM · Restricted Project
sberg added a comment to D73637: Fix handling of OO_Spaceship in DecodeOperatorCall.

ping^2

Feb 13 2020, 12:50 AM · Restricted Project

Feb 6 2020

sberg added a comment to D73637: Fix handling of OO_Spaceship in DecodeOperatorCall.

ping

Feb 6 2020, 7:48 AM · Restricted Project

Jan 30 2020

sberg updated the diff for D73637: Fix handling of OO_Spaceship in DecodeOperatorCall.

Minimal reproducer is

Jan 30 2020, 9:10 AM · Restricted Project

Jan 29 2020

sberg created D73637: Fix handling of OO_Spaceship in DecodeOperatorCall.
Jan 29 2020, 9:12 AM · Restricted Project

Dec 11 2019

sberg added a comment to D71393: Default to -fuse-init-array.

The title should probably read "Default to -fuse-init-array" (dropping the "no-")?

Dec 11 2019, 11:48 PM · Restricted Project
sberg added a comment to rG9e260c12bce7: [Diagnostics] Make behaviour of Clang's -Wdeprecated-copy same as in GCC.

GCC compatibility (they do it to reduce noise; so if we use same flag, we should diagnose same things).
I think it is good that clang and gcc warns same way now. But, if you want to improve it somehow (new flag?), patches are welcome.

Dec 11 2019, 2:03 AM
sberg added a comment to rG9e260c12bce7: [Diagnostics] Make behaviour of Clang's -Wdeprecated-copy same as in GCC.

Is there a rationale for that changed warning behavior? Even the current C++2a draft standard still e.g. deprecates copy operations when the destructor is user-declared (not just when it is user-provided), and I didn't find any indication that there is a plan to change that.

Dec 11 2019, 1:26 AM

Nov 8 2019

sberg added a comment to D58896: Suppress -Wchar-subscripts if the index is a literal char.

But how about literals like '\x80' where the promoted value depends on whether plain char is signed or unsigned?

If 'char' is signed and index into an array then this will typically trigger an -Warray-bounds warning because it references before the start of the array.

My thought was more that it might be useful as a kind of portability warning.

I'm not opposed to the warning per-se, but do you have evidence that the situation occurs in real-world code?

Nov 8 2019, 12:51 AM · Restricted Project
sberg added a comment to D58896: Suppress -Wchar-subscripts if the index is a literal char.

But how about literals like '\x80' where the promoted value depends on whether plain char is signed or unsigned?

If 'char' is signed and index into an array then this will typically trigger an -Warray-bounds warning because it references before the start of the array.

Nov 8 2019, 12:01 AM · Restricted Project

Nov 7 2019

sberg added a comment to D58896: Suppress -Wchar-subscripts if the index is a literal char.

But how about literals like '\x80' where the promoted value depends on whether plain char is signed or unsigned?

Nov 7 2019, 8:00 AM · Restricted Project

Oct 17 2019

sberg added inline comments to D68581: Include leading attributes in DeclStmt's SourceRange.
Oct 17 2019, 5:44 AM · Restricted Project
sberg committed rGdc3957ec215d: Include leading attributes in DeclStmt's SourceRange (authored by sberg).
Include leading attributes in DeclStmt's SourceRange
Oct 17 2019, 4:20 AM
sberg closed D68581: Include leading attributes in DeclStmt's SourceRange.
Oct 17 2019, 4:20 AM · Restricted Project
sberg committed rL375104: Include leading attributes in DeclStmt's SourceRange.
Include leading attributes in DeclStmt's SourceRange
Oct 17 2019, 4:20 AM

Oct 14 2019

sberg updated the diff for D68581: Include leading attributes in DeclStmt's SourceRange.
Oct 14 2019, 2:30 AM · Restricted Project

Oct 10 2019

sberg updated the diff for D68581: Include leading attributes in DeclStmt's SourceRange.
Oct 10 2019, 3:56 AM · Restricted Project

Oct 7 2019

sberg created D68581: Include leading attributes in DeclStmt's SourceRange.
Oct 7 2019, 8:22 AM · Restricted Project

Sep 3 2019

sberg committed rL370701: Request commit access for sberg.
Request commit access for sberg
Sep 3 2019, 12:22 AM

Aug 20 2019

sberg committed rG982b105d2f33: Rudimentary support for Doxygen \retval command (authored by sberg).
Rudimentary support for Doxygen \retval command
Aug 20 2019, 1:37 AM