Re: Patch for Bug 30413, including test case

2017-02-19 Thread Akira Hatanaka via cfe-commits
This patch changes the encoding of an id conforming to a protocol, which I think was not intended: For example: @encode(id) Would passing IVD to the call to getObjCEncodingForType in CGObjCGNU::GenerateClass solve the problem? > On Feb 15, 2017, at 1:59 PM, Lobron, David via cfe-commits > wr

[PATCH] D28348: [analyzer] Taught the analyzer about Glib API to check Memory-leak

2017-02-19 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai added a comment. Hi Anna, I am not clear why need to calculate the precise allocated size? for example: void *ptr = malloc(size); void *gptr = g_malloc_n(n_blocks, n_block_bytes); Memory-leak and Use-after-free issues' MallocChecker need the ***size*** or ***n_blocks*** x ***n_block_

r295635 - Enable support for __float128 in Clang on OpenBSD/X86

2017-02-19 Thread Brad Smith via cfe-commits
Author: brad Date: Sun Feb 19 21:18:15 2017 New Revision: 295635 URL: http://llvm.org/viewvc/llvm-project?rev=295635&view=rev Log: Enable support for __float128 in Clang on OpenBSD/X86 /usr/local/include/c++/4.9.4/type_traits:279:39: error: __float128 is not supported on this target Modified:

[PATCH] D28348: [analyzer] Taught the analyzer about Glib API to check Memory-leak

2017-02-19 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai marked 3 inline comments as done. xiangzhai added a comment. Hi Anna, Thank you so much for the review! I will try to implement extend MallocMemAux and ReallocMem in the follow up patch. Regards, Leslie Zhai Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cp

r295620 - Driver: inline a single caller of a function (NFC)

2017-02-19 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Sun Feb 19 15:50:40 2017 New Revision: 295620 URL: http://llvm.org/viewvc/llvm-project?rev=295620&view=rev Log: Driver: inline a single caller of a function (NFC) Inline the addCompilerRT call to the single caller. NFC. Modified: cfe/trunk/lib/Driver/Tools.cpp Modifi

r295614 - Always use --eh-frame-hdr on OpenBSD, even for -static

2017-02-19 Thread Brad Smith via cfe-commits
Author: brad Date: Sun Feb 19 14:11:48 2017 New Revision: 295614 URL: http://llvm.org/viewvc/llvm-project?rev=295614&view=rev Log: Always use --eh-frame-hdr on OpenBSD, even for -static Modified: cfe/trunk/lib/Driver/Tools.cpp cfe/trunk/test/Driver/openbsd.c Modified: cfe/trunk/lib/Drive

[PATCH] D30158: [clang-tidy] modernize: Find usage of random_shuffle and replace it with shuffle.

2017-02-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:78 + + Finds and fixes usage of random_shuffle as the function has been removed from C++17. + Please add std:: and enclose random_shuffle in ``. Comment at: docs/clang-ti

r295610 - Link static PIE programs against rcrt0.o on OpenBSD

2017-02-19 Thread Brad Smith via cfe-commits
Author: brad Date: Sun Feb 19 13:33:26 2017 New Revision: 295610 URL: http://llvm.org/viewvc/llvm-project?rev=295610&view=rev Log: Link static PIE programs against rcrt0.o on OpenBSD Patch by Stefan Kempf. Modified: cfe/trunk/lib/Driver/Tools.cpp cfe/trunk/test/Driver/openbsd.c Modified

r295609 - [CUDA] Don't pass -stack-protector to NVPTX compilations.

2017-02-19 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Sun Feb 19 13:05:32 2017 New Revision: 295609 URL: http://llvm.org/viewvc/llvm-project?rev=295609&view=rev Log: [CUDA] Don't pass -stack-protector to NVPTX compilations. We can't support stack-protector on NVPTX because NVPTX doesn't expose a stack to the compiler! Fixes PR3

[PATCH] D30158: [clang-tidy] modernize: Find usage of random_shuffle and replace it with shuffle.

2017-02-19 Thread Mads Ravn via Phabricator via cfe-commits
madsravn created this revision. Herald added subscribers: JDevlieghere, mgorny. random_shuffle was deprecated by C++14 and will be removed by C++17. This check will find and replace usage of random_shuffle with its modern counterpart (shuffle). https://reviews.llvm.org/D30158 Files: clang-t

[PATCH] D15227: [analyzer] Valist checkers.

2017-02-19 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D15227#681127, @zaks.anna wrote: > > But as far as I remember, this produced false negatives in the tests not > > false positives. > > Could you double check that? Maybe you still have some notes in your mail box > or just by looking at t

[PATCH] D30157: [analyzer] Improve valist check

2017-02-19 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. This patch makes the valist check more robust to the different kind of ASTs that are generated on different platforms: Generated on x86_64-pc-linux-gnu: |-TypedefDecl 0x1d07a40 <> implicit __builtin_ms_va_list 'char *' | `-PointerType 0x1d07a00 'char *'

[PATCH] D27827: [ObjC] CodeGen support for @available on macOS

2017-02-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 89067. erik.pilkington added a comment. This new patch just generates a call to the function `_IsOSVersionAtLeast` and branches on the result. `_IsOSVersionAtLeast` is going through review here: https://reviews.llvm.org/D30136. I decided to parse th

[PATCH] D30155: [clang-tools-extra] [test] Fix clang library dir in LD_LIBRARY_PATH For stand-alone build

2017-02-19 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added a project: clang-tools-extra. Prepend the clang library directory (determined using SHLIBDIR, alike in clang) to the LD_LIBRARY_PATH to ensure that just-built clang libraries will be used instead of a previous installed version. When a stand-alone build