[PATCH] D31097: [clang-tidy] don't warn about implicit widening casts in function calls

2017-03-20 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. In https://reviews.llvm.org/D31097#704628, @alexfh wrote: > In https://reviews.llvm.org/D31097#704626, @alexfh wrote: > > > In https://reviews.llvm.org/D31097#704621, @xazax.hun wrote: > > > > > I wonder whether warning on implicit casts still makes sense for ex

[PATCH] D30489: [analyzer] catch out of bounds for VLA

2017-03-20 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D30489#689947, @zaks.anna wrote: > Should we just remove ArrayBoundChecker.cpp or is there a value in keeping it > around? I think once ArrayBoundCheckerV2 is in production we should only keep ArrayBoundChecker there as educational purpus

[PATCH] D30087: [Driver] Unify linking of OpenMP runtime

2017-03-20 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. Another ping https://reviews.llvm.org/D30087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r298238 - [scan-build-py] use python tempfile for tempdir

2017-03-20 Thread Laszlo Nagy via cfe-commits
Author: rizsotto Date: Mon Mar 20 04:03:24 2017 New Revision: 298238 URL: http://llvm.org/viewvc/llvm-project?rev=298238&view=rev Log: [scan-build-py] use python tempfile for tempdir Differential Revision: https://reviews.llvm.org/D30862 Modified: cfe/trunk/tools/scan-build-py/libscanbuild/_

Re: r295156 - Add a definition for __STRUCT_PARM_ALIGN__ for elfv2 and 64-bit darwin platforms to match what other compilers produce.

2017-03-20 Thread Iain Sandoe via cfe-commits
> On 16 Mar 2017, at 22:43, Eric Christopher wrote: > > ... and ppc64 darwin preprocessor stuff isn't tested at all. We should really > just delete ppc darwin support at some point. Adding Iain here since he's > said that he's working on the platform :) Indeed I am, and hope to have a set of

[PATCH] D30990: Add more examples to clang-format configuration

2017-03-20 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. Daniel, is that ok with you? https://reviews.llvm.org/D30990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30830: [OpenCL] Fix extension guards for atomic functions

2017-03-20 Thread James Price via Phabricator via cfe-commits
jprice added a comment. Ping - maybe this got lost in the noise. I don't have commit access - could somebody commit this on my behalf please? https://reviews.llvm.org/D30830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D31121: [clangd] Add support for vscode extension configuration

2017-03-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clangd/clients/clangd-vscode/package.json:45 +"default": "clangd", +"description": "The path to clangd executable" +}, Maybe prepend a `, for example: /usr/bin/cla

[PATCH] D30990: Add more examples to clang-format configuration

2017-03-20 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good, just minor remarks. Comment at: include/clang/Format/Format.h:974 + ///# With: + ///MacroBlockBegin: "^\ + ///NS_MAP_BEGIN|\ I'd

[PATCH] D31121: [clangd] Add support for vscode extension configuration

2017-03-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. It looks pretty good! I just have a minor suggestion. Comment at: clangd/clients/clangd-vscode/package.json:45 +"default": "clangd", +"description": "The path to clangd executable" +}, ---

[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

2017-03-20 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki updated this revision to Diff 92315. danielmarjamaki marked an inline comment as done. danielmarjamaki added a comment. Fix review comment. Made isShiftOverflow() static. Repository: rL LLVM https://reviews.llvm.org/D30295 Files: include/clang/StaticAnalyzer/Core/PathSensit

[PATCH] D30415: Fix -mno-altivec cannot overwrite -maltivec option

2017-03-20 Thread Ulrich Weigand via Phabricator via cfe-commits
uweigand added a comment. In https://reviews.llvm.org/D30415#704761, @echristo wrote: > In https://reviews.llvm.org/D30415#703652, @uweigand wrote: > > > I'm a bit confused by this discussion. -faltivec and -maltivec are simply > > aliases, they do exactly the same thing; the clang-internal var

[PATCH] D30990: Add more examples to clang-format configuration

2017-03-20 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 92316. sylvestre.ledru marked an inline comment as done. https://reviews.llvm.org/D30990 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h Index: include/clang/Format/Format.h ==

r298245 - Add more examples to clang-format configuration

2017-03-20 Thread Sylvestre Ledru via cfe-commits
Author: sylvestre Date: Mon Mar 20 07:56:40 2017 New Revision: 298245 URL: http://llvm.org/viewvc/llvm-project?rev=298245&view=rev Log: Add more examples to clang-format configuration Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://review

[PATCH] D23418: [analyzer] Added a reusable constraint system to the CloneDetector

2017-03-20 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I think this is awesome. Would anybody like to move concrete constraint class definitions to a separate header + translation unit, so that to highlight how simple the primary interface is to a person who haven't gone through all the discussion? Comment a

[PATCH] D31097: [clang-tidy] don't warn about implicit widening casts in function calls

2017-03-20 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki updated this revision to Diff 92322. danielmarjamaki added a comment. Remove warnings for implicit casts. Repository: rL LLVM https://reviews.llvm.org/D31097 Files: clang-tidy/misc/MisplacedWideningCastCheck.cpp clang-tidy/misc/MisplacedWideningCastCheck.h docs/clang-ti

[PATCH] D31082: [mips][msa] Range adjustment for ldi_b builtin function operand

2017-03-20 Thread Simon Dardis via Phabricator via cfe-commits
sdardis accepted this revision. sdardis added a comment. This revision is now accepted and ready to land. Can you add a test to test/CodeGen/builtins-mips-msa.c covering the new extended range for ldi.b ? LGTM. https://reviews.llvm.org/D31082 ___

[PATCH] D31097: [clang-tidy] don't warn about implicit widening casts in function calls

2017-03-20 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. I believe there is pointless code in relativeIntSizes etc. If there is for instance "a+b" then the result can't be a char type. static int relativeIntSizes(BuiltinType::Kind Kind) { switch (Kind) { case BuiltinType::UChar: return 1; case Built

[PATCH] D31101: [ThinLTO] Use clang's existing code gen handling for ThinLTO backends

2017-03-20 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 92324. tejohnson added a comment. As discussed in the review threads for https://reviews.llvm.org/D31114 and https://reviews.llvm.org/D31100, only fall back to clang's output file emission for -emit-llvm and -emit-llvm-bc. https://reviews.llvm.org/D31101

[PATCH] D31114: Refactor `initTargetOptions` out of `EmitAssemblyHelper::CreateTargetMachine` and use it to initialize TargetOptions for ThinLTO Backends

2017-03-20 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In https://reviews.llvm.org/D31114#704749, @mehdi_amini wrote: > In https://reviews.llvm.org/D31114#704748, @tejohnson wrote: > > > In https://reviews.llvm.org/D31114#704733, @mehdi_amini wrote: > > > > > In https://reviews.llvm.org/D31114#704728, @tejohnson wrote: > >

r298256 - [OpenCL] Fix extension guards for atomic functions

2017-03-20 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Mon Mar 20 10:02:54 2017 New Revision: 298256 URL: http://llvm.org/viewvc/llvm-project?rev=298256&view=rev Log: [OpenCL] Fix extension guards for atomic functions Review: D30830 Patch by James Price! Modified: cfe/trunk/lib/Headers/opencl-c.h Modified: cfe/trunk/lib/

[PATCH] D30937: [OpenCL] Added diagnostic for checking length of vector

2017-03-20 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/D30937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D30830: [OpenCL] Fix extension guards for atomic functions

2017-03-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Sorry, I overlooked this indeed. Committed in r298256! https://reviews.llvm.org/D30830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D30816: [OpenCL] Added implicit conversion rank for overloading functions with vector data type in OpenCL

2017-03-20 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/D30816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D31133: Add LibreOffice Clang plugin to ExternalClangExamples.rst

2017-03-20 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg created this revision. https://reviews.llvm.org/D31133 Files: docs/ExternalClangExamples.rst Index: docs/ExternalClangExamples.rst === --- docs/ExternalClangExamples.rst +++ docs/ExternalClangExamples.rst @@ -90,3 +90,11 @@

Re: r297975 - Use arg_begin() instead of getArgumentList().begin(), the argument list is an implementation detail

2017-03-20 Thread David Blaikie via cfe-commits
On Thu, Mar 16, 2017 at 12:07 PM Reid Kleckner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rnk > Date: Thu Mar 16 13:55:46 2017 > New Revision: 297975 > > URL: http://llvm.org/viewvc/llvm-project?rev=297975&view=rev > Log: > Use arg_begin() instead of getArgumentList().begin(),

[PATCH] D31134: [Serialization] Serialize DependentSizedExtVectorType

2017-03-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. DependentSizedExtVectorType should be supported by the serialization library Repository: rL LLVM https://reviews.llvm.org/D31134 Files: include/clang/Serialization/ASTBitCodes.h lib/Serialization/ASTReader.cpp lib/Serialization/ASTWriter.cpp test/PCH/c

Re: r297975 - Use arg_begin() instead of getArgumentList().begin(), the argument list is an implementation detail

2017-03-20 Thread Reid Kleckner via cfe-commits
I came across llvm/docs/HistoricalNotes/2002-06-25-MegaPatchInfo.txt, which has this: """ * The Function class now has helper functions for accessing the Arguments list. Instead of having to go through getArgumentList for simple things like iterator over the arguments, now the a*() methods can

Re: r297975 - Use arg_begin() instead of getArgumentList().begin(), the argument list is an implementation detail

2017-03-20 Thread David Blaikie via cfe-commits
On Mon, Mar 20, 2017 at 8:59 AM Reid Kleckner wrote: > I came across llvm/docs/HistoricalNotes/2002-06-25-MegaPatchInfo.txt, > which has this: > """ > * The Function class now has helper functions for accessing the Arguments > list. > Instead of having to go through getArgumentList for simple t

[PATCH] D30809: [coroutines] Add codegen for await and yield expressions

2017-03-20 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov marked 2 inline comments as done. GorNishanov added a comment. Looks good now? https://reviews.llvm.org/D30809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30170: Function definition may have uninstantiated body

2017-03-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 92340. sepavloff added a comment. Small simplicifation https://reviews.llvm.org/D30170 Files: include/clang/AST/Decl.h lib/AST/Decl.cpp lib/Sema/SemaDecl.cpp test/SemaCXX/cxx0x-cursory-default-delete.cpp test/SemaCXX/friend2.cpp Index: test/Sem

[PATCH] D30824: -frewrite-includes: Fix support for __has_include_next

2017-03-20 Thread David Vest via Phabricator via cfe-commits
davve abandoned this revision. davve added a comment. Eugene Velesevich noted in the bug that the patch is broken for multiple levels of headers: > Patch seems work only for first header with same name. I.e. code below finds > first header even clang parses second or third ones. Thus __has_incl

r298275 - Fix some sphinx -Werror's

2017-03-20 Thread Jonathan Roelofs via cfe-commits
Author: jroelofs Date: Mon Mar 20 12:07:49 2017 New Revision: 298275 URL: http://llvm.org/viewvc/llvm-project?rev=298275&view=rev Log: Fix some sphinx -Werror's ... mostly having to do with code blocks which the syntax highlighter chokes on Modified: cfe/trunk/docs/ClangFormatStyleOptions.rs

r298278 - Reapply "Modules: Cache PCMs in memory and avoid a use-after-free"

2017-03-20 Thread Duncan P. N. Exon Smith via cfe-commits
Author: dexonsmith Date: Mon Mar 20 12:58:26 2017 New Revision: 298278 URL: http://llvm.org/viewvc/llvm-project?rev=298278&view=rev Log: Reapply "Modules: Cache PCMs in memory and avoid a use-after-free" This reverts commit r298185, effectively reapplying r298165, after fixing the new unit tests

[PATCH] D29923: PPCallbacks::MacroUndefined, change signature and add test.

2017-03-20 Thread Frederich Munch via Phabricator via cfe-commits
marsupial added a comment. ping https://reviews.llvm.org/D29923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31101: [ThinLTO] Use clang's existing code gen handling for ThinLTO backends

2017-03-20 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: lib/CodeGen/BackendUtil.cpp:1007 else AsmHelper.EmitAssembly(Action, std::move(OS)); I just noticed that EmitAssembly does a lot more than just emission - it is also setting up an optimization pipeline in Cr

[libcxx] r298284 - Add two more papers from Kona, and sort them

2017-03-20 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Mar 20 13:18:09 2017 New Revision: 298284 URL: http://llvm.org/viewvc/llvm-project?rev=298284&view=rev Log: Add two more papers from Kona, and sort them Modified: libcxx/trunk/www/cxx1z_status.html Modified: libcxx/trunk/www/cxx1z_status.html URL: http://llvm.org/

[PATCH] D31121: [clangd] Add support for vscode extension configuration

2017-03-20 Thread Stanislav Ionascu via Phabricator via cfe-commits
stanionascu updated this revision to Diff 92367. stanionascu edited the summary of this revision. stanionascu added a comment. - removed unrelated new line change - extended the "clang.path" description a bit - removed defaultValue for getConfig<>, as it's anyway "contributed" by extension packag

[PATCH] D31121: [clangd] Add support for vscode extension configuration

2017-03-20 Thread Stanislav Ionascu via Phabricator via cfe-commits
stanionascu added inline comments. Comment at: clangd/clients/clangd-vscode/package.json:45 +"default": "clangd", +"description": "The path to clangd executable" +}, krasimir wrote: > krasimir wrote: > > May

[PATCH] D31022: Implement P0298R3: `std::byte`

2017-03-20 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 92370. mclow.lists added a comment. Put the `std::byte` type in the unadorned namespace `std`, rather than the versioned one. This matches the behavior of other types that the compiler "knows about", like `initializer_list`, `type_info`, `bad_alloc` and

r298299 - Bump __cplusplus for C++17 to 201703L per the C++17 DIS.

2017-03-20 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 20 15:12:48 2017 New Revision: 298299 URL: http://llvm.org/viewvc/llvm-project?rev=298299&view=rev Log: Bump __cplusplus for C++17 to 201703L per the C++17 DIS. Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp cfe/trunk/test/Preprocessor/init.c Modified:

r298300 - Avoid these headers looking like the same file on a content-addressed file system.

2017-03-20 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 20 15:14:03 2017 New Revision: 298300 URL: http://llvm.org/viewvc/llvm-project?rev=298300&view=rev Log: Avoid these headers looking like the same file on a content-addressed file system. Modified: cfe/trunk/test/Modules/Inputs/system-out-of-date/X.h cfe/trunk

r298303 - Proposal: Backward-edge CFI for return statements (RCFI)

2017-03-20 Thread Kostya Serebryany via cfe-commits
Author: kcc Date: Mon Mar 20 15:42:00 2017 New Revision: 298303 URL: http://llvm.org/viewvc/llvm-project?rev=298303&view=rev Log: Proposal: Backward-edge CFI for return statements (RCFI) Summary: Proposal: Backward-edge CFI for return statements (RCFI) Reviewers: pcc, eugenis, krasin Reviewed B

[PATCH] D30009: Add support for '#pragma clang attribute'

2017-03-20 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Looking over the most recent version, I'm happy with the general semantics of push with apply_only_to. I'm not sure I see the point of apply_to: it doesn't allow the user to do anything that can't be done with apply_only_to. Also, if the apply_to list for an attribut

[PATCH] D27387: [libc++] Add a key function for bad_function_call

2017-03-20 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a subscriber: dexonsmith. smeenai added a comment. @jyknight http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20161205/178830.html has the reasoning for guarding behind an ABI macro (with @dexonsmith from Apple weighing in). https://reviews.llvm.org/D27387

r298307 - Turn on HTM on power8 and later (including powerpc64le) since it's

2017-03-20 Thread Eric Christopher via cfe-commits
Author: echristo Date: Mon Mar 20 16:12:53 2017 New Revision: 298307 URL: http://llvm.org/viewvc/llvm-project?rev=298307&view=rev Log: Turn on HTM on power8 and later (including powerpc64le) since it's available by default on those cpus and configurations. Modified: cfe/trunk/lib/Basic/Target

r298310 - [docs] Clarify sanitizer flag behavior

2017-03-20 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Mar 20 16:40:58 2017 New Revision: 298310 URL: http://llvm.org/viewvc/llvm-project?rev=298310&view=rev Log: [docs] Clarify sanitizer flag behavior PR32346 suggests that UBSan's docs about the -fsanitize, -fno-sanitize-recover, and -fsanitize-trap options are not explicit

[PATCH] D27651: [clang-format] Even with AlignConsecutiveDeclarations, PointerAlignment: Right should keep *s and &s to the right

2017-03-20 Thread Ken-Patrick Lehrmann via Phabricator via cfe-commits
KP added a comment. ping https://reviews.llvm.org/D27651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30009: Add support for '#pragma clang attribute'

2017-03-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D30009#705649, @efriedma wrote: > Looking over the most recent version, I'm happy with the general semantics of > push with apply_only_to. I'm not sure I see the point of apply_to: it > doesn't allow the user to do anything that can't

[PATCH] D31130: B32239 clang-tidy should not warn about array to pointer decay on system macros

2017-03-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp:50 +AST_MATCHER(Stmt, isArrayToPointerDecay) { + const auto *MatchedCast = cast(&Node); Why not match on `ImplicitCastExpr` rather than `Stmt`?

[clang-tools-extra] r298315 - [clang-tidy] Small cleanup. NFC.

2017-03-20 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Mar 20 17:15:19 2017 New Revision: 298315 URL: http://llvm.org/viewvc/llvm-project?rev=298315&view=rev Log: [clang-tidy] Small cleanup. NFC. Modified: clang-tools-extra/trunk/clang-tidy/readability/DeleteNullPointerCheck.cpp Modified: clang-tools-extra/trunk/clang-t

[clang-tools-extra] r298316 - [clang-tidy] readability-container-size-empty fix for (*x).size()

2017-03-20 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Mar 20 17:15:27 2017 New Revision: 298316 URL: http://llvm.org/viewvc/llvm-project?rev=298316&view=rev Log: [clang-tidy] readability-container-size-empty fix for (*x).size() Modified: clang-tools-extra/trunk/clang-tidy/readability/ContainerSizeEmptyCheck.cpp clang

[PATCH] D31153: Add the ability to use the children() range API in a const-correct manner

2017-03-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. We already have children() but not children() const, which is causing some problems for me on an out of tree project. Most of the changes here are mechanical, except for the work done to `ConstStmtIterator`, which cheats and uses a `const_cast`. Since none o

r298318 - Fix parsing of htmxlintrin.h in C++ mode

2017-03-20 Thread Eric Christopher via cfe-commits
Author: echristo Date: Mon Mar 20 17:31:33 2017 New Revision: 298318 URL: http://llvm.org/viewvc/llvm-project?rev=298318&view=rev Log: Fix parsing of htmxlintrin.h in C++ mode - Fix a variable naming mismatch - Fix gcc extension pointer arithmetic on void to cast to char *. - Test that the head

[PATCH] D31155: [X86][AVX512] Add _mm512_cvtsd_f64 and _mm512_cvtss_f32 intrinsics (PR32305)

2017-03-20 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon created this revision. Repository: rL LLVM https://reviews.llvm.org/D31155 Files: lib/Headers/avx512fintrin.h test/CodeGen/avx512f-builtins.c Index: test/CodeGen/avx512f-builtins.c === --- test/CodeGen/avx512f-builti

[PATCH] D31155: [X86][AVX512] Add _mm512_cvtsd_f64 and _mm512_cvtss_f32 intrinsics (PR32305)

2017-03-20 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D31155 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

[PATCH] D31160: [clang-tidy] Fix misc-move-const-arg for move-only types.

2017-03-20 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. Fix misc-move-const-arg false positives on move-only types. https://reviews.llvm.org/D31160 Files: clang-tidy/misc/MoveConstantArgumentCheck.cpp test/clang-tidy/misc-move-const-arg.cpp Index: test/clang-tidy/misc-move-const-arg.cpp ===

r298322 - Add a function to MD5 a file's contents.

2017-03-20 Thread Zachary Turner via cfe-commits
Author: zturner Date: Mon Mar 20 18:33:18 2017 New Revision: 298322 URL: http://llvm.org/viewvc/llvm-project?rev=298322&view=rev Log: Add a function to MD5 a file's contents. In doing so, clean up the MD5 interface a little. Most existing users only care about the lower 8 bytes of an MD5, but fo

[PATCH] D30415: Fix -mno-altivec cannot overwrite -maltivec option

2017-03-20 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. In https://reviews.llvm.org/D30415#705196, @uweigand wrote: > In https://reviews.llvm.org/D30415#704761, @echristo wrote: > > > In https://reviews.llvm.org/D30415#703652, @uweigand wrote: > > > > > I'm a bit confused by this discussion. -faltivec and -maltivec are > >

[PATCH] D31162: IRGen: Do not set dllexport on declarations.

2017-03-20 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. Setting dllexport on a declaration has no effect, as we do not emit export directives for declarations. Part of the fix for PR32334. https://reviews.llvm.org/D31162 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/test/CodeGenCXX/dllexport.cpp Index: clang/test

[PATCH] D30760: Record command lines in objects built by clang

2017-03-20 Thread Zhizhou Yang via Phabricator via cfe-commits
zhizhouy updated this revision to Diff 92410. zhizhouy added a comment. Re-implemented the the patch: reusing -grecord-gcc-switches from gcc instead of passing arguments to DiagnosticsEngine. If user specify the -grecord-gcc-switches in command line, Clang will start to record it in Driver, and

[PATCH] D31162: IRGen: Do not set dllexport on declarations.

2017-03-20 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Lgtm https://reviews.llvm.org/D31162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30766: Add support for attribute "enum_extensibility"

2017-03-20 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked an inline comment as done. ahatanak added inline comments. Comment at: test/Sema/enum-attr.c:27 + +enum __attribute__((enum_extensibility(arg1))) EnumInvalidArg { // expected-warning{{'enum_extensibility' attribute argument not supported: 'arg1'}} + G -

[PATCH] D31163: Implement Pp0156r2 "Variadic Lock Guard, version 5"

2017-03-20 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. WG21 has decided that the ABI-breaking `lock_guard` proposal that we (@EricWF) implemented (and hid behind an ABI-break macro) is not the way to go. Instead, we're introducing a new class, `scoped_lock`, which is variadic, and leaving `lock_guard` as non-varia

r298330 - IRGen: Do not set dllexport on declarations.

2017-03-20 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Mon Mar 20 21:02:41 2017 New Revision: 298330 URL: http://llvm.org/viewvc/llvm-project?rev=298330&view=rev Log: IRGen: Do not set dllexport on declarations. Setting dllexport on a declaration has no effect, as we do not emit export directives for declarations. Part of the fix f

[PATCH] D31162: IRGen: Do not set dllexport on declarations.

2017-03-20 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL298330: IRGen: Do not set dllexport on declarations. (authored by pcc). Changed prior to commit: https://reviews.llvm.org/D31162?vs=92412&id=92416#toc Repository: rL LLVM https://reviews.llvm.org/D3

r298332 - Add support for attribute enum_extensibility.

2017-03-20 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Mar 20 21:23:00 2017 New Revision: 298332 URL: http://llvm.org/viewvc/llvm-project?rev=298332&view=rev Log: Add support for attribute enum_extensibility. This commit adds support for a new attribute that will be used to distinguish between extensible and inextensible en

[PATCH] D30766: Add support for attribute "enum_extensibility"

2017-03-20 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ahatanak marked an inline comment as done. Closed by commit rL298332: Add support for attribute enum_extensibility. (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D30766?vs=91782&id=92418#toc R

[PATCH] D30760: Record command lines in objects built by clang

2017-03-20 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. This is looking pretty good! Aside from a few nits, I'm happy with this after we add tests. Comment at: lib/Driver/ToolChains/Clang.cpp:2725 + if (Args.hasArg(options::OPT_grecord_gcc_switches)) { +std::string CmdLineOpts = ""; +for

[PATCH] D31130: B32239 clang-tidy should not warn about array to pointer decay on system macros

2017-03-20 Thread Breno Rodrigues Guimaraes via Phabricator via cfe-commits
brenoguim updated this revision to Diff 92419. brenoguim added a comment. - Using the ImplicitCastExpr type on the AST_MATCHER directly to avoid explicit cast. - Using isa<> instead of dyn_cast<> to just check for type - Move variable declaration into "if" condition https://reviews.llvm.org/D3

[PATCH] D31166: Encapsulate FPOptions and use it consistently

2017-03-20 Thread Adam Nemet via Phabricator via cfe-commits
anemet created this revision. Sema holds the current FPOptions which is adjusted by 'pragma STDC FP_CONTRACT'. This then gets propagated into expression nodes as they are built. This encapsulates FPOptions so that this propagation happens opaquely rather than directly with the fp_contractable on

[PATCH] D31167: Use FPContractModeKind universally

2017-03-20 Thread Adam Nemet via Phabricator via cfe-commits
anemet created this revision. FPContractModeKind is the codegen option flag which is already ternary (off, on, fast). This makes it universally the type for the contractable info across the front-end: - In FPOptions (i.e. in the Sema + in the expression nodes). - In LangOpts::DefaultFPContractMo

[PATCH] D31168: Set FMF for -ffp-contract=fast rather than a TargetConfig

2017-03-20 Thread Adam Nemet via Phabricator via cfe-commits
anemet created this revision. This is toward moving fp-contraction=fast from an LLVM TargetOption to a FastMathFlag in order to fix PR25721. https://reviews.llvm.org/D31168 Files: lib/CodeGen/CGExprScalar.cpp Index: lib/CodeGen/CGExprScalar.cpp ==

[PATCH] D30415: Fix -mno-altivec cannot overwrite -maltivec option

2017-03-20 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. In https://reviews.llvm.org/D30415#705889, @echristo wrote: > In https://reviews.llvm.org/D30415#705196, @uweigand wrote: > > > In https://reviews.llvm.org/D30415#704761, @echristo wrote: > > > > > In https://reviews.llvm.org/D30415#703652, @uweigand wrote: > > > > > > >

[PATCH] D31003: [Objective-C] C++ Classes with __weak Members non-POD Types when using -fobjc-weak

2017-03-20 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks, LGTM. https://reviews.llvm.org/D31003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31004: [Objective-C] Fix __weak type traits with -fobjc-weak

2017-03-20 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/AST/Type.cpp:2026 - if (Context.getLangOpts().ObjCAutoRefCount) { -switch (getObjCLifetime()) { -case Qualifiers::OCL_ExplicitNone: - return true; - -case Qualifiers::OCL_Strong: -case Qualifiers::OCL_W

[PATCH] D31006: [Objective-C] Fix "weak-unavailable" warning with -fobjc-weak

2017-03-20 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. Comment at: lib/Sema/SemaCast.cpp:125 + assert(Self.getLangOpts().ObjCAutoRefCount || + Self.getLangOpts().ObjCWeak); bkelley wr

[PATCH] D31007: [Objective-C] Miscellaneous -fobjc-weak Fixes

2017-03-20 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/AST/Type.cpp:3773 +/// lifetime semantics. +bool Type::isNonTrivialObjCLifetimeType() const { + return CanonicalType.hasNonTrivialObjCLifetime(); Is this method not identical in behavior to hasNonTrivialObjCLifetim