[PATCH] D94640: adds more checks to -Wfree-nonheap-object

2021-03-04 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added a comment. Thanks for the information. I found the review now in https://reviews.llvm.org/D97512 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94640/new/ https://reviews.llvm.org/D94640 ___

[PATCH] D94640: adds more checks to -Wfree-nonheap-object

2021-03-04 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added a comment. This patch seems to introduce warnings for the case #include #include void foo(void* ptr) { free((void*)(intptr_t) ptr); } something that gcc don't warn for (see https://godbolt.org/z/1WT9c6 ). As intptr_t is suppose to be used to pass pointers in I think its a bit

[PATCH] D70527: [clang] Fix the canonicalization of paths in -fdiagnostics-absolute-paths

2019-12-26 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka marked 3 inline comments as done. Ka-Ka added a comment. I have now updated the testcase according to comments by @MaskRay in commit 073cdb239044 Thanks for post-commit review comments. Repository: rG LLVM Github

[PATCH] D64573: [Syntax] Allow to mutate syntax trees

2019-12-20 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added inline comments. Comment at: clang/lib/Tooling/Syntax/Mutations.cpp:74 + + if (auto *Parent = llvm::dyn_cast(S->parent())) { +// A child of CompoundStatement can just be safely removed. This line introduce a buildbot fail:

[PATCH] D70527: [clang] Fix the canonicalization of paths in -fdiagnostics-absolute-paths

2019-12-20 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Ka-Ka marked 2 inline comments as done. Closed by commit rGe8efac4b1530: [clang] Fix the canonicalization of paths in -fdiagnostics-absolute-paths (authored by Ka-Ka). Changed prior to commit:

[PATCH] D70527: [clang] Fix the canonicalization of paths in -fdiagnostics-absolute-paths

2019-12-17 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka updated this revision to Diff 234268. Ka-Ka marked 2 inline comments as done. Ka-Ka added a comment. Updated patch according to review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70527/new/ https://reviews.llvm.org/D70527 Files:

[PATCH] D70527: [clang] Fix the canonicalization of paths in -fdiagnostics-absolute-paths

2019-12-17 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added a comment. In D70527#1786718 , @rnk wrote: > In D70527#1785552 , @ikudrin wrote: > > > Personally, I would prefer to see the file name and path to be changed as > > little as possible because that

[PATCH] D70527: [clang] Fix the canonicalization of paths in -fdiagnostics-absolute-paths

2019-12-16 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70527/new/ https://reviews.llvm.org/D70527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D70527: [clang] Fix the canonicalization of paths in -fdiagnostics-absolute-paths

2019-11-21 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka created this revision. Ka-Ka added reviewers: rsmith, hans, rnk, ikudrin. Herald added a project: clang. In the current implementation of clang the canonicalization of paths in diagnostic messages (when using -fdiagnostics-absolute-paths) only works if the symbolic link is in the directory

[PATCH] D67606: Change signature of __builtin_rotateright64 back to unsigned

2019-09-16 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL371969: Change signature of __builtin_rotateright64 back to unsigned (authored by karka, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D67606: Change signature of __builtin_rotateright64 back to unsigned

2019-09-16 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka updated this revision to Diff 220294. Ka-Ka added a comment. Herald added subscribers: Jim, dylanmckay. Update testcases according to review comment. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67606/new/ https://reviews.llvm.org/D67606 Files:

[PATCH] D67606: Change signature of __builtin_rotateright64 back to unsigned

2019-09-16 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka created this revision. Ka-Ka added a reviewer: efriedma. Herald added a subscriber: kristina. Herald added a project: clang. The signature of __builtin_rotateright64 was by misstake changed from unsigned to signed in r360863, this patch will change it back to unsigned as intended. This

[PATCH] D62580: [OpenCL] Use long instead of long long in x86 builtins

2019-06-03 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka accepted this revision. Ka-Ka added a comment. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62580/new/ https://reviews.llvm.org/D62580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D62580: [OpenCL] Use long instead of long long in x86 builtins

2019-06-03 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added inline comments. Comment at: clang/test/CodeGen/builtins-x86.c:127-128 - tmp_V2LLi = __builtin_ia32_undef128(); - tmp_V4LLi = __builtin_ia32_undef256(); + tmp_V2LLi = (V2LLi)__builtin_ia32_undef128(); + tmp_V4LLi = (V4LLi)__builtin_ia32_undef256();

[PATCH] D62580: [OpenCL] Use long instead of long long in x86 builtins

2019-05-29 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added a comment. What about a testcase? It shouldn't be hard to add a small testcase that demonstrate that the changed builtins now work when compiling OpenCL C code for x86. I don't think you have to add all changed builtins to the testcase (but a few to demonstrate the change).

[PATCH] D61845: [builtin] Fixed definitions of builtins that rely on the int/long long type is 32/64 bits

2019-05-16 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL360863: [builtin] Fixed definitions of builtins that rely on the int/long long type is… (authored by karka, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

[PATCH] D61845: [builtin] Fixed definitions of builtins that rely on the int/long long type is 32/64 bits

2019-05-15 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka updated this revision to Diff 199559. Ka-Ka marked 2 inline comments as done. Ka-Ka added a comment. Updated according to review comments Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61845/new/ https://reviews.llvm.org/D61845 Files:

[PATCH] D61845: [builtin] Fixed definitions of builtins that rely on the int/long long type is 32/64 bits

2019-05-14 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka updated this revision to Diff 199385. Ka-Ka marked an inline comment as done. Ka-Ka added a comment. Added a new C++ testcase. Removed the REQUIRES: avr-registered-target in the avr-builtins.c testcase. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D61845: [builtin] Fixed definitions of builtins that rely on the int/long long type is 32/64 bits

2019-05-13 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka created this revision. Ka-Ka added reviewers: dylanmckay, spatel, rsmith. Herald added a subscriber: kristina. Herald added a project: clang. The definition of the builtins __builtin_bswap32, __builtin_bitreverse32, __builtin_rotateleft32 and __builtin_rotateright32 rely on that the int

[PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2019-01-03 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added a comment. Ping? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D17741/new/ https://reviews.llvm.org/D17741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2018-12-18 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added a comment. Ping? Do you think this small lit testcase below work as a testcase for the -ffile-macro-prefix-to-remove option? // RUN: %clang_cc1 -emit-llvm %s -o - -ffile-macro-prefix-to-remove=%s | FileCheck %s char this_file[] = __FILE__; // CHECK: @this_file = global [1 x i8]

[PATCH] D55438: Assert on conflicting fixes for -fix option

2018-12-07 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka created this revision. Herald added a subscriber: cfe-commits. Changed the assert and corresponding warning message for conflicting fixes to only trigger if clang-tidy is run with -fix or -fix-errors. The Fix and FixErrors variables are now passed as parameters when creating respective

[PATCH] D45686: [Driver] Clean up tmp files when deleting Compilation objects

2018-05-26 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added a comment. In https://reviews.llvm.org/D45686#1113426, @lebedev.ri wrote: > In https://reviews.llvm.org/D45686#1113425, @Ka-Ka wrote: > > > In https://reviews.llvm.org/D45686#1113414, @aaron.ballman wrote: > > > > > In https://reviews.llvm.org/D45686#1109295, @dstenb wrote: > > > > >

[PATCH] D45686: [Driver] Clean up tmp files when deleting Compilation objects

2018-05-26 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added a comment. In https://reviews.llvm.org/D45686#1113414, @aaron.ballman wrote: > In https://reviews.llvm.org/D45686#1109295, @dstenb wrote: > > > Ping. > > > > We have added a lit reproducer for this now in clang-tools-extra: > > https://reviews.llvm.org/D47251. > > > The above should

[PATCH] D45686: [Driver] Clean up tmp files when deleting Compilation objects

2018-05-26 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added a reviewer: JDevlieghere. Ka-Ka added a comment. Added Jonas Devlieghere as reviewer as he was involved in the review of https://reviews.llvm.org/rL327851 (which seems to be the reason for this patch). https://reviews.llvm.org/D45686

[PATCH] D46052: GNUstep Objective-C ABI version 2

2018-05-22 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added inline comments. Comment at: lib/CodeGen/CGObjCGNU.cpp:1056 +char c = Str[i]; +if (isalpha(c) || isnumber(c)) + StringName += c; The isnumber() function was added to cctype.h by Apple. I don't think it can be used in llvm.

[PATCH] D37428: Debug info: Fixed faulty debug locations for attributed statements

2017-09-05 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added inline comments. Comment at: test/CodeGen/debug-info-attributed-stmt.c:1 +// RUN: %clang_cc1 -triple x86_64-unk-unk -disable-llvm-passes -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s + echristo wrote: > Since we're not optimizing or

[PATCH] D37428: Debug info: Fixed faulty debug locations for attributed statements

2017-09-05 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added a comment. In https://reviews.llvm.org/D37428#861140, @dblaikie wrote: > Not sure what you mean by "avoid emitting unnecessary stop points" - do you > have a test case for that? In my previous patch you could end up doing two calls to EmitStopPoint() for the same statement. In

[PATCH] D37428: Debug info: Fixed faulty debug locations for attributed statements

2017-09-05 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka updated this revision to Diff 113803. Ka-Ka edited the summary of this revision. Ka-Ka added a reviewer: dblaikie. Ka-Ka added a comment. I updated the testcase according to what David Blaikie suggested. I also rewrote to code to be a bit more robust and avoid emitting unnecessary

[PATCH] D37428: Debug info: Fixed faulty debug locations for attributed statements

2017-09-03 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added inline comments. Comment at: test/CodeGen/debug-info-attributed-stmt.c:18 +// CHECK: br label %while.cond, !dbg ![[NUM]], !llvm.loop +// CHECK: ![[NUM]] = !DILocation(line: 9, scope: !14) +} The part "scope: !14)" should be removed from the testcase.

[PATCH] D37428: Debug info: Fixed faulty debug locations for attributed statements

2017-09-03 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka created this revision. Herald added a subscriber: aprantl. As no stoppoint was generated the attributed statements got faulty debug locations. https://reviews.llvm.org/D37428 Files: lib/CodeGen/CGStmt.cpp test/CodeGen/debug-info-attributed-stmt.c Index: