[PATCH] D92001: [ubsan] Fix crash on __builtin_assume_aligned

2020-12-02 Thread Orivej Desh via Phabricator via cfe-commits
orivej added a comment. Could somebody review this? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92001/new/ https://reviews.llvm.org/D92001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D92001: [ubsan] Fix crash on __builtin_assume_aligned

2020-11-23 Thread Orivej Desh via Phabricator via cfe-commits
orivej added a comment. Sorry, I don't understand the issue and can't write a better description. Since this test triggers an assert in getCommonPtr that it "Cannot retrieve a NULL type pointer" of Ty->getPointeeType(), the fix just checks that the pointee is not null before using

[PATCH] D92001: [ubsan] Fix crash on __builtin_assume_aligned

2020-11-23 Thread Orivej Desh via Phabricator via cfe-commits
orivej updated this revision to Diff 307239. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92001/new/ https://reviews.llvm.org/D92001 Files: clang/lib/CodeGen/CodeGenFunction.cpp clang/test/CodeGen/ubsan-assume-aligned-crash.c Index: clang/test/CodeGen/ubsan-assume-aligned-crash.c

[PATCH] D92001: [ubsan] Fix crash on __builtin_assume_aligned

2020-11-23 Thread Orivej Desh via Phabricator via cfe-commits
orivej created this revision. orivej added reviewers: lebedev.ri, Tyker, rsmith. orivej added projects: clang, Sanitizers. Herald added a subscriber: cfe-commits. orivej requested review of this revision. Fixes PR45813 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D92001

[PATCH] D65988: [Clang Tablegen] Fix build when std::string::end() is not assignable

2019-08-08 Thread Orivej Desh via Phabricator via cfe-commits
orivej created this revision. orivej added a reviewer: clang. orivej added a project: clang. Herald added subscribers: cfe-commits, kadircet, arphaman. This fixes Clang error: expression is not assignable: Result.erase(--Result.end());

[PATCH] D45898: [SemaCXX] Mark destructor as referenced

2018-12-09 Thread Orivej Desh via Phabricator via cfe-commits
orivej added a comment. I have noticed that this change breaks seemingly valid code: class A { protected: ~A(); }; struct B : A {}; B f() { return B(); } B g() { return {}; } `f` compiles, but `g` fails with `temporary of type 'A' has protected destructor`. (g++ 8.2 compiles this

[PATCH] D45898: [SemaCXX] Mark destructor as referenced

2018-12-08 Thread Orivej Desh via Phabricator via cfe-commits
orivej added a comment. Actually, `arc-list-init-destruct.mm` crashes Clang 7 with the same backtrace as this test case, and Clang trunk generates similar assembly (to the the point that I could essentially copy the `// CHECK` comments from the .mm test to a .cpp test), so I'm not sure if

[PATCH] D45898: [SemaCXX] Mark destructor as referenced

2018-12-08 Thread Orivej Desh via Phabricator via cfe-commits
orivej added a comment. Herald added a subscriber: jkorous. The committed test does not crash Clang 7, but the following test does, yet it compiles without any warnings by the current Clang trunk thanks to this fix. struct A { ~A(); }; struct B : A {}; struct C { C(); B b; }; struct D

[PATCH] D53244: [Coverage] Fix PR39258: support coverage regions that start deeper than they end

2018-11-19 Thread Orivej Desh via Phabricator via cfe-commits
orivej added a comment. @vsk, I think this is ready, but I don't have the merge rights. Could you commit it and https://reviews.llvm.org/D53231 for me? Repository: rC Clang https://reviews.llvm.org/D53244 ___ cfe-commits mailing list

[PATCH] D53231: [Sema] Fix PR38987: keep end location of a direct initializer list

2018-10-31 Thread Orivej Desh via Phabricator via cfe-commits
orivej added a comment. https://reviews.llvm.org/D41921 was the last big change necessary to fix clang crashes on code coverage, but without the fixup in this review clang crashes on about 1.5 times more projects that I maintain than before. It seems useful to include this in the 7.0.1

[PATCH] D53244: [Coverage] Fix PR39258: support coverage regions that start deeper than they end

2018-10-31 Thread Orivej Desh via Phabricator via cfe-commits
orivej updated this revision to Diff 172042. orivej added a comment. Remove unrelated change. Repository: rC Clang https://reviews.llvm.org/D53244 Files: lib/CodeGen/CoverageMappingGen.cpp test/CoverageMapping/macros.c Index: test/CoverageMapping/macros.c

[PATCH] D53244: [Coverage] Fix PR39258: support coverage regions that start deeper than they end

2018-10-31 Thread Orivej Desh via Phabricator via cfe-commits
orivej updated this revision to Diff 172041. orivej added a comment. Herald added a subscriber: mgorny. Use relative line offset. Repository: rC Clang https://reviews.llvm.org/D53244 Files: lib/CodeGen/CoverageMappingGen.cpp test/CoverageMapping/macros.c tools/CMakeLists.txt Index:

[PATCH] D53244: [Coverage] Fix PR39258: support coverage regions that start deeper than they end

2018-10-15 Thread Orivej Desh via Phabricator via cfe-commits
orivej added a comment. Thanks! Could you merge this (after a while to let others review)? Comment at: test/CoverageMapping/macros.c:60 +// CHECK-NEXT: func6 +void func6(unsigned count) { // CHECK-NEXT: File 0, [[@LINE]]:28 -> [[@LINE+4]]:2 = #0 vsk wrote:

[PATCH] D53231: [Sema] Fix PR38987: keep end location of a direct initializer list

2018-10-14 Thread Orivej Desh via Phabricator via cfe-commits
orivej added a comment. I don't have the complete picture yet. (This is why the summary is so short.) I have looked up that `IK_DirectList` `Kind` was known not to carry a valid `ParenRange` since https://github.com/llvm-mirror/clang/commit/188158db29f50443b6e412f2a40c800b2669c957, and that

[PATCH] D53244: [Coverage] Fix PR39258: support coverage regions that start deeper than they end

2018-10-13 Thread Orivej Desh via Phabricator via cfe-commits
orivej updated this revision to Diff 169568. orivej added a comment. Fix typo Repository: rC Clang https://reviews.llvm.org/D53244 Files: lib/CodeGen/CoverageMappingGen.cpp test/CoverageMapping/macros.c Index: test/CoverageMapping/macros.c

[PATCH] D53244: [Coverage] Fix PR39258: support coverage regions that start deeper than they end

2018-10-13 Thread Orivej Desh via Phabricator via cfe-commits
orivej updated this revision to Diff 169562. orivej added a comment. This looks better to me. (There is no difference in check-clang test results.) Repository: rC Clang https://reviews.llvm.org/D53244 Files: lib/CodeGen/CoverageMappingGen.cpp test/CoverageMapping/macros.c Index:

[PATCH] D53244: [Coverage] Fix PR39258: support coverage regions that start deeper than they end

2018-10-13 Thread Orivej Desh via Phabricator via cfe-commits
orivej created this revision. orivej added reviewers: bogner, rsmith, vsk, aaron.ballman. Herald added a subscriber: cfe-commits. popRegions used to assume that the start location of a region can't be nested deeper than the end location, which is not always true. Repository: rC Clang

[PATCH] D53231: [Sema] Fix PR38987: keep end location of a direct initializer list

2018-10-12 Thread Orivej Desh via Phabricator via cfe-commits
orivej created this revision. orivej added reviewers: rsmith, vsk, aaron.ballman. Herald added a subscriber: cfe-commits. If PerformConstructorInitialization of a direct initializer list constructor is called while instantiating a template, it has brace locations in its BraceLoc arguments but

[PATCH] D41921: [Parse] Forward brace locations to TypeConstructExpr

2018-10-12 Thread Orivej Desh via Phabricator via cfe-commits
orivej added inline comments. Comment at: lib/Sema/SemaInit.cpp:6034 TSInfo = S.Context.getTrivialTypeSourceInfo(Entity.getType(), Loc); -SourceRange ParenOrBraceRange = - (Kind.getKind() == InitializationKind::IK_DirectList) - ? SourceRange(LBraceLoc,

[PATCH] D32146: PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+

2017-05-15 Thread Orivej Desh via Phabricator via cfe-commits
orivej added inline comments. Comment at: include/support/newlib/xlocale.h:20 +#if defined(__NEWLIB__) && (__NEWLIB__ == 2) \ +&& defined(__NEWLIB_MINOR__) && (__NEWLIB_MINOR__ >= 5) \ +&& (!defined(__POSIX_VISIBLE) || (__POSIX_VISIBLE < 200809)) You