[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-05-02 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:265-276 + const llvm::APSInt &from = i->From(), &to = i->To(); + const llvm::APSInt &newFrom = (to.isMinSignedValue() ? + BV.getM

r331440 - Enable -fsanitize=function on FreeBSD.

2018-05-02 Thread Fangrui Song via cfe-commits
Author: maskray Date: Wed May 2 23:37:47 2018 New Revision: 331440 URL: http://llvm.org/viewvc/llvm-project?rev=331440&view=rev Log: Enable -fsanitize=function on FreeBSD. Modified: cfe/trunk/lib/Driver/ToolChains/FreeBSD.cpp Modified: cfe/trunk/lib/Driver/ToolChains/FreeBSD.cpp URL: http:

[libclc] r331435 - remquo: Flush denormals if not supported

2018-05-02 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed May 2 22:44:28 2018 New Revision: 331435 URL: http://llvm.org/viewvc/llvm-project?rev=331435&view=rev Log: remquo: Flush denormals if not supported It's OK to either flush to 0 or return denormal result if the device does not support denormals. See sec 7.2 and 7.5.3 of

[libclc] r331433 - math: Add helper function to flush denormals if not supported.

2018-05-02 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed May 2 22:44:22 2018 New Revision: 331433 URL: http://llvm.org/viewvc/llvm-project?rev=331433&view=rev Log: math: Add helper function to flush denormals if not supported. Signed-off-by: Jan Vesely Reviewer: Aaron Watry Modified: libclc/trunk/generic/lib/math/math.

[libclc] r331434 - remquo: Port from amd builtins

2018-05-02 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed May 2 22:44:26 2018 New Revision: 331434 URL: http://llvm.org/viewvc/llvm-project?rev=331434&view=rev Log: remquo: Port from amd builtins double version passes on carrizo. float version fails on denormals. Signed-off-by: Jan Vesely Reviewer: Aaron Watry Added: l

?????? If I want to disable certain attributes, such as "swiftcall",isthere any way to do it now?

2018-05-02 Thread ???? via cfe-commits
hi, Aaron The reason why i not use of TargetSpecificAttr is as follows.If I plan to support a new platform, I don't want to let users use certain attributes because of hardware or simply not want to. Yes, we can use TargetSpecificAttr, but if we use TargetSpecificAttr that we need to include

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-05-02 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 144981. devnexen added a comment. New test to check the length https://reviews.llvm.org/D45177 Files: lib/StaticAnalyzer/Checkers/CStringChecker.cpp test/Analysis/bsd-string.c Index: test/Analysis/bsd-string.c =

[PATCH] D45149: MallocChecker, adding specific BSD calls

2018-05-02 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. In https://reviews.llvm.org/D45149#1062279, @jdenny wrote: > Hi David. While I did make some superficial changes here recently, I'm no > authority on what belongs here. However, I would suggest that the > refactoring patch be split from the original patch. Thanks.

[clang-tools-extra] r331429 - Update to match clang r331428.

2018-05-02 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed May 2 20:59:50 2018 New Revision: 331429 URL: http://llvm.org/viewvc/llvm-project?rev=331429&view=rev Log: Update to match clang r331428. Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseNoexceptCheck.cpp clang-tools-extra/trunk/clang-tidy/performance/N

r331428 - Track the result of evaluating a computed noexcept specification on the

2018-05-02 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed May 2 20:58:32 2018 New Revision: 331428 URL: http://llvm.org/viewvc/llvm-project?rev=331428&view=rev Log: Track the result of evaluating a computed noexcept specification on the FunctionProtoType. We previously re-evaluated the expression each time we wanted to know whe

[PATCH] D45149: MallocChecker, adding specific BSD calls

2018-05-02 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. These calls are not 'BSD' specific.. but OpenBSD. https://reviews.llvm.org/D45149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46374: Add support for ObjC property name to be a single acronym.

2018-05-02 Thread Yan Zhang via Phabricator via cfe-commits
Wizard updated this revision to Diff 144970. Wizard edited the summary of this revision. Wizard added a comment. fix format Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46374 Files: clang-tidy/objc/PropertyDeclarationCheck.cpp test/clang-tidy/objc-property-declaration.m

r331425 - [CMake][Cache] Stop pretending that Fuchsia is UNIX

2018-05-02 Thread Petr Hosek via cfe-commits
Author: phosek Date: Wed May 2 18:44:03 2018 New Revision: 331425 URL: http://llvm.org/viewvc/llvm-project?rev=331425&view=rev Log: [CMake][Cache] Stop pretending that Fuchsia is UNIX This changes some aspects of the build that are not relevant or useful for Fuchsia like setting the RPATH/RUNPAT

[PATCH] D46361: [CMake][Cache] Stop pretending that Fuchsia is UNIX

2018-05-02 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331425: [CMake][Cache] Stop pretending that Fuchsia is UNIX (authored by phosek, committed by ). Changed prior to commit: https://reviews.llvm.org/D46361?vs=144902&id=144969#toc Repository: rC Clang

[PATCH] D45755: [Sema] Do not match function type with const T in template argument deduction

2018-05-02 Thread Lei Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL331424: [Sema] Do not match function type with const T in template argument deduction (authored by lliu0, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://review

[PATCH] D46374: Add support for ObjC property name to be a single acronym.

2018-05-02 Thread Yan Zhang via Phabricator via cfe-commits
Wizard created this revision. Herald added subscribers: cfe-commits, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46374 Files: clang-tidy/objc/PropertyDeclarationCheck.cpp test/clang-tidy/objc-property-declaration.m Index: test/clang-tidy/objc-property-declaration.

r331421 - [ObjC] Supress the 'implementing unavailable method' warning when

2018-05-02 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed May 2 18:12:06 2018 New Revision: 331421 URL: http://llvm.org/viewvc/llvm-project?rev=331421&view=rev Log: [ObjC] Supress the 'implementing unavailable method' warning when the method declaration is unavailable for an app extension platform Rationale: Classes are often

[PATCH] D45860: [Coroutines] Catch exceptions in await_resume

2018-05-02 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 144961. modocache added a comment. Oops, thanks for testing on release mode, @GorNishanov. Turns out I had a dangling pointer. With this update the tests pass on both release and debug. Repository: rC Clang https://reviews.llvm.org/D45860 Files: lib

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-05-02 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added a comment. In https://reviews.llvm.org/D45702#1085224, @aaron.ballman wrote: > > Have you run this over any large code bases to see whether the check > > triggers in practice? > > I'm still curious about this, btw. Yes it triggers in Google's code base. Repository: rCTE Cla

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-05-02 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added inline comments. Comment at: clang-tidy/readability/RedundantDataCallCheck.cpp:45 + anyOf(TypesMatcher, pointerType(pointee(TypesMatcher)), + callee(namedDecl(hasName("data" + .bind("call", aa

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-05-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Yay that was fast, thanks! Could we have tests for the return value? Like, concatenate a couple of concrete string literals and verify the return value via `clang_analyzer_eval()`. https://reviews.llvm.org/D45177 ___ cfe-comm

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-05-02 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 144952. devnexen added a comment. The returned value is the number of character copied to the dst buffer. https://reviews.llvm.org/D45177 Files: lib/StaticAnalyzer/Checkers/CStringChecker.cpp test/Analysis/bsd-string.c Index: test/Analysis/bsd-string.

[PATCH] D45860: [Coroutines] Catch exceptions in await_resume

2018-05-02 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added a comment. Looks good. Make sure to run the tests in release and debug mode. On my box, these three test failed in release mode. Clang :: CodeGenCoroutines/coro-await-resume-eh.cpp Clang :: CodeGenCoroutines/coro-promise-dtor.cpp Clang :: CodeGenCoroutines/coro-unhandled-e

[PATCH] D46370: [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG

2018-05-02 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny created this revision. jdenny added a reviewer: ABataev. Herald added a subscriber: guansong. https://reviews.llvm.org/D46370 Files: test/OpenMP/target_teams_distribute_firstprivate_codegen.cpp test/OpenMP/target_teams_distribute_parallel_for_firstprivate_codegen.cpp test/OpenMP/targ

r331411 - [gcov] Make the CLang side coverage test work with the new

2018-05-02 Thread Chandler Carruth via cfe-commits
Author: chandlerc Date: Wed May 2 15:57:20 2018 New Revision: 331411 URL: http://llvm.org/viewvc/llvm-project?rev=331411&view=rev Log: [gcov] Make the CLang side coverage test work with the new instrumentation codegeneration strategy of using a data structure and a loop. Required some finesse to

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-05-02 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 144948. juliehockett marked 17 inline comments as done. juliehockett added a comment. Cleaning up and clarifying the merging process, and addressing comments https://reviews.llvm.org/D43341 Files: clang-doc/BitcodeReader.cpp clang-doc/BitcodeReader

r331409 - [ObjC] The absence of ownership qualifiers on an ambiguous property leads

2018-05-02 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed May 2 15:40:19 2018 New Revision: 331409 URL: http://llvm.org/viewvc/llvm-project?rev=331409&view=rev Log: [ObjC] The absence of ownership qualifiers on an ambiguous property leads to synthesis of a valid property even when the selected protocol property has ownership q

[PATCH] D46368: [analyzer] pr18953: Zeroing constructors, store binding extents, ASTRecordLayouts.

2018-05-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, baloghadamsoftware. As the old assertion says, > "Thou shalt not initialize the same memory twice." Namely, the `State->bindDefault()`/`Sto

Re: r331370 - Add -foutline option to enable the MachineOutliner in AArch64

2018-05-02 Thread Jessica Paquette via cfe-commits
Hmm yeah, you’re right, especially considering D45916. It would be nice to have the desired behaviour just “fall out” of that patch. I’ll write a patch adding the flag. - Jessica > On May 2, 2018, at 2:48 PM, Friedman, Eli wrote: > > On 5/2/2018 9:42 AM, Jessica Paquette via cfe-commits wrote

[PATCH] D46042: Cap vector alignment at 16 for all Darwin platforms

2018-05-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D46042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D43750: Allow writing calling convention attributes on function types

2018-05-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. I'm really sad about this; C++11 attributes were supposed to fix the undisciplined "do what I mean" behavior of GNU attributes. But you're right, these really are type attributes, and really s

[PATCH] D45680: [C++2a] Add operator<=> Rewriting - Early Attempt

2018-05-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Can you split this patch up a bit? There's changes here for the `<=>` rewriting, but also for supporting `operator<=>(...) = default`, and some constant evaluation and code generation changes too. It's a lot easier to review more directed, smaller patches. ===

Re: r331370 - Add -foutline option to enable the MachineOutliner in AArch64

2018-05-02 Thread Friedman, Eli via cfe-commits
On 5/2/2018 9:42 AM, Jessica Paquette via cfe-commits wrote: Author: paquette Date: Wed May 2 09:42:51 2018 New Revision: 331370 URL: http://llvm.org/viewvc/llvm-project?rev=331370&view=rev Log: Add -foutline option to enable the MachineOutliner in AArch64 It probably makes sense to also have

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-05-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:265-276 + const llvm::APSInt &from = i->From(), &to = i->To(); + const llvm::APSInt &newFrom = (to.isMinSignedValue() ? + BV.getMaxValue(to) : +

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-05-02 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. Sure ! looking into it. Repository: rC Clang https://reviews.llvm.org/D45177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D46159#1085684, @dcoughlin wrote: > In https://reviews.llvm.org/D46159#1085548, @pfultz2 wrote: > > > > Do you have some better choices? > > > > I could do `-allow-alpha-checks`. What do you think? > > > That seems reasonable to me. > Al

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-05-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ reopened this revision. NoQ added a comment. This revision is now accepted and ready to land. I reverted this for now. I'm sorry - i would have looked into this myself, but unfortunately there are other important fixes that distract me at the moment. Repository: rC Clang https://reviews.

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-02 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D46159#1085548, @pfultz2 wrote: > > Do you have some better choices? > > I could do `-allow-alpha-checks`. What do you think? That seems reasonable to me. Although I like `-allow-enabling-alpha-checks` better because it is longer and will

r331401 - [analyzer] Revert r331096 "CStringChecker: Add support for BSD strlcpy()...".

2018-05-02 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed May 2 13:33:17 2018 New Revision: 331401 URL: http://llvm.org/viewvc/llvm-project?rev=331401&view=rev Log: [analyzer] Revert r331096 "CStringChecker: Add support for BSD strlcpy()...". The return values of the newly supported functions were not handled correctly: strl

[PATCH] D46363: Follow-up to r331378. Update tests to allow to use C atomics in C++.

2018-05-02 Thread Kuba (Brecka) Mracek via Phabricator via cfe-commits
kubamracek accepted this revision. kubamracek added a comment. This revision is now accepted and ready to land. https://reviews.llvm.org/D46363 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

r331393 - [OPENMP] Add support for reductions on simd directives in target

2018-05-02 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed May 2 13:03:27 2018 New Revision: 331393 URL: http://llvm.org/viewvc/llvm-project?rev=331393&view=rev Log: [OPENMP] Add support for reductions on simd directives in target regions. Added codegen for `simd reduction()` constructs in target directives. Modified: cfe/

r331392 - Revert "Emit an error when mixing and "

2018-05-02 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Wed May 2 12:52:07 2018 New Revision: 331392 URL: http://llvm.org/viewvc/llvm-project?rev=331392&view=rev Log: Revert "Emit an error when mixing and " It reverts r331378 as it caused test failures ThreadSanitizer-x86_64 :: Darwin/gcd-groups-destructor.mm ThreadSan

r331390 - [Driver] Infer Android sysroot location.

2018-05-02 Thread Dan Albert via cfe-commits
Author: danalbert Date: Wed May 2 12:38:37 2018 New Revision: 331390 URL: http://llvm.org/viewvc/llvm-project?rev=331390&view=rev Log: [Driver] Infer Android sysroot location. Summary: Android toolchains include their headers and libraries in a self-contained directory within the toolchain. Rev

[PATCH] D45291: [Driver] Infer Android sysroot location.

2018-05-02 Thread Dan Albert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331390: [Driver] Infer Android sysroot location. (authored by danalbert, committed by ). Changed prior to commit: https://reviews.llvm.org/D45291?vs=141067&id=144916#toc Repository: rC Clang https:/

[PATCH] D45292: [Driver] Obey computed sysroot when finding libc++ headers.

2018-05-02 Thread Dan Albert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331389: [Driver] Obey computed sysroot when finding libc++ headers. (authored by danalbert, committed by ). Changed prior to commit: https://reviews.llvm.org/D45292?vs=141069&id=144915#toc Repository:

r331389 - [Driver] Obey computed sysroot when finding libc++ headers.

2018-05-02 Thread Dan Albert via cfe-commits
Author: danalbert Date: Wed May 2 12:31:01 2018 New Revision: 331389 URL: http://llvm.org/viewvc/llvm-project?rev=331389&view=rev Log: [Driver] Obey computed sysroot when finding libc++ headers. Summary: A handful of targets will try some default paths if --sysroot is not provided. If that is th

[PATCH] D46363: Follow-up to r331378. Update tests to allow to use C atomics in C++.

2018-05-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Link to corresponding review that introduced the change is https://reviews.llvm.org/D45470 Another option is to use `` and `std::atomic` but that will be functionality change. I'd rather avoid that. https://reviews.llvm.org/D46363 __

[PATCH] D46363: Follow-up to r331378. Update tests to allow to use C atomics in C++.

2018-05-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added a reviewer: kubamracek. https://reviews.llvm.org/D46363 Files: compiler-rt/test/tsan/Darwin/gcd-groups-destructor.mm compiler-rt/test/tsan/Darwin/libcxx-shared-ptr-stress.mm compiler-rt/test/tsan/Darwin/xpc-race.mm Index: compiler-rt/test/tsan/

r331385 - [OPENMP] Analyze the type of the mapped entity instead of its base.

2018-05-02 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed May 2 11:44:10 2018 New Revision: 331385 URL: http://llvm.org/viewvc/llvm-project?rev=331385&view=rev Log: [OPENMP] Analyze the type of the mapped entity instead of its base. If the mapped entity is a data member, we erroneously checked the type of its base rather than

[PATCH] D46328: [X86] Mark all x86 specific builtins as nothrow.

2018-05-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D46328 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D46328: [X86] Mark all x86 specific builtins as nothrow.

2018-05-02 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Is this ok to go in then? Repository: rC Clang https://reviews.llvm.org/D46328 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45860: [Coroutines] Catch exceptions in await_resume

2018-05-02 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 144908. modocache added a comment. Thanks for the review, @GorNishanov. Here's a more correct solution: an i1 is used to keep track of whether await_resume threw. If it did, the coroutine body is skipped, and we go straight to the final suspend point. Othe

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-02 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > Do you have some better choices? I could do `-allow-alpha-checks`. What do you think? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/utils/ExprMutationAnalyzer.cpp:42 + const auto Memoized = Results.find(Exp); + if (Memoized != Results.end()) { +return Memoized->second; Can elide the braces. Comment at: clang-

[PATCH] D46328: [X86] Mark all x86 specific builtins as nothrow.

2018-05-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. We don't expect user code to call these builtins directly anyway, so probably not useful to test. Repository: rC Clang https://reviews.llvm.org/D46328 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D45470: Emit an error when mixing and

2018-05-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for the review, Marshall. In the end I removed `XFAIL: with_system_cxx_lib` from libc++ test as the change is header-only at compile time. Library behaviour at runtime shouldn't be affected. Repository: rC Clang https://reviews.llvm.org/D45470 ___

[PATCH] D43750: Allow writing calling convention attributes on function types

2018-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping x4 https://reviews.llvm.org/D43750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45944: Disallow pointers to const in __sync_fetch_and_xxx

2018-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping https://reviews.llvm.org/D45944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r331379 - Emit an error when mixing and

2018-05-02 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Wed May 2 10:56:45 2018 New Revision: 331379 URL: http://llvm.org/viewvc/llvm-project?rev=331379&view=rev Log: Emit an error when mixing and Atomics in C and C++ are incompatible at the moment and mixing the headers can result in confusing error messages. Emit an error e

[PATCH] D45470: Emit an error when mixing and

2018-05-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331378: Emit an error when mixing and (authored by vsapsai, committed by ). Changed prior to commit: https://reviews.llvm.org/D45470?vs=143817&id=144903#toc Repository: rC Clan

[PATCH] D46317: [clang-tidy] New check bugprone-map-subscript-operator-lookup

2018-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I am generally in favor of this but would be curious to see how the check reacts to real world code bases. Facebook's usage experience is compelling, but I'm also wondering how bad the false-positive rate is on existing code. Can you try running the check over LLV

[PATCH] D46361: [CMake][Cache] Stop pretending that Fuchsia is UNIX

2018-05-02 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. fnu lgtm Repository: rC Clang https://reviews.llvm.org/D46361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

r331378 - Emit an error when mixing and

2018-05-02 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Wed May 2 10:50:43 2018 New Revision: 331378 URL: http://llvm.org/viewvc/llvm-project?rev=331378&view=rev Log: Emit an error when mixing and Atomics in C and C++ are incompatible at the moment and mixing the headers can result in confusing error messages. Emit an error e

r331377 - [OPENMP] Do not emit warning for implicitly declared target functions.

2018-05-02 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed May 2 10:39:00 2018 New Revision: 331377 URL: http://llvm.org/viewvc/llvm-project?rev=331377&view=rev Log: [OPENMP] Do not emit warning for implicitly declared target functions. Since upcoming OpenMP 5.0 functions can be mapped implicitly as declare target and we should

[PATCH] D46361: [CMake][Cache] Stop pretending that Fuchsia is UNIX

2018-05-02 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added a reviewer: mcgrathr. Herald added subscribers: cfe-commits, mgorny. This changes some aspects of the build that are not relevant or useful for Fuchsia like setting the RPATH/RUNPATH. Repository: rC Clang https://reviews.llvm.org/D46361 Files: cla

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExprConstant.cpp:1403 + if (auto *IL = dyn_cast_or_null(Init)) { +if (InitTy->isConstantArrayType()) { + for (auto I : IL->inits()) Do you actually care if it's an array initialization instead of

Re: [PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-05-02 Thread Mikhail Ramalho via cfe-commits
Hi, > I would say "yes". Let's not rely on linemarkers, unless we can explain > why that's a good idea. > > Sounds reasonable to me, specially considering cases like rename and find-declaration. > > Where do virtual files come from in the first place? > > >From the linemarker: https://gcc.gnu.o

r331370 - Add -foutline option to enable the MachineOutliner in AArch64

2018-05-02 Thread Jessica Paquette via cfe-commits
Author: paquette Date: Wed May 2 09:42:51 2018 New Revision: 331370 URL: http://llvm.org/viewvc/llvm-project?rev=331370&view=rev Log: Add -foutline option to enable the MachineOutliner in AArch64 Since we've been working on productizing the MachineOutliner in AArch64, it makes sense to provide a

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-05-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. Thanks! https://reviews.llvm.org/D46022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 3 inline comments as done. sepavloff added inline comments. Comment at: lib/CodeGen/CGExprConstant.cpp:1414 + return true; +} + } rjmccall wrote: > You should check the array fill expression here; for now, the test case would > be some

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 144898. sepavloff added a comment. Addressed review notes. Repository: rC Clang https://reviews.llvm.org/D46241 Files: lib/CodeGen/CGExprConstant.cpp test/CodeGenCXX/cxx11-initializer-aggregate.cpp Index: test/CodeGenCXX/cxx11-initializer-aggrega

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-05-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D46049#1085388, @Anastasia wrote: > In https://reviews.llvm.org/D46049#1081196, @yaxunl wrote: > > > Can you add a codegen test for 1.2, 2.0? > > > Anything specific you would like me to check? I am not modifying anything in > CodeGen here thou

r331372 - [OPENMP] Enable c++ exceptions outside of the target constructs iff they are

2018-05-02 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed May 2 09:52:07 2018 New Revision: 331372 URL: http://llvm.org/viewvc/llvm-project?rev=331372&view=rev Log: [OPENMP] Enable c++ exceptions outside of the target constructs iff they are enabled for the host. If the compilation for the host enables C++ exceptions, but they

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D46159#1085400, @pfultz2 wrote: > Do you want the flag to be renamed? I personally would //like// a bit better name, but i'm not sure what would be better, so not a requirement. Do you have some better choices? Repository: rCTE Clang

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-05-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Format/Format.cpp:1691 // 0. Otherwise, returns the priority of the matching category or INT_MAX. - int getIncludePriority(StringRef IncludeName, bool CheckMainHeader) { + int getIncludePriority(StringRef IncludeName, bool CheckM

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-05-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 144895. ioeric marked 3 inline comments as done. ioeric added a comment. - addressed more review comments. Repository: rC Clang https://reviews.llvm.org/D46180 Files: lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format/Clea

[PATCH] D26054: Use `getFileLoc()` instead of `getSpellingLoc()` in the ASTImporter

2018-05-02 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added a comment. Herald added a subscriber: martong. I encountered an issue caused by this change. In the scenario as shown below the call to getFileLoc causes the startLoc of the BinaryOp to be after the endLoc, because the LHS (`s->a`) is located in the marco argument while the RHS (`

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-02 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. Do you want the flag to be renamed? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] r331366 - clc_sqrt: Reuse unary_decl.inc

2018-05-02 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed May 2 09:06:52 2018 New Revision: 331366 URL: http://llvm.org/viewvc/llvm-project?rev=331366&view=rev Log: clc_sqrt: Reuse unary_decl.inc Signed-off-by: Jan Vesely Reviewed-by: Aaron Watry Tested-by: Aaron Watry Removed: libclc/trunk/generic/include/math/clc_sqr

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-05-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D46049#1081196, @yaxunl wrote: > Can you add a codegen test for 1.2, 2.0? Anything specific you would like me to check? I am not modifying anything in CodeGen here though. > Also, I am wondering whether this is valid for OpenCL C++. Do we

r331365 - [OPENMP] Support C++ member functions in the device constructs.

2018-05-02 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed May 2 08:45:28 2018 New Revision: 331365 URL: http://llvm.org/viewvc/llvm-project?rev=331365&view=rev Log: [OPENMP] Support C++ member functions in the device constructs. Added correct emission of the C++ member functions for the device function when they are used in th

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-05-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 144892. Anastasia added a comment. Added accidentally removed code and improved the test. https://reviews.llvm.org/D46049 Files: include/clang/AST/ASTContext.h lib/AST/ASTContext.cpp lib/AST/Expr.cpp lib/Sema/SemaExpr.cpp test/SemaOpenCL/predefi

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-05-02 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Thanks @NoQ for taking the time to review my code! I'm sorry that the patch became this long. It was an error on my part, and I completely get that the checker now takes an uncomfortably long time to read and understand. This is my first "bigger" project in the CSA,

[PATCH] D45611: [analyzer] Fix filename in cross-file HTML report

2018-05-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Thanks! I noticed the problem but never investigated it. Repository: rC Clang https://reviews.llvm.org/D45611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-05-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 144885. Anastasia added a comment. The best way of adding common helper function I could come up with. The problem is that string literals are created quite differently all over: using various char types and const qualifiers. That seems to cover the most c

[PATCH] D45611: [analyzer] Fix filename in cross-file HTML report

2018-05-02 Thread Malcolm Parsons via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331361: [analyzer] Fix filename in cross-file HTML report (authored by malcolm.parsons, committed by ). Changed prior to commit: https://reviews.llvm.org/D45611?vs=144742&id=144881#toc Repository: rC

r331361 - [analyzer] Fix filename in cross-file HTML report

2018-05-02 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed May 2 07:26:12 2018 New Revision: 331361 URL: http://llvm.org/viewvc/llvm-project?rev=331361&view=rev Log: [analyzer] Fix filename in cross-file HTML report Summary: The filename is currently taken from the start of the path, while the line and column are taken

r331358 - [OPENMP] Emit names of the globals depending on target.

2018-05-02 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed May 2 07:20:50 2018 New Revision: 331358 URL: http://llvm.org/viewvc/llvm-project?rev=331358&view=rev Log: [OPENMP] Emit names of the globals depending on target. Some symbols are not allowed to be used as names on some targets. Patch ries to unify the emission of the n

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-05-02 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added a comment. Hi, > I would say "yes". Let's not rely on linemarkers, unless we can explain > why that's a good idea. Sounds reasonable to me, specially considering cases like rename and find-declaration. > Where do virtual files come from in the first place? From the linem

Re: If I want to disable certain attributes, such as "swiftcall", isthere any way to do it now?

2018-05-02 Thread Aaron Ballman via cfe-commits
On Wed, May 2, 2018 at 4:59 AM, 朴素 <772847...@qq.com> wrote: > Thanks. > > If I remove some specific attributes, now I can think of the following > method.First of all, let me talk about my method. > > 1.Define target platforms that do not support attributes.such as def > TargetPower : TargetArch<[

[PATCH] D32904: [Analyzer] Iterator Checker - Part 8: Support for assign, clear, insert, emplace and erase operations

2018-05-02 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 144878. baloghadamsoftware added a comment. Herald added a reviewer: george.karpenkov. Rebased. https://reviews.llvm.org/D32904 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test/Analysis/Inputs/system-header-simulator-cxx.h test/A

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-05-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D42966#1085257, @mikhail.ramalho wrote: > Should we ignore linemarkers and use filename + offset of the real file? I would say "yes". Let's not rely on linemarkers, unless we can explain why that's a good idea. > Should we try to calc

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-05-02 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:265-276 + const llvm::APSInt &from = i->From(), &to = i->To(); + const llvm::APSInt &newFrom = (to.isMinSignedValue() ? + BV.getM

Re: [PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-05-02 Thread Mikhail Ramalho via cfe-commits
Hi, > Filename + offset for things like function parameters, where we have to > identify the particular function declaration they're part of. > For static functions themselveds, just the filename. I think this is > current behavior in both cases. > > But then we're back to the initial question, w

Re: [PATCH] D36610: [Tooling] Add option to getFullyQualifiedName using a custom PritingPolicy

2018-05-02 Thread Mikhail Ramalho via cfe-commits
Last review asked to change the test case, I just want to make sure everything is fine this time. 2018-05-02 8:54 GMT+01:00 Manuel Klimek via Phabricator < revi...@reviews.llvm.org>: > klimek added a comment. > > I believe this was accepted by rnk - are you waiting for specific further > feedback

[PATCH] D46190: For an ODR declaration, set the 'Used' bit on its associated declarations.

2018-05-02 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. In https://reviews.llvm.org/D46190#1083502, @rsmith wrote: > Let's look at your original example again (I've cleaned it up and extended it > a bit, but hopefully this matches your intent): > > namespace nsp { > int var1, var2; > } > > using nsp::v

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/RedundantDataCallCheck.cpp:31 +void RedundantDataCallCheck::registerMatchers(MatchFinder *Finder) { + using namespace ast_matchers; + No need to register any of these matchers unless in C++

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-05-02 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added a comment. Hi, > Filename + offset for things like function parameters, where we have to > identify the particular function declaration they're part of. > For static functions themselveds, just the filename. I think this is > current behavior in both cases. But then we'r

[PATCH] D36610: [Tooling] Add option to getFullyQualifiedName using a custom PritingPolicy

2018-05-02 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added subscribers: rsmith, rnk. mikhail.ramalho added a comment. Last review asked to change the test case, I just want to make sure everything is fine this time. https://reviews.llvm.org/D36610 ___ cfe-commits mailing list cfe-commi

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-05-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/RedundantDataCallCheck.cpp:45 + anyOf(TypesMatcher, pointerType(pointee(TypesMatcher)), + callee(namedDecl(hasName("data" + .bind("call", --

  1   2   >