[PATCH] D34021: [coroutines] Fix co_await for range statement

2017-06-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 101858. https://reviews.llvm.org/D34021 Files: include/clang/Sema/Sema.h lib/Sema/SemaCoroutine.cpp lib/Sema/SemaStmt.cpp test/SemaCXX/coawait_range_for.cpp Index: test/SemaCXX/coawait_range_for.cpp

[PATCH] D33732: Catch invalid bitwise operation on vector of floats

2017-06-07 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304963: Catch invalid bitwise operation on vector of floats (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D33732?vs=101359=101856#toc Repository: rL LLVM

r304963 - Catch invalid bitwise operation on vector of floats

2017-06-07 Thread Serge Pavlov via cfe-commits
Author: sepavloff Date: Thu Jun 8 00:25:19 2017 New Revision: 304963 URL: http://llvm.org/viewvc/llvm-project?rev=304963=rev Log: Catch invalid bitwise operation on vector of floats Bitwise complement applied to vector of floats described with attribute `ext_vector_type` is not diagnosed as

[PATCH] D34021: [coroutines] Fix co_await for range statement

2017-06-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 101857. EricWF added a comment. - More test cleanup. Sorry for the noise. https://reviews.llvm.org/D34021 Files: include/clang/Sema/Sema.h lib/Sema/SemaCoroutine.cpp lib/Sema/SemaStmt.cpp test/SemaCXX/coawait_range_for.cpp Index:

[PATCH] D34021: [coroutines] Fix co_await for range statement

2017-06-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 101854. EricWF added a comment. - Fix clang-format nonsense in tests. https://reviews.llvm.org/D34021 Files: include/clang/Sema/Sema.h lib/Sema/SemaCoroutine.cpp lib/Sema/SemaStmt.cpp test/SemaCXX/coawait_range_for.cpp Index:

[PATCH] D34021: [coroutines] Fix co_await for range statement

2017-06-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 101853. EricWF added a comment. - Add FIXME comments for incorrect use of `getCurScope()` after initial parse. https://reviews.llvm.org/D34021 Files: include/clang/Sema/Sema.h lib/Sema/SemaCoroutine.cpp lib/Sema/SemaStmt.cpp

[PATCH] D34021: [coroutines] Fix co_await for range statement

2017-06-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. Currently we build the co_await expressions on the wrong implicit statements of the implicit ranged for; Specifically we build the co_await expression wrapping the range declaration, but it should wrap the begin expression. This patch fixes co_await on range for.

Re: r304956 - [ODRHash] Change the fall-back diagnostic error.

2017-06-07 Thread Richard Trieu via cfe-commits
After r304962, it should now produce messages like: 'foo' defined here has different definitions in different modules; first difference is this unexpected decl but in 'Module' found another unexpected decl 'foo' with definition in module 'FirstModule' has different definitions in different

r304962 - [ODRHash] Make diagnostic message more readable.

2017-06-07 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Jun 7 23:47:29 2017 New Revision: 304962 URL: http://llvm.org/viewvc/llvm-project?rev=304962=rev Log: [ODRHash] Make diagnostic message more readable. Change the diagnostic message from r304956 to be less confusing by reordering the flow of information. Modified:

[PATCH] D30268: Avoid copy of __atoms when char_type is char

2017-06-07 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added a comment. Ping https://reviews.llvm.org/D30268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31868: [analyzer] Check NULL pointer dereference issue for memset function

2017-06-07 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai updated this revision to Diff 101847. xiangzhai added a comment. Herald added a subscriber: xazax.hun. Hi Artem, I updated my patch please review it, thanks a lot! Regards, Leslie Zhai Repository: rL LLVM https://reviews.llvm.org/D31868 Files:

[PATCH] D33598: [libclang] [OpenCL] Expose CIndex functions for typedef and address space

2017-06-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks! sorry for the delay. https://reviews.llvm.org/D33598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r284060 - Implement MS _BitScan intrinsics

2017-06-07 Thread Saleem Abdulrasool via cfe-commits
I'm worried about changing this signature all the time. I suspect that it will cause the following to be emitted for valid code: warning: incompatible pointer types passing 'unsigned long *' to parameter of type 'unsigned int *' [-Wincompatible-pointer-types] Switching the signature on LP64

r304960 - Simplify.

2017-06-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jun 7 21:05:55 2017 New Revision: 304960 URL: http://llvm.org/viewvc/llvm-project?rev=304960=rev Log: Simplify. Modified: cfe/trunk/lib/Sema/SemaExpr.cpp Modified: cfe/trunk/lib/Sema/SemaExpr.cpp URL:

Re: r304956 - [ODRHash] Change the fall-back diagnostic error.

2017-06-07 Thread Richard Trieu via cfe-commits
Yes, I will go correct the diagnostic text. In theory, there is nothing that is supposed to reach this diagnostic or the one below it. Except that the hasher isn't complete yet and some things slip through. Once things are more stable, these should be replaced with llvm_unreachable instead. On

r304957 - Weaken restriction in r304862 to allow implicit deduction guides to reference

2017-06-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jun 7 20:08:50 2017 New Revision: 304957 URL: http://llvm.org/viewvc/llvm-project?rev=304957=rev Log: Weaken restriction in r304862 to allow implicit deduction guides to reference the injected-class-name of a specialization that uses a partial / explicit specialization.

Re: r304956 - [ODRHash] Change the fall-back diagnostic error.

2017-06-07 Thread Richard Smith via cfe-commits
On 7 June 2017 at 17:56, Richard Trieu via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rtrieu > Date: Wed Jun 7 19:56:21 2017 > New Revision: 304956 > > URL: http://llvm.org/viewvc/llvm-project?rev=304956=rev > Log: > [ODRHash] Change the fall-back diagnostic error. > > Provide a

r304956 - [ODRHash] Change the fall-back diagnostic error.

2017-06-07 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Jun 7 19:56:21 2017 New Revision: 304956 URL: http://llvm.org/viewvc/llvm-project?rev=304956=rev Log: [ODRHash] Change the fall-back diagnostic error. Provide a little more information when a ODR violation is detected, but the specific error could not be diagnosed.

[libcxx] r304955 - Fix class template deduction for scoped_lock.

2017-06-07 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Jun 7 19:38:56 2017 New Revision: 304955 URL: http://llvm.org/viewvc/llvm-project?rev=304955=rev Log: Fix class template deduction for scoped_lock. r304862 changed how CTD handles deducing a non-primary class template using a non-dependent constructor of the primary

[PATCH] D33478: [libclang] When getting platform availabilities, merge multiple declarations if possible

2017-06-07 Thread Ronald Wampler via Phabricator via cfe-commits
rdwampler marked an inline comment as done. rdwampler added inline comments. Comment at: test/Index/availability.c:20 // CHECK-2: (macos, introduced=10.4, deprecated=10.5, obsoleted=10.7) // CHECK-2: EnumConstantDecl=old_enum:6:3 (Definition) (deprecated)

[PATCH] D34018: Support __float128 on NetBSD libstdc++ x86/x86_64

2017-06-07 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski created this revision. This adds support for __float128 from GNU libstdc++ with Clang on NetBSD x86/x86_64 targets. This corrects compilation at least of CMake and probably others like Firefox. In file included from

RE: r304935 - Revert r304929 [mips] Add runtime options to enable/disable madd/sub.fmt

2017-06-07 Thread Petar Jovanovic via cfe-commits
I reverted the patch too quickly and have not noticed the file was not actually deleted. I am reapplying the patch with minor modifications now, hopefully no issues this time. Thanks. Regards, Petar From: Simon Dardis Sent: Wednesday, June 07, 2017 10:36

r304953 - Reapply r304929 [mips] Add runtime options to enable/disable madd/sub.fmt

2017-06-07 Thread Petar Jovanovic via cfe-commits
Author: petarj Date: Wed Jun 7 18:51:52 2017 New Revision: 304953 URL: http://llvm.org/viewvc/llvm-project?rev=304953=rev Log: Reapply r304929 [mips] Add runtime options to enable/disable madd/sub.fmt The test in r304929 broke multiple buildbots as it expected mips target to be registered and

[PATCH] D20693: [clang-tidy] New checker to replace dynamic exception specifications

2017-06-07 Thread don hinton via Phabricator via cfe-commits
hintonda added a comment. btw, here's how I built it, in case that matters... CC=../../4.0.0/build/Release/bin/clang CXX=../../4.0.0/build/Release/bin/clang++ \ cmake ../../llvm/ \ -GNinja \ -DLLVM_USE_SANITIZER=Address \ -DCMAKE_BUILD_TYPE=Debug \ -DLLVM_TARGETS_TO_BUILD="X86" \

[PATCH] D20693: [clang-tidy] New checker to replace dynamic exception specifications

2017-06-07 Thread don hinton via Phabricator via cfe-commits
hintonda added a comment. Just ran asan on linux and we have a heap-use-after-free in the std::string ctor. Here's a partial stack dump: 4980==ERROR: AddressSanitizer: heap-use-after-free on address 0x60424328 at pc 0x0057ad32 bp 0x7ffd240a7f50 sp 0x7ffd240a7700

[PATCH] D17215: [Sema] Fix PR14211 Crash for explicit instantiation of overloaded template function within class template

2017-06-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Sure thing, r304951. https://reviews.llvm.org/D17215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r304951 - When determining the target function of an explicit instantiation, make

2017-06-07 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Jun 7 18:00:05 2017 New Revision: 304951 URL: http://llvm.org/viewvc/llvm-project?rev=304951=rev Log: When determining the target function of an explicit instantiation, make sure that non-template functions don't end up in the candidate set. Fixes PR14211. Patch by

[PATCH] D34007: Implement inclusive_scan and transform_inclusive_scan

2017-06-07 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists abandoned this revision. mclow.lists added a comment. I don't think that this is a correct implementation. Also, I need tests for when the result overwrites the source. As they say .. I'll be back :-) https://reviews.llvm.org/D34007

[PATCH] D34002: [clang-tidy] When" -fno-exceptions is used", this warning is better to be suppressed.

2017-06-07 Thread Yan Wang via Phabricator via cfe-commits
yawanng updated this revision to Diff 101834. yawanng marked an inline comment as done. https://reviews.llvm.org/D34002 Files: clang-tidy/misc/NoexceptMoveConstructorCheck.cpp test/clang-tidy/misc-noexcept-move-constructor.cpp Index: test/clang-tidy/misc-noexcept-move-constructor.cpp

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/Decl.h:1387 +IPK_CapturedContext, /// Parameter for captured context +IPK_GeneralParam,/// General implicit parameter + }; ABataev wrote: > rjmccall wrote: > > I would just call this

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-07 Thread Yan Wang via Phabricator via cfe-commits
yawanng updated this revision to Diff 101831. yawanng marked an inline comment as done. https://reviews.llvm.org/D33304 Files: clang-tidy/CMakeLists.txt clang-tidy/android/AndroidTidyModule.cpp clang-tidy/android/CMakeLists.txt clang-tidy/android/FileOpenFlagCheck.cpp

Re: r284060 - Implement MS _BitScan intrinsics

2017-06-07 Thread Duncan P. N. Exon Smith via cfe-commits
[... excuse the necromancy...] Hi Albert (and Reid and David), This commit is breaking some uses of -fms-extensions on Apple platforms. In particular, Brian and Erik (CC'ed) build against a version of the Windows SDK on Apple platforms. _BitScanReverse is expected to be 32-bit, matching

[PATCH] D20693: [clang-tidy] New checker to replace dynamic exception specifications

2017-06-07 Thread don hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 101819. hintonda added a comment. - Rollback last change. https://reviews.llvm.org/D20693 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseNoexceptCheck.cpp

r304946 - [c++1z] Support deducing B in noexcept(B).

2017-06-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jun 7 16:46:22 2017 New Revision: 304946 URL: http://llvm.org/viewvc/llvm-project?rev=304946=rev Log: [c++1z] Support deducing B in noexcept(B). This is not required by the standard (yet), but there seems to be reasonable support for this being a defect according to CWG

[PATCH] D33094: [ASTMatchers] Add clang-query support for equals matcher

2017-06-07 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn added inline comments. Comment at: unittests/ASTMatchers/Dynamic/RegistryTest.cpp:545 + .getTypedMatcher(); + EXPECT_TRUE(matches("int x = 'x';", CharStmt)); + EXPECT_FALSE(matches("int x = 120;", CharStmt)); Lekensteyn wrote: > aaron.ballman

[PATCH] D33094: [ASTMatchers] Add clang-query support for equals matcher

2017-06-07 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn updated this revision to Diff 101817. Lekensteyn marked 7 inline comments as done. Lekensteyn added a comment. diff from previous patch: diff --git a/unittests/ASTMatchers/Dynamic/RegistryTest.cpp b/unittests/ASTMatchers/Dynamic/RegistryTest.cpp index 29fcdec6c1..84e31f721a

[PATCH] D33135: [ASTMatchers] Add support for floatLiterals

2017-06-07 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn added a comment. Rebased patches on latest clang master (trunk), there were no changes in ASTMatchers. boolean literal patch was unchanged, this floating literal patch was updated to address comments. Comment at:

[PATCH] D33135: [ASTMatchers] Add support for floatLiterals

2017-06-07 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn updated this revision to Diff 101816. Lekensteyn marked 8 inline comments as done. Lekensteyn added a comment. diff from previous version: diff --git a/include/clang/ASTMatchers/Dynamic/Parser.h b/include/clang/ASTMatchers/Dynamic/Parser.h index 0d0c2ba540..5ec4a9abf4 100644

[PATCH] D33478: [libclang] When getting platform availabilities, merge multiple declarations if possible

2017-06-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. This looks better, it's almost ready. A couple of small requests: Comment at: tools/libclang/CIndex.cpp:7262 +LHS->getMessage() == RHS->getMessage() && +LHS->getReplacement() == RHS->getReplacement()) + return true;

[libcxx] r304942 - Fix compile error with Bionic's PTHREAD_MUTEX_INITIALIZER

2017-06-07 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Jun 7 15:47:42 2017 New Revision: 304942 URL: http://llvm.org/viewvc/llvm-project?rev=304942=rev Log: Fix compile error with Bionic's PTHREAD_MUTEX_INITIALIZER On Bionic PTHREAD_MUTEX_INITIALIZER contains the expression " & ", which causes ADL to perform name lookup

[PATCH] D33681: Allow function declaration with empty argument list.

2017-06-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! https://reviews.llvm.org/D33681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33598: [libclang] [OpenCL] Expose CIndex functions for typedef and address space

2017-06-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Sam, do you think you have some time to look at this change? Thanks! https://reviews.llvm.org/D33598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

RE: r304935 - Revert r304929 [mips] Add runtime options to enable/disable madd/sub.fmt

2017-06-07 Thread Simon Dardis via cfe-commits
Appears to be fixed, r304936. I'll keep an eye on the buildbots. Thanks, Simon From: cfe-commits [cfe-commits-boun...@lists.llvm.org] on behalf of Evgenii Stepanov via cfe-commits [cfe-commits@lists.llvm.org] Sent: 07 June 2017 20:53 To: Petar Jovanovic

[PATCH] D33493: Speed up preamble loading

2017-06-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Frontend/ASTUnit.cpp:1152 + else +SrcLocCache.clear(); yvvan wrote: > arphaman wrote: > > Why is `clear` in an `else` here? We always create a new `SourceManager` in > > this function, so the previously

[PATCH] D34007: Implement inclusive_scan and transform_inclusive_scan

2017-06-07 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Re-reading this, I may have implemented `exclusive_scan` instead of `inclusive_scan` here. https://reviews.llvm.org/D34007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r304936 - Finish revert of "r304929, [mips] Add runtime options to enable/disable madd/sub.fmt"

2017-06-07 Thread Simon Dardis via cfe-commits
Author: sdardis Date: Wed Jun 7 15:02:24 2017 New Revision: 304936 URL: http://llvm.org/viewvc/llvm-project?rev=304936=rev Log: Finish revert of "r304929, [mips] Add runtime options to enable/disable madd/sub.fmt" The r304935 missed deleting the test case. Removed:

[PATCH] D33944: git-clang-format: Add --cached option to format index

2017-06-07 Thread Kevin Locke via Phabricator via cfe-commits
kevinoid updated this revision to Diff 101799. kevinoid added a comment. Fixed handling of case when no formatting changes are made but `old_tree != new_tree` in `apply_changes`. https://reviews.llvm.org/D33944 Files: tools/clang-format/git-clang-format Index:

[PATCH] D34010: clang-format: Add --cached option to format index

2017-06-07 Thread Kevin Locke via Phabricator via cfe-commits
kevinoid abandoned this revision. kevinoid added a comment. Meant to update diff for https://reviews.llvm.org/D33944. My mistake. Closing. https://reviews.llvm.org/D34010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34010: clang-format: Add --cached option to format index

2017-06-07 Thread Kevin Locke via Phabricator via cfe-commits
kevinoid created this revision. Add --cached option to git-clang-format which behaves analogously to the use of --cached for other git subcommands, by causing the operation to work against the index state rather than the working directory state. This can be particularly useful for hook scripts

Re: r304935 - Revert r304929 [mips] Add runtime options to enable/disable madd/sub.fmt

2017-06-07 Thread Evgenii Stepanov via cfe-commits
You've left an empty file in test/CodeGen/mips-madd4.c On Wed, Jun 7, 2017 at 11:57 AM, Petar Jovanovic via cfe-commits wrote: > Author: petarj > Date: Wed Jun 7 13:57:56 2017 > New Revision: 304935 > > URL: http://llvm.org/viewvc/llvm-project?rev=304935=rev > Log: >

[PATCH] D33841: [clang-tidy] redundant keyword check

2017-06-07 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: docs/clang-tidy/checks/readability-redundant-keyword.rst:8 + +`extern` is redundant in function declarations + Could you explain,

[PATCH] D20693: [clang-tidy] New checker to replace dynamic exception specifications

2017-06-07 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D20693#775197, @hintonda wrote: > I have not, as yet, been able to reproduce the buildbot failures. They were > essentially intermittent seg-faults, and corrupt diag output. > > I will work on creating a test that can reproduce the problem.

[PATCH] D34007: Implement inclusive_scan and transform_inclusive_scan

2017-06-07 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. Like https://reviews.llvm.org/D33997, this implements the non-parallel versions of these algorithms https://reviews.llvm.org/D33997 implemented `reduce` and `transform_reduce`, this adds `inclusive_scan` and `transform_inclusive_scan`. There will be another

[PATCH] D33478: [libclang] When getting platform availabilities, merge multiple declarations if possible

2017-06-07 Thread Ronald Wampler via Phabricator via cfe-commits
rdwampler updated this revision to Diff 101787. rdwampler marked 6 inline comments as done. rdwampler added a comment. This should resolve the bug (a conditional was inverted) in the last revision along with the other changes requested. https://reviews.llvm.org/D33478 Files:

r304935 - Revert r304929 [mips] Add runtime options to enable/disable madd/sub.fmt

2017-06-07 Thread Petar Jovanovic via cfe-commits
Author: petarj Date: Wed Jun 7 13:57:56 2017 New Revision: 304935 URL: http://llvm.org/viewvc/llvm-project?rev=304935=rev Log: Revert r304929 [mips] Add runtime options to enable/disable madd/sub.fmt Revert r304929 since the test broke buildbots. Original commit: [mips] Add runtime options

[PATCH] D34002: [clang-tidy] When" -fno-exceptions is used", this warning is better to be suppressed.

2017-06-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Aside from one minor nit, LGTM Comment at: clang-tidy/misc/NoexceptMoveConstructorCheck.cpp:23 // provide any benefit to other languages, despite being

[PATCH] D34002: [clang-tidy] When" -fno-exceptions is used", this warning is better to be suppressed.

2017-06-07 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. LGTM, leave this to alexfh's approval. Repository: rL LLVM https://reviews.llvm.org/D34002 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33493: Speed up preamble loading

2017-06-07 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added inline comments. Comment at: include/clang/Frontend/ASTUnit.h:192 + /// of that loading + std::map SrcLocCache; + arphaman wrote: > You can use an `llvm::StringMap` instead. I will change that Comment at:

[clang-tools-extra] r304931 - [clang-tidy] When" -fno-exceptions is used", this warning is better to be suppressed.

2017-06-07 Thread Yan Wang via cfe-commits
Author: yawanng Date: Wed Jun 7 12:41:59 2017 New Revision: 304931 URL: http://llvm.org/viewvc/llvm-project?rev=304931=rev Log: [clang-tidy] When" -fno-exceptions is used", this warning is better to be suppressed. Summary: clang-tidy is better not to issues this warning, which checks where

[PATCH] D33401: [mips] Add runtime options to enable/disable generation of madd.fmt, msub.fmt

2017-06-07 Thread Petar Jovanovic via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304929: [mips] Add runtime options to enable/disable madd.fmt and msub.fmt (authored by petarj). Changed prior to commit: https://reviews.llvm.org/D33401?vs=101562=101767#toc Repository: rL LLVM

r304929 - [mips] Add runtime options to enable/disable madd.fmt and msub.fmt

2017-06-07 Thread Petar Jovanovic via cfe-commits
Author: petarj Date: Wed Jun 7 12:17:57 2017 New Revision: 304929 URL: http://llvm.org/viewvc/llvm-project?rev=304929=rev Log: [mips] Add runtime options to enable/disable madd.fmt and msub.fmt Add options to clang: -mmadd4 and -mno-madd4, use it to enable or disable generation of madd.fmt and

[PATCH] D26065: Improve diagnostics if friend function redefines file-level function.

2017-06-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D26065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D33304#771493, @alexfh wrote: > IIUC, these checks enforce a certain - Android-specific - way of using POSIX > APIs. I'm not sure if the recommendations are universally useful. Or am I > mistaken? OK, that makes sense. I may miss some

[PATCH] D31956: Implement (part of) LWG2857: `{variant, optional, any}::emplace` should return the constructed value

2017-06-07 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Landed as r300123 https://reviews.llvm.org/D31956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33305: [ubsan] Add a check for pointer overflow UB

2017-06-07 Thread John Regehr via Phabricator via cfe-commits
regehr added a comment. Well, my second program should subtract a multiple of sizeof(T). But anyway, my view is that this is a real overflow and a nasty consequence of the unsigned size_t and the usual arithmetic conversions and I don't think we want to try to poke a hole in UBSan to allow

[PATCH] D33997: Implement the non-execution policy versions of `reduce` and `transform_reduce` for C++17

2017-06-07 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/numeric:98 #include // for numeric_limits +#include I don't like adding this dependency; but the standard requires the use of `std::plus` and `std::multiplies` https://reviews.llvm.org/D33997

[PATCH] D33997: Implement the non-execution policy versions of `reduce` and `transform_reduce` for C++17

2017-06-07 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. There are versions of `reduce` and `transform_reduce` that take an execution policy, and those that do not. This implements the ones that do not. https://reviews.llvm.org/D33997 Files: include/numeric

[PATCH] D33493: Speed up preamble loading

2017-06-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Frontend/ASTUnit.h:192 + /// of that loading + std::map SrcLocCache; + You can use an `llvm::StringMap` instead. Comment at: lib/Frontend/ASTUnit.cpp:1152 + else +

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 101751. ABataev added a comment. Update after review https://reviews.llvm.org/D33735 Files: include/clang/AST/Decl.h lib/AST/ASTImporter.cpp lib/AST/Decl.cpp lib/AST/DeclObjC.cpp lib/CodeGen/CGBlocks.cpp lib/CodeGen/CGCXXABI.cpp

[PATCH] D20693: [clang-tidy] New checker to replace dynamic exception specifications

2017-06-07 Thread don hinton via Phabricator via cfe-commits
hintonda added a comment. I have not, as yet, been able to reproduce the buildbot failures. They were essentially intermittent seg-faults, and corrupt diag output. I will work on creating a test that can reproduce the problem. https://reviews.llvm.org/D20693

[PATCH] D33305: [ubsan] Add a check for pointer overflow UB

2017-06-07 Thread John Regehr via Phabricator via cfe-commits
regehr added a comment. Sorry, let's go with this example instead, which makes it clear that the program is attempting to do something completely sensible: #include typedef struct { int x[2]; } T; int main(void) { T f[1000]; T *p = [500]; ptrdiff_t d = -10; p

Re: [PATCH] D33750: CGCleanup: (NFC) add a test that used to trigger broken IR

2017-06-07 Thread Gor Nishanov via cfe-commits
Sure thing. I'll expand the test to verify that frontend emit expected IR for this case. Thank you for the feedback On Mon, Jun 5, 2017 at 9:58 AM, David Blaikie wrote: > > > On Wed, May 31, 2017 at 5:45 PM Gor Nishanov via Phabricator via > cfe-commits

[PATCH] D33305: [ubsan] Add a check for pointer overflow UB

2017-06-07 Thread John Regehr via Phabricator via cfe-commits
regehr added a comment. I'm taking a look. For reference here's the test program I'm using. #include typedef struct { int x[2]; } T; int main(void) { T f; T *p = ptrdiff_t d = -3293184; p += d / sizeof(T); return 0; } Repository: rL LLVM

[PATCH] D20693: [clang-tidy] New checker to replace dynamic exception specifications

2017-06-07 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D20693#775153, @alexfh wrote: > In https://reviews.llvm.org/D20693#775014, @hintonda wrote: > > > - Only pass %2 parameter if %2 is included in format. > > > I thought, DiagnosticsBuilder handles placeholders in conditional parts > correctly.

[PATCH] D20693: [clang-tidy] New checker to replace dynamic exception specifications

2017-06-07 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D20693#775014, @hintonda wrote: > - Only pass %2 parameter if %2 is included in format. I thought, DiagnosticsBuilder handles placeholders in conditional parts correctly. Did you find an evidence of the opposite? Can you add a test that

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/AST/Decl.h:901 +/// member functions. +unsigned ImplicitParamKind : 3; }; aaron.ballman wrote: > ABataev wrote: > > aaron.ballman wrote: > > > It's a bit strange to me that the non-parameter

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/Decl.h:901 +/// member functions. +unsigned ImplicitParamKind : 3; }; ABataev wrote: > aaron.ballman wrote: > > It's a bit strange to me that the non-parameter declaration bits now

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/AST/Decl.h:901 +/// member functions. +unsigned ImplicitParamKind : 3; }; aaron.ballman wrote: > It's a bit strange to me that the non-parameter declaration bits now have a > field for implicit

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/Decl.h:901 +/// member functions. +unsigned ImplicitParamKind : 3; }; It's a bit strange to me that the non-parameter declaration bits now have a field for implicit parameter

[PATCH] D33982: [clang-format] Fix alignment of preprocessor trailing comments

2017-06-07 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304912: [clang-format] Fix alignment of preprocessor trailing comments (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D33982?vs=101734=101736#toc Repository: rL LLVM

r304912 - [clang-format] Fix alignment of preprocessor trailing comments

2017-06-07 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Wed Jun 7 09:05:06 2017 New Revision: 304912 URL: http://llvm.org/viewvc/llvm-project?rev=304912=rev Log: [clang-format] Fix alignment of preprocessor trailing comments Summary: This patch is a follow-up of https://reviews.llvm.org/rL304687, which fixed an overflow in the

[PATCH] D33982: [clang-format] Fix alignment of preprocessor trailing comments

2017-06-07 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 101734. krasimir added a comment. - Address review comments https://reviews.llvm.org/D33982 Files: lib/Format/WhitespaceManager.cpp unittests/Format/FormatTestComments.cpp Index: unittests/Format/FormatTestComments.cpp

[PATCH] D33726: [driver][netbsd] Build and pass `-L` arguments to the linker

2017-06-07 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. In https://reviews.llvm.org/D33726#774105, @ruiu wrote: > I'm totally against adding per-OS path knowledge to our linker. Compilers > already know include paths and I don't want to maintain another list of paths > in the linker. Also this can be more confusing than

[PATCH] D33305: [ubsan] Add a check for pointer overflow UB

2017-06-07 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. Just a heads up that I ran into an arguably somewhat unexpected instance of this with (a copy of the Graphite project included in) LibreOffice, see the commit message of https://cgit.freedesktop.org/libreoffice/core/commit/?id=681b4a49d797996229513d3e842d2a431030730a

[PATCH] D31972: Do not force the frame pointer by default for ARM EABI

2017-06-07 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. Actually, for NetBSD we want to use -fomit-frame-pointer by default whenever the implicit -funwind-tables is also present. In general, that should be the justification for the default behavior: "Can I reliably unwind a binary with the available information?" Performance

[PATCH] D20693: [clang-tidy] New checker to replace dynamic exception specifications

2017-06-07 Thread don hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 101722. hintonda added a comment. - Only pass %2 parameter if %2 is included in format. https://reviews.llvm.org/D20693 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-06-07 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. Generalize getOpenCLImageAddrSpace into getOpenCLTypeAddrSpace, such that targets can select the address space per type. No functional changes intended. In particular, this is already covered by test/CodeGenOpenCL/opencl_types.cl . Patch by Simon Perretta.

[PATCH] D33982: [clang-format] Fix alignment of preprocessor trailing comments

2017-06-07 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG Comment at: lib/Format/WhitespaceManager.cpp:112 +assert(PreviousOriginalWhitespaceEndOffset <= OriginalWhitespaceStartOffset); +StringRef

r304904 - clang-format: [JS] recognize exported type definitions.

2017-06-07 Thread Martin Probst via cfe-commits
Author: mprobst Date: Wed Jun 7 07:53:22 2017 New Revision: 304904 URL: http://llvm.org/viewvc/llvm-project?rev=304904=rev Log: clang-format: [JS] recognize exported type definitions. Summary: Support "export type T = {...};", in addition to just "type T = {...};". Reviewers: klimek

[PATCH] D20693: [clang-tidy] New checker to replace dynamic exception specifications

2017-06-07 Thread don hinton via Phabricator via cfe-commits
hintonda added a comment. Unfortunately, the logs are no longer available, and I don't have copies. However, I think I know what's going on, so I'll try to submit a fix later today. https://reviews.llvm.org/D20693 ___ cfe-commits mailing list

[PATCH] D20693: [clang-tidy] New checker to replace dynamic exception specifications

2017-06-07 Thread don hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 101708. hintonda added a comment. - Rollback to previous version: rebased + r293218 and r293234. https://reviews.llvm.org/D20693 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-06-07 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun marked 2 inline comments as done. xazax.hun added a comment. In https://reviews.llvm.org/D30691#731617, @zaks.anna wrote: > I agree that scan-build or scan-build-py integration is an important issue to > resolve here. What I envision is that users will just call scan-build and > pass

[PATCH] D33981: Only print registered targets for `--version`

2017-06-07 Thread Dimitry Andric via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304899: Only print registered targets for `--version` (authored by dim). Changed prior to commit: https://reviews.llvm.org/D33981?vs=101690=101697#toc Repository: rL LLVM

r304899 - Only print registered targets for `--version`

2017-06-07 Thread Dimitry Andric via cfe-commits
Author: dim Date: Wed Jun 7 07:05:41 2017 New Revision: 304899 URL: http://llvm.org/viewvc/llvm-project?rev=304899=rev Log: Only print registered targets for `--version` Summary: In D33900, I added printing of the registered targets in clang's `PrintVersion` function, which is not only used for

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-06-07 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 101695. xazax.hun edited the summary of this revision. xazax.hun added a comment. - Migrate to use USR instead of mangled names. Name mangling related changes are reverted. - Better error handling in some cases. - File paths containing spaces are now

r304897 - [CodeGen] Add thumb-mode to target-features for arm/thumb triples.

2017-06-07 Thread Florian Hahn via cfe-commits
Author: fhahn Date: Wed Jun 7 06:50:45 2017 New Revision: 304897 URL: http://llvm.org/viewvc/llvm-project?rev=304897=rev Log: [CodeGen] Add thumb-mode to target-features for arm/thumb triples. Summary: The thumb-mode target feature is used to force Thumb or ARM code generation on a per-function

[PATCH] D33981: Only print registered targets for `--version`

2017-06-07 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai accepted this revision. nemanjai added a comment. This revision is now accepted and ready to land. LGTM. This cleans up the failures on PPC (and probably SystemZ) so the bots should go back to green. https://reviews.llvm.org/D33981 ___

[PATCH] D33277: [Clang][x86][Inline Asm] - Enum support for MS syntax

2017-06-07 Thread Matan via Phabricator via cfe-commits
mharoush updated this revision to Diff 101693. mharoush added a comment. added struct case to the test Repository: rL LLVM https://reviews.llvm.org/D33277 Files: lib/Sema/SemaStmtAsm.cpp test/CodeGen/x86-ms-inline-asm-enum_feature.cpp Index: lib/Sema/SemaStmtAsm.cpp

[PATCH] D33981: Only print registered targets for `--version`

2017-06-07 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. In https://reviews.llvm.org/D33900, I added printing of the registered targets in clang's `PrintVersion` function, which is not only used for `--version` output, but also for `-v` (verbose mode) and `-###`. Especially the latter seems to trip up some test cases, so it

[PATCH] D33277: [Clang][x86][Inline Asm] - Enum support for MS syntax

2017-06-07 Thread Matan via Phabricator via cfe-commits
mharoush updated this revision to Diff 101689. Repository: rL LLVM https://reviews.llvm.org/D33277 Files: lib/Sema/SemaStmtAsm.cpp test/CodeGen/x86-ms-inline-asm-enum_feature.cpp Index: lib/Sema/SemaStmtAsm.cpp === ---

  1   2   >