[PATCH] D47643: Rewrite JSON dispatcher loop using C IO (FILE*) instead of std::istream.

2018-06-03 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D47643#1119187, @sammccall wrote: > @malaperle: would you mind patching this in and checking whether attaching a > debugger still works on Mac (this was the reason for the EINTR loop, right?) > > I want to preserve this but now people other

[PATCH] D47694: [CUDA][HIP] Do not emit type info when compiling for device

2018-06-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D47694#1120367, @rjmccall wrote: > Why not just have the driver disable RTTI in the frontend invocation? CUDA/HIP uses single source for device and host. The host code may depend on RTTI, e.g., an application may include some boost headers

r333865 - [X86] Fix a couple places that were using macro arguments twice when of the usages could just be undefined.

2018-06-03 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sun Jun 3 19:56:18 2018 New Revision: 333865 URL: http://llvm.org/viewvc/llvm-project?rev=333865=rev Log: [X86] Fix a couple places that were using macro arguments twice when of the usages could just be undefined. One of the arguments was being used when the passthru

[PATCH] D46805: If some platforms do not support an attribute, we should exclude the platform

2018-06-03 Thread Li Jia He via Phabricator via cfe-commits
HLJ2009 updated this revision to Diff 149665. HLJ2009 added a comment. update test case. Repository: rC Clang https://reviews.llvm.org/D46805 Files: include/clang/Basic/Attr.td test/Sema/attr-alias-has.c test/Sema/attr-alias.c Index: test/Sema/attr-alias.c

[PATCH] D47694: [CUDA][HIP] Do not emit type info when compiling for device

2018-06-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Why not just have the driver disable RTTI in the frontend invocation? https://reviews.llvm.org/D47694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45517: [analyzer] False positive refutation with Z3

2018-06-03 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho updated this revision to Diff 149664. mikhail.ramalho edited the summary of this revision. mikhail.ramalho added a comment. Fix naming issue. https://reviews.llvm.org/D45517 Files: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h

[PATCH] D47640: Moved RangedConstraintManager header to the StaticAnalyser include dir

2018-06-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC333862: Moved RangedConstraintManager header to the StaticAnalyser include dir (authored by mramalho, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit:

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-06-03 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added a comment. Overestimated the work of supporting typeid and _Generic, done now. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-06-03 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 149661. shuaiwang marked 4 inline comments as done. shuaiwang added a comment. Handle typeid and generic selection. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679 Files: clang-tidy/utils/CMakeLists.txt

[PATCH] D47376: [CUDA][HIP] Do not offload for -M

2018-06-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping https://reviews.llvm.org/D47376 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47694: [CUDA][HIP] Do not emit type info when compiling for device

2018-06-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: rjmccall, tra. CUDA/HIP does not support RTTI on device side, therefore there is no point of emitting type info when compiling for device. Emitting type info for device not only clutters the IR with useless global variables, but also causes

r333858 - [X86] Remove superfluous escaped new lines from intrinsic files.

2018-06-03 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sun Jun 3 16:31:01 2018 New Revision: 333858 URL: http://llvm.org/viewvc/llvm-project?rev=333858=rev Log: [X86] Remove superfluous escaped new lines from intrinsic files. Modified: cfe/trunk/lib/Headers/avx512fintrin.h Modified: cfe/trunk/lib/Headers/avx512fintrin.h

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-06-03 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added inline comments. Comment at: clang-tidy/utils/ExprMutationAnalyzer.cpp:34-38 +const ast_matchers::internal::VariadicDynCastAllOfMatcher +cxxTypeidExpr; + +const ast_matchers::internal::VariadicDynCastAllOfMatcher +cxxNoexceptExpr;

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-06-03 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 149659. shuaiwang marked 5 inline comments as done. shuaiwang added a comment. Handle sizeof on VLA. Added test case for typeof() Added TODO for handling typeid and generic selection. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679

[PATCH] D45517: [analyzer] False positive refutation with Z3

2018-06-03 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. > I pretty sure it was not related to the optimizations, I removed them days ago (in the previous version of this patch) and the bug was still there. OK so any idea what the change could have been? Clearly the bug was there but not now. Anyway, should be OK to

[PATCH] D47693: [X86] Use target independent masked expandload and compressstore intrinsics to implement expandload/compressstore builtins.

2018-06-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: RKSimon, delena, spatel, GBuella. Herald added a subscriber: cfe-commits. We've had these target independent intrinsics for at least a year and a half. Looks like they do exactly what we need here and the backend already supports

[PATCH] D45517: [analyzer] False positive refutation with Z3

2018-06-03 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added a subscriber: rnkovacs. mikhail.ramalho added a comment. > Awesome! Does it mean that the optimization for adding less constraints > was in fact buggy? I pretty sure it was not related to the optimizations, I removed them days ago (in the previous version of this patch)

r333855 - [X86] Explicitly make the arguments to __slwpcb intrinsic 'void'.

2018-06-03 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sun Jun 3 15:05:19 2018 New Revision: 333855 URL: http://llvm.org/viewvc/llvm-project?rev=333855=rev Log: [X86] Explicitly make the arguments to __slwpcb intrinsic 'void'. This is the correct way to say it takes no arguments in C. Modified:

[PATCH] D45517: [analyzer] False positive refutation with Z3

2018-06-03 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added a comment. This revision now requires changes to proceed. > I updated the test case as the cross check is not marking the true bug as > invalid anymore. Awesome! Does it mean that the optimization for adding less

r333853 - [X86] Replace __builtin_ia32_vbroadcastf128_pd256 and __builtin_ia32_vbroadcastf128_ps256 with an unaligned load intrinsics and a __builtin_shufflevector call.

2018-06-03 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sun Jun 3 12:42:59 2018 New Revision: 333853 URL: http://llvm.org/viewvc/llvm-project?rev=333853=rev Log: [X86] Replace __builtin_ia32_vbroadcastf128_pd256 and __builtin_ia32_vbroadcastf128_ps256 with an unaligned load intrinsics and a __builtin_shufflevector call.

[PATCH] D47070: [CUDA] Upgrade linked bitcode to enable inlining

2018-06-03 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld abandoned this revision. Hahnfeld added a comment. Superseded by https://reviews.llvm.org/D47691 Repository: rC Clang https://reviews.llvm.org/D47070 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r333851 - [X86] Pass ArrayRef instead of SmallVectorImpl& to the X86 builtin helper functions. NFC

2018-06-03 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sun Jun 3 12:02:57 2018 New Revision: 333851 URL: http://llvm.org/viewvc/llvm-project?rev=333851=rev Log: [X86] Pass ArrayRef instead of SmallVectorImpl& to the X86 builtin helper functions. NFC Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp Modified:

r333850 - Revert r333848 "[X86] Pass ArrayRef instead of SmallVectorImpl& to the X86 builtin helper functions. NFC"

2018-06-03 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sun Jun 3 11:41:22 2018 New Revision: 333850 URL: http://llvm.org/viewvc/llvm-project?rev=333850=rev Log: Revert r333848 "[X86] Pass ArrayRef instead of SmallVectorImpl& to the X86 builtin helper functions. NFC" Looks like I missed some changes to make this work.

r333848 - [X86] Pass ArrayRef instead of SmallVectorImpl& to the X86 builtin helper functions. NFC

2018-06-03 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sun Jun 3 11:08:37 2018 New Revision: 333848 URL: http://llvm.org/viewvc/llvm-project?rev=333848=rev Log: [X86] Pass ArrayRef instead of SmallVectorImpl& to the X86 builtin helper functions. NFC Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp Modified:

r333846 - [X86] Mark the pointer arguments to expandload builtins as const consistently.

2018-06-03 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sun Jun 3 11:08:34 2018 New Revision: 333846 URL: http://llvm.org/viewvc/llvm-project?rev=333846=rev Log: [X86] Mark the pointer arguments to expandload builtins as const consistently. Some of them had it and some didn't. This should make them consistent. Modified:

r333847 - [X86] When emitting masked loads/stores don't check for all ones mask.

2018-06-03 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sun Jun 3 11:08:36 2018 New Revision: 333847 URL: http://llvm.org/viewvc/llvm-project?rev=333847=rev Log: [X86] When emitting masked loads/stores don't check for all ones mask. This seems like a premature optimization. It's unlikely a user would pass something the

[PATCH] D47394: [OpenMP][Clang][NVPTX] Replace bundling with partial linking for the OpenMP NVPTX device offloading toolchain

2018-06-03 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D47394#1119489, @gtbercea wrote: > In https://reviews.llvm.org/D47394#1119056, @Hahnfeld wrote: > > > Hmm, maybe the scope is much larger: I just tried linking an executable > > that references a `declare target` function in a shared

[PATCH] D45517: [analyzer] False positive refutation with Z3

2018-06-03 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added inline comments. Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:2366 + + SMTConstraintManager *SMTRefutationMgr = + static_cast(RefutationMgr.get()); I'm not happy about this cast. Suggestions are welcome.

[PATCH] D45517: [analyzer] False positive refutation with Z3

2018-06-03 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho updated this revision to Diff 149653. mikhail.ramalho added a comment. Update patch based on https://reviews.llvm.org/D47640 and https://reviews.llvm.org/D47689. I updated the test case as the cross check is not marking the true bug as invalid anymore. My `make clang-test` is

[PATCH] D47687: fix: [Bug 18971] - Missing -Wparentheses warning

2018-06-03 Thread eric via Phabricator via cfe-commits
Higuoxing added a comment. In https://reviews.llvm.org/D47687#1120226, @lebedev.ri wrote: > In https://reviews.llvm.org/D47687#1120213, @Higuoxing wrote: > > > As for some test cases, > > > The tests need to be within the patch itself, in this case > i guess that should go into

[PATCH] D47687: fix: [Bug 18971] - Missing -Wparentheses warning

2018-06-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D47687#1120213, @Higuoxing wrote: > As for some test cases, The tests need to be within the patch itself, in this case i guess that should go into `clang/test/Sema/`. See other tests in there on how to write them. And they will be run via

[PATCH] D47687: fix: [Bug 18971] - Missing -Wparentheses warning

2018-06-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added reviewers: rsmith, aaron.ballman. lebedev.ri added a comment. Tests? Repository: rC Clang https://reviews.llvm.org/D47687 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D47687: fix: [Bug 18971] - Missing -Wparentheses warning

2018-06-03 Thread eric via Phabricator via cfe-commits
Higuoxing added a comment. As for some test cases, $ cat a.cc #include #include #define bar(x) \ ( \ ( std::cout << x ) \ ) bool x; int val; void foo(bool b) { std::cout << b << std::endl; } int main () { foo(x && val == 4 || (!x &&

[PATCH] D47687: fix: [Bug 18971] - Missing -Wparentheses warning

2018-06-03 Thread eric via Phabricator via cfe-commits
Higuoxing created this revision. Herald added a subscriber: cfe-commits. Higuoxing edited the summary of this revision. Hi, As you see, to avoid some expression like assert(x || y && "some messages"); clang will skip all the parentheses check if the expression is in `macro`; and this rule is

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-06-03 Thread Whisperity via Phabricator via cfe-commits
whisperity requested changes to this revision. whisperity added a comment. This revision now requires changes to proceed. In general, make sure the documentation page renders well in a browser. Mostly style and phrasing stuff inline: Comment at:

[PATCH] D41168: [X86] Lowering X86 avx512 sqrt intrinsics to IR

2018-06-03 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added inline comments. Comment at: test/CodeGen/sse2-builtins.c:1199 // CHECK-LABEL: test_mm_sqrt_sd - // CHECK: call <2 x double> @llvm.x86.sse2.sqrt.sd(<2 x double> %{{.*}}) - // CHECK: extractelement <2 x double> %{{.*}}, i32 0 - // CHECK: insertelement <2 x

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-06-03 Thread mephi42 via Phabricator via cfe-commits
mephi42 added a comment. This change is very useful for me (I even rebuilt my clang-format with it), but there were no updates for quite some time - do you still intend to integrate it? Apologies in advance if Phabricator is not the right place for such discussions. Repository: rC Clang

r333836 - clang-interpreter: Add missing LLVM component Object

2018-06-03 Thread Fangrui Song via cfe-commits
Author: maskray Date: Sun Jun 3 01:12:15 2018 New Revision: 333836 URL: http://llvm.org/viewvc/llvm-project?rev=333836=rev Log: clang-interpreter: Add missing LLVM component Object Modified: cfe/trunk/examples/clang-interpreter/CMakeLists.txt Modified: