Page MenuHomePhabricator

sberg (Stephan Bergmann)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 26 2015, 8:20 AM (269 w, 1 h)

Recent Activity

Thu, Oct 15

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

Fri, Oct 2

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

friendly ping

Fri, Oct 2, 4:58 AM · Restricted Project

Fri, Sep 25

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

ping^2

Fri, Sep 25, 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

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
sberg committed rL369345: Rudimentary support for Doxygen \retval command.
Rudimentary support for Doxygen \retval command
Aug 20 2019, 1:36 AM
sberg closed D66350: Rudimentary support for Doxygen \retval command.
Aug 20 2019, 1:36 AM · Restricted Project, Restricted Project

Aug 16 2019

sberg created D66350: Rudimentary support for Doxygen \retval command.
Aug 16 2019, 7:35 AM · Restricted Project, Restricted Project

Jul 15 2019

sberg added a comment to D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".

eh, the summary here doesn't get updated from the actual git commit message :(

Jul 15 2019, 11:30 PM · Restricted Project, Restricted Project, Restricted Project
sberg committed rGe215996a2932: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO" (authored by sberg).
Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO"
Jul 15 2019, 11:26 PM
sberg committed rL366186: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".
Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO"
Jul 15 2019, 11:25 PM
sberg closed D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".
Jul 15 2019, 11:25 PM · Restricted Project, Restricted Project, Restricted Project
sberg updated the diff for D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".
  • Disallowed -fsanitize=function in combination with -fsanitize-minimal-runtime now.
Jul 15 2019, 8:00 AM · Restricted Project, Restricted Project, Restricted Project

Jun 26 2019

sberg updated subscribers of D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".

Any thoughts on this? (cfe-commits had inadvertently been missing from subscribers, it touches clang as well as compiler-rt.)

Jun 26 2019, 11:50 PM · Restricted Project, Restricted Project, Restricted Project

Jun 24 2019

sberg added a project to D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO": Restricted Project.
Jun 24 2019, 12:11 PM · Restricted Project, Restricted Project, Restricted Project
sberg added a comment to D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".

friendly ping

Jun 24 2019, 12:11 PM · Restricted Project, Restricted Project, Restricted Project

Jun 18 2019

sberg added a comment to D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".

friendly ping

Jun 18 2019, 8:01 AM · Restricted Project, Restricted Project, Restricted Project

Jun 11 2019

sberg added a comment to D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".

friendly ping

Jun 11 2019, 1:18 AM · Restricted Project, Restricted Project, Restricted Project

Jun 4 2019

sberg added a comment to D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".

friendly ping

Jun 4 2019, 12:26 AM · Restricted Project, Restricted Project, Restricted Project

May 21 2019

sberg updated the diff for D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".

Of course, adding missing tests reveals shortcomings in the new code.

May 21 2019, 7:01 AM · Restricted Project, Restricted Project, Restricted Project

May 2 2019

sberg added a comment to D60760: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.

Added missing tests at https://reviews.llvm.org/D61479 "Add tests for 'Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO'".

May 2 2019, 11:57 PM · Restricted Project, Restricted Project, Restricted Project
sberg created D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO".
May 2 2019, 11:55 PM · Restricted Project, Restricted Project, Restricted Project
sberg added a comment to D60760: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.

Did this get reviewed?

May 2 2019, 1:27 AM · Restricted Project, Restricted Project, Restricted Project
sberg committed rG2f0ef58e535c: Fix for Windows (authored by sberg).
Fix for Windows
May 2 2019, 12:05 AM
sberg committed rCRT359760: Fix for Windows.
Fix for Windows
May 2 2019, 12:03 AM
sberg committed rL359760: Fix for Windows.
Fix for Windows
May 2 2019, 12:03 AM

May 1 2019

sberg committed rG5745eccef54d: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO (authored by sberg).
Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO
May 1 2019, 11:40 PM
sberg committed rL359759: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.
Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO
May 1 2019, 11:40 PM
sberg committed rCRT359759: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.
Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO
May 1 2019, 11:40 PM
sberg committed rC359759: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.
Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO
May 1 2019, 11:40 PM
sberg closed D60760: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.
May 1 2019, 11:40 PM · Restricted Project, Restricted Project, Restricted Project

Apr 23 2019

sberg added a comment to D60760: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.

friendly ping

Apr 23 2019, 2:01 AM · Restricted Project, Restricted Project, Restricted Project

Apr 16 2019

sberg added inline comments to D60760: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.
Apr 16 2019, 1:08 AM · Restricted Project, Restricted Project, Restricted Project
sberg created D60760: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO.
Apr 16 2019, 1:08 AM · Restricted Project, Restricted Project, Restricted Project

Feb 13 2019

sberg added a comment to D58056: Look through typedefs in getFunctionTypeWithExceptionSpec.

committed for now to get the crash fixed; if there are issues with the test they can be addressed later

Feb 13 2019, 1:44 AM · Restricted Project
sberg committed rG84dcc8f36fe2: Look through typedefs in getFunctionTypeWithExceptionSpec (authored by sberg).
Look through typedefs in getFunctionTypeWithExceptionSpec
Feb 13 2019, 1:42 AM
sberg committed rL353931: Look through typedefs in getFunctionTypeWithExceptionSpec.
Look through typedefs in getFunctionTypeWithExceptionSpec
Feb 13 2019, 1:42 AM
sberg committed rC353931: Look through typedefs in getFunctionTypeWithExceptionSpec.
Look through typedefs in getFunctionTypeWithExceptionSpec
Feb 13 2019, 1:42 AM
sberg closed D58056: Look through typedefs in getFunctionTypeWithExceptionSpec.
Feb 13 2019, 1:42 AM · Restricted Project

Feb 11 2019

sberg added a comment to D58056: Look through typedefs in getFunctionTypeWithExceptionSpec.

The change itself should probably be uncontroversial (the bad cast had been there ever since getFunctionTypeWithExceptionSpec had been introduced with r221918), but I'm not sure about the test: It tests the relevant code somewhat indirectly; is it fine in clang/test/AST/?; or is such a test even overkill?

Feb 11 2019, 8:52 AM · Restricted Project
sberg created D58056: Look through typedefs in getFunctionTypeWithExceptionSpec.
Feb 11 2019, 8:47 AM · Restricted Project

Jan 16 2019

sberg added a comment to D55741: Implementation Feature Test Macros for P0722R3.

One problem I found with the macro __cpp_impl_destroying_delete not being conditional on language version is the following: Recent GCC trunk (since https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=76b94d4ba654e9af1882865933343d11f5c3b18b "Implement P0722R3, destroying operator delete.") contains

#if __cpp_impl_destroying_delete
#define __cpp_lib_destroying_delete 201806L
namespace std
{
  struct destroying_delete_t
  {
    explicit destroying_delete_t() = default;
  };
  inline constexpr destroying_delete_t destroying_delete{};
}
#endif // destroying delete

at "top-level" (i.e., not in a C++20-only #if or similar) in libstdc++-v3/libsupc++/new. That means that when using Clang against that GCC toolchain, #include <new> in C++03 mode will cause error: unknown type name 'constexpr'.

Jan 16 2019, 2:50 PM · Restricted Project

Nov 1 2018

sberg added a comment to D53974: [clang-tidy] new check: bugprone-too-small-loop-variable.

I run the new checker on LibreOffice project. I found ~25 false positives, which seems small enough to me. This false positives can be supressed easily.

Nov 1 2018, 7:46 AM · Restricted Project

Oct 23 2018

sberg added a comment to D52400: Improve -Wshadow warnings with enumerators.

I've silenced this scenario in r344898, thank you for raising the issue!

Oct 23 2018, 12:59 AM

Oct 17 2018

sberg added a comment to D52400: Improve -Wshadow warnings with enumerators.

[...]

Then again, this is a case where you don't get any error but you do get a silent behavioral ambiguity without the current enumerator shadow diagnostic:

struct S1;
struct S2;
struct S3 {
  void S1();
  enum { S2 };

  void f(decltype(S2) s);
};

So there are cases where this behavior can be somewhat useful.

Oct 17 2018, 2:41 AM

Oct 16 2018

sberg added a comment to D52400: Improve -Wshadow warnings with enumerators.

doesnt this make -Wshadow more aggressive for enumerators than for other entities?

Oct 16 2018, 3:38 AM

May 31 2018

sberg committed rCRT333638: Missing include.
Missing include
May 31 2018, 2:30 AM
sberg committed rL333638: Missing include.
Missing include
May 31 2018, 2:30 AM

Apr 18 2018

sberg added a comment to D45112: [MS] Emit vftable thunks for functions with incomplete prototypes.

see https://bugs.llvm.org/show_bug.cgi?id=37161 "clang-cl triggers ASTContext::getASTRecordLayout Assertion `D && 'Cannot get layout of forward declarations!''" for what appears to be fallout from this change

Apr 18 2018, 7:05 AM

Apr 17 2018

sberg added a comment to D45601: Warn on bool* to bool conversion.

A random data point from trying this patch on the LibreOffice code base:

Apr 17 2018, 2:12 AM
sberg added a comment to D41228: [ObjC] Enable __strong pointers in structs under ARC.

It looks like this caused a clang-cl regression https://bugs.llvm.org/show_bug.cgi?id=37146 "clang-cl emits special functions for non-trivial C-structs ('__destructor_8') introduced for Objective-C".

Apr 17 2018, 12:09 AM

Mar 7 2018

sberg committed rC326990: Propagate DLLAttr to friend re-declarations of member functions.
Propagate DLLAttr to friend re-declarations of member functions
Mar 7 2018, 11:37 PM
sberg committed rL326990: Propagate DLLAttr to friend re-declarations of member functions.
Propagate DLLAttr to friend re-declarations of member functions
Mar 7 2018, 11:37 PM
sberg closed D16632: clang-cl: Take dllexport from original function decl into account.
Mar 7 2018, 11:37 PM
sberg updated the diff for D16632: clang-cl: Take dllexport from original function decl into account.

Turns out DLLAttr-inherited-from-class is only added to members during Sema::CheckCompletedClass -> Sema::checkClassLevelDLLAttribute, when friend re-decls of those members may already have been created.

Mar 7 2018, 6:17 AM

Jan 5 2018

sberg added a comment to D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17.

Should this be backported to Clang 6? Not sure how widespread a problem this is in practice (it hit me with LibreOffice).

Jan 5 2018, 12:06 AM · Restricted Project
sberg committed rC321861: Commit new test file forgotten in previous commit.
Commit new test file forgotten in previous commit
Jan 5 2018, 12:01 AM
sberg committed rL321861: Commit new test file forgotten in previous commit.
Commit new test file forgotten in previous commit
Jan 5 2018, 12:01 AM

Jan 4 2018

sberg committed rL321859: No -fsanitize=function warning when calling noexcept function through non….
No -fsanitize=function warning when calling noexcept function through non…
Jan 4 2018, 11:58 PM
sberg committed rL321860: o -fsanitize=function warning when calling noexcept function through non….
o -fsanitize=function warning when calling noexcept function through non…
Jan 4 2018, 11:58 PM
sberg committed rC321859: No -fsanitize=function warning when calling noexcept function through non….
No -fsanitize=function warning when calling noexcept function through non…
Jan 4 2018, 11:58 PM
sberg committed rCRT321860: o -fsanitize=function warning when calling noexcept function through non….
o -fsanitize=function warning when calling noexcept function through non…
Jan 4 2018, 11:58 PM