[PATCH] D30810: Preserve vec3 type.

2017-03-15 Thread JinGu Kang via Phabricator via cfe-commits
jaykang10 added a comment. > I believe the assumption is more practical: most part of upstream llvm > targets only support vectors with even sized number of lanes. And in those > cases you would have to expand to a 4x vector and leave the 4th element as > undef anyway, so it was done in the f

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

2017-03-15 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. Ping Repository: rL LLVM https://reviews.llvm.org/D30295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-03-15 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Daniel, Your patch looks mostly good to me. I have only minor naming comments. Comment at: lib/StaticAnalyzer/Core/CheckerHelpers.cpp:99 +bool clang::ento::isExprResultConformsComparisonRule(CheckerContext &C, +

[PATCH] D28136: [OpenCL] Implement as_type operator as alias of __builtin_astype.

2017-03-15 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. > From all the above arguments, I feel like the right approach would be to > implement it as Clang builtin which closely matches the operator semantic in > my opinion. We could of course reuse the implementation of __bultin_astype > to avoid unnecessary extra work and co

[PATCH] D30582: [Driver] Restructure handling of -ffast-math and similar options

2017-03-15 Thread Renato Golin via Phabricator via cfe-commits
rengolin added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:2452 + if (!HonorInfs && !HonorNans && !MathErrno && AssociativeMath && + ReciprocalMath && !SignedZeros && !TrappingMath && FpContract == "fast") +CmdArgs.push_back("-ffast-math");

[PATCH] D30977: [CodeGen] Emit a CoreFoundation link guard when @available is used

2017-03-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. After r297760, __isOSVersionAtLeast in compiler-rt loads the CoreFoundation symbols at runtime. This means that `@available` will always fail when used in a binary without a linked CoreFoundation. This patch forces Clang to emit a reference to a CoreFoundation sy

[PATCH] D30582: [Driver] Restructure handling of -ffast-math and similar options

2017-03-15 Thread John Brawn via Phabricator via cfe-commits
john.brawn added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:2452 + if (!HonorInfs && !HonorNans && !MathErrno && AssociativeMath && + ReciprocalMath && !SignedZeros && !TrappingMath && FpContract == "fast") +CmdArgs.push_back("-ffast-math"); --

[PATCH] D30582: [Driver] Restructure handling of -ffast-math and similar options

2017-03-15 Thread Renato Golin via Phabricator via cfe-commits
rengolin accepted this revision. rengolin added a comment. This revision is now accepted and ready to land. Ok, with the break fix, this looks goof to me. Thanks! Comment at: lib/Driver/ToolChains/Clang.cpp:2452 + if (!HonorInfs && !HonorNans && !MathErrno && AssociativeMath &

[PATCH] D30739: [OpenMP] "declare simd" for AArch64 Advanced SIMD.

2017-03-15 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. Gentle ping. Thanks, Francesco https://reviews.llvm.org/D30739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30739: [OpenMP] "declare simd" for AArch64 Advanced SIMD.

2017-03-15 Thread Renato Golin via Phabricator via cfe-commits
rengolin added reviewers: Hahnfeld, carlo.bertolli, arpith-jacob. rengolin added a comment. Looks ok to me, but I'm not very knowledgeable in that area. Hopefully some OpenMP Clang developers I added could give you a more concrete approval. :) Comment at: lib/CodeGen/CGOpenMPR

[PATCH] D30739: [OpenMP] "declare simd" for AArch64 Advanced SIMD.

2017-03-15 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:6821 + ISADataTy ISAData[] = { + {'n', 64}, // double-word Advanced SIMD + {'n', 128}, // quad-word Advanced SIMD rengolin wrote: > No f32? Sorry, I am not sure

[PATCH] D30739: [OpenMP] "declare simd" for AArch64 Advanced SIMD.

2017-03-15 Thread Renato Golin via Phabricator via cfe-commits
rengolin added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:6821 + ISADataTy ISAData[] = { + {'n', 64}, // double-word Advanced SIMD + {'n', 128}, // quad-word Advanced SIMD fpetrogalli wrote: > rengolin wrote: > > No f32?

[PATCH] D30582: [Driver] Restructure handling of -ffast-math and similar options

2017-03-15 Thread John Brawn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL297837: [Driver] Restructure handling of -ffast-math and similar options (authored by john.brawn). Changed prior to commit: https://reviews.llvm.org/D30582?vs=91745&id=91871#toc Repository: rL LLVM

r297837 - [Driver] Restructure handling of -ffast-math and similar options

2017-03-15 Thread John Brawn via cfe-commits
Author: john.brawn Date: Wed Mar 15 09:03:32 2017 New Revision: 297837 URL: http://llvm.org/viewvc/llvm-project?rev=297837&view=rev Log: [Driver] Restructure handling of -ffast-math and similar options The way -ffast-math and the various related options to tweak floating-point handling are handle

[PATCH] D30896: [Clang-tidy] add check misc-prefer-switch-for-enums

2017-03-15 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I've run the check on clang. It's noisy (690 warnings). The (few) cases I've manually inspected look like firm candidates for replacing with switches. Not my call though. F3145418: reduced-clang-tidy-switch-checks I'm going to look at

[PATCH] D30977: [CodeGen] Emit a CoreFoundation link guard when @available is used

2017-03-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGObjC.cpp:3435 + CheckFTy, "__clang_at_available_requires_core_foundation_framework")); + CFLinkCheckFunc->setLinkage(llvm::GlobalValue::LinkOnceAnyLinkage); + CodeGenFunction CGF(*this); Is this a p

[PATCH] D30896: [Clang-tidy] add check misc-prefer-switch-for-enums

2017-03-15 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Quantlib produces no warnings but relies heavily on virtual-dispatch so that may be unsurprising. Repository: rL LLVM https://reviews.llvm.org/D30896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D30896: [Clang-tidy] add check misc-prefer-switch-for-enums

2017-03-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D30896#701642, @jbcoe wrote: > I've run the check on clang. It's noisy (690 warnings). The (few) cases I've > manually inspected look like firm candidates for replacing with switches. Not > my call though. > > F3145418: reduced-clang-ti

[PATCH] D28136: [OpenCL] Implement as_type operator as alias of __builtin_astype.

2017-03-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D28136#701508, @bader wrote: > > From all the above arguments, I feel like the right approach would be to > > implement it as Clang builtin which closely matches the operator semantic > > in my opinion. We could of course reuse the implemen

[PATCH] D28299: Module: use PCMCache to manage memory buffers for pcm files.

2017-03-15 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. Drive-by comment. Comment at: clang/lib/Basic/MemoryBufferCache.cpp:18 + std::unique_ptr Buffer) { + auto Insertion = Buffers.insert(std::make_pair( + Filename, BufferEntry{std::move(Buffer), NextIndex++})); ---

[PATCH] D30854: [ASTMatchers] Add ObjC matchers for fundamental decls

2017-03-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: unittests/ASTMatchers/ASTMatchersTest.h:64 const std::string &Code, const T &AMatcher, bool ExpectMatch, -llvm::StringRef CompileArg, +std::vector Args, const FileContentMappings &VirtualMappedFiles = FileContentM

r297851 - Update clang-cl driver for MSVC 2017.

2017-03-15 Thread Zachary Turner via cfe-commits
Author: zturner Date: Wed Mar 15 11:07:35 2017 New Revision: 297851 URL: http://llvm.org/viewvc/llvm-project?rev=297851&view=rev Log: Update clang-cl driver for MSVC 2017. 2017 changes the way you find an installed copy of Visual Studio as well as its internal directory layout. As a result, clang

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

2017-03-15 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 91890. echuraev marked 5 inline comments as done. Herald added a subscriber: yaxunl. https://reviews.llvm.org/D30937 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExprMember.cpp test/SemaOpenCL/vector_swizzle_length.cl Index: test/Se

[PATCH] D28136: [OpenCL] Implement as_type operator as alias of __builtin_astype.

2017-03-15 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/Headers/opencl-c.h:6588 -char __ovld __cnfn as_char(char); -char __ovld __cnfn as_char(uchar); - Anastasia wrote: > Why do we have some of the overloads omitted? Would this cause any extra > conversions? uchar -> char

r297858 - Disable warning about MSVC not found.

2017-03-15 Thread Zachary Turner via cfe-commits
Author: zturner Date: Wed Mar 15 11:35:13 2017 New Revision: 297858 URL: http://llvm.org/viewvc/llvm-project?rev=297858&view=rev Log: Disable warning about MSVC not found. When this test runs on bots that are configured to default to MSVC, but MSVC isn't actually installed, we can emit a warning

[PATCH] D30896: [Clang-tidy] add check misc-prefer-switch-for-enums

2017-03-15 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe planned changes to this revision. jbcoe added a comment. @Aaron I agree that some instances from your sample would not be improved by a switch. I'll look into narrowing the matched. Repository: rL LLVM https://reviews.llvm.org/D30896 ___ c

Re: LLVM Lab SVN mirror is behind

2017-03-15 Thread Galina Kistanova via cfe-commits
I'm looking at that. Hope we will get a solution by the next release time. Thanks Galina On Tue, Mar 14, 2017 at 9:10 AM, Hans Wennborg wrote: > r297634 was the 4.0.0 release commit. We'll probably see similar-size > commits for 4.0.1 and 5.0.0. Can we make the buildbot svn mirror > ignore th

r297861 - Don't use MSVC Setup Api on MinGW.

2017-03-15 Thread Zachary Turner via cfe-commits
Author: zturner Date: Wed Mar 15 12:09:36 2017 New Revision: 297861 URL: http://llvm.org/viewvc/llvm-project?rev=297861&view=rev Log: Don't use MSVC Setup Api on MinGW. Modified: cfe/trunk/lib/Driver/ToolChains/MSVC.cpp Modified: cfe/trunk/lib/Driver/ToolChains/MSVC.cpp URL: http://llvm.org

r297862 - [ObjC][Sema] Avoid warning about a call to an instance method on an

2017-03-15 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Mar 15 12:16:41 2017 New Revision: 297862 URL: http://llvm.org/viewvc/llvm-project?rev=297862&view=rev Log: [ObjC][Sema] Avoid warning about a call to an instance method on an instance of a qualified Class object when that instance method comes from a protocol that's imp

[PATCH] D30854: [ASTMatchers] Add ObjC matchers for fundamental decls

2017-03-15 Thread Dave Lee via Phabricator via cfe-commits
kastiglione added inline comments. Comment at: unittests/ASTMatchers/ASTMatchersTest.h:64 const std::string &Code, const T &AMatcher, bool ExpectMatch, -llvm::StringRef CompileArg, +std::vector Args, const FileContentMappings &VirtualMappedFiles = FileContentMap

[PATCH] D30854: [ASTMatchers] Add ObjC matchers for fundamental decls

2017-03-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: unittests/ASTMatchers/ASTMatchersTest.h:64 const std::string &Code, const T &AMatcher, bool ExpectMatch, -llvm::StringRef CompileArg, +std::vector Args, const FileContentMappings &VirtualMappedFiles = FileContentM

[PATCH] D30841: [clang-tidy] readability-misleading-indentation: fix chained if

2017-03-15 Thread Florian Gross via Phabricator via cfe-commits
fgross added a comment. I don't have commit access, so could someone please commit this for me? Thanks! https://reviews.llvm.org/D30841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D30810: Preserve vec3 type.

2017-03-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I don't think there is anything wrong with the generation of vec3->vec4 in Clang. I believe the motivation for this was the OpenCL spec treating vec3 as vec4 aligned type (see section 6.1.5: https://www.khronos.org/registry/OpenCL/specs/opencl-2.0-openclc.pdf#12). So

[PATCH] D30896: [Clang-tidy] add check misc-prefer-switch-for-enums

2017-03-15 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. @jbcoe and @aaron.ballman i think an valid warning would be if there is another check in an `else if` statement. so singular `if(enum_value == Enum::Kind)` is still ok, but another branch checking on the enum is suspiscious. Repository: rL LLVM https://reviews.ll

r297866 - [Driver] Define macro __APPLE_EMBEDDED_SIMULATOR__ when option

2017-03-15 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Mar 15 13:04:13 2017 New Revision: 297866 URL: http://llvm.org/viewvc/llvm-project?rev=297866&view=rev Log: [Driver] Define macro __APPLE_EMBEDDED_SIMULATOR__ when option -m(i|tv|watch)os-simulator-version-min is on the command line. Previously the driver would treat -m

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

2017-03-15 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D30990 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h Index: include/clang/Format/Format.h === --- include

[PATCH] D30977: [CodeGen] Emit a CoreFoundation link guard when @available is used

2017-03-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/CodeGen/CGObjC.cpp:3435 + CheckFTy, "__clang_at_available_requires_core_foundation_framework")); + CFLinkCheckFunc->setLinkage(llvm::GlobalValue::LinkOnceAnyLinkage); + CodeGenFunction CGF(*this); rjmccall wr

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

2017-03-15 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added inline comments. Comment at: docs/ClangFormatStyleOptions.rst:671 + + bool value = a ++ a Is this example valid? I don't see wh

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-15 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood created this revision. - Adds a settable environment to clang::driver::Command. - Fixes cross compiling with Visual Studio 2017 by ensuring the linker has the correct environment. This was originally part of https://reviews.llvm.org/D28365, however it was removed for separate review a

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-15 Thread Zachary Turner via Phabricator via cfe-commits
zturner requested changes to this revision. zturner added inline comments. This revision now requires changes to proceed. Comment at: lib/Driver/ToolChains/MSVC.cpp:48-50 + // Undefine this macro so we can call the ANSI version of the function. + #undef GetEnvironmentStrings +

[PATCH] D27800: Add overload of TransformToPotentiallyEvaluated for TypeSourceInfo

2017-03-15 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: test/SemaCXX/pr31042.cpp:1 +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only -disable-free %s + Oh, this testcase doesn't actually crash on trunk without at least -emit-llvm because semantic analysis

[libcxx] r297872 - Implement LWG#2761: 'basic_string should require that charT match traits::char_type'. Tests for string_view, too

2017-03-15 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Mar 15 13:41:11 2017 New Revision: 297872 URL: http://llvm.org/viewvc/llvm-project?rev=297872&view=rev Log: Implement LWG#2761: 'basic_string should require that charT match traits::char_type'. Tests for string_view, too Added: libcxx/trunk/test/std/strings/basic.s

Re: LLVM Lab SVN mirror is behind

2017-03-15 Thread Tim Northover via cfe-commits
On 15 March 2017 at 10:19, Galina Kistanova via llvm-commits wrote: > I'm looking at that. Hope we will get a solution by the next release time. Moving to git at last would be ideal, but I wouldn't bet on it either. Tim. ___ cfe-commits mailing list cf

[PATCH] D30854: [ASTMatchers] Add ObjC matchers for fundamental decls

2017-03-15 Thread Dave Lee via Phabricator via cfe-commits
kastiglione updated this revision to Diff 91914. kastiglione added a comment. Use ArrayRef https://reviews.llvm.org/D30854 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.cpp unittests/ASTMatchers/ASTMatchersNodeTest.cpp

[PATCH] D30854: [ASTMatchers] Add ObjC matchers for fundamental decls

2017-03-15 Thread Dave Lee via Phabricator via cfe-commits
kastiglione added inline comments. Comment at: unittests/ASTMatchers/ASTMatchersTest.h:64 const std::string &Code, const T &AMatcher, bool ExpectMatch, -llvm::StringRef CompileArg, +std::vector Args, const FileContentMappings &VirtualMappedFiles = FileContentMap

[PATCH] D30854: [ASTMatchers] Add ObjC matchers for fundamental decls

2017-03-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! I'll go ahead and commit for you. Comment at: unittests/ASTMatchers/ASTMatchersTest.h:114 +const std::string &Filename = "input.cc") { + return matchesConditionally( +Code, AMatcher, ExpectMatch

r297881 - Fix uninitialized value.

2017-03-15 Thread Zachary Turner via cfe-commits
Author: zturner Date: Wed Mar 15 14:54:25 2017 New Revision: 297881 URL: http://llvm.org/viewvc/llvm-project?rev=297881&view=rev Log: Fix uninitialized value. Modified: cfe/trunk/lib/Driver/ToolChains/MSVC.h Modified: cfe/trunk/lib/Driver/ToolChains/MSVC.h URL: http://llvm.org/viewvc/llvm-p

[PATCH] D30854: [ASTMatchers] Add ObjC matchers for fundamental decls

2017-03-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit in r297882, thanks! https://reviews.llvm.org/D30854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r297882 - Add AST matchers for ObjCProtocolDecl, ObjCCategoryDecl, ObjCMethodDecl, ObjCIvarDecl, and ObjCPropertyDecl.

2017-03-15 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Mar 15 15:14:25 2017 New Revision: 297882 URL: http://llvm.org/viewvc/llvm-project?rev=297882&view=rev Log: Add AST matchers for ObjCProtocolDecl, ObjCCategoryDecl, ObjCMethodDecl, ObjCIvarDecl, and ObjCPropertyDecl. Patch by Dave Lee. Modified: cfe/trunk/docs

[PATCH] D30932: [clang-format] disabled adding extra space after MSVC '__super' keyword

2017-03-15 Thread Juliusz Toczydłowski via Phabricator via cfe-commits
jutocz added a comment. As this is my first patch, can someone please help me in commiting it? https://reviews.llvm.org/D30932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r297885 - [X86][XOP] Add codegen tests for vector integer comparison intrinsics (PR15844)

2017-03-15 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Wed Mar 15 15:20:43 2017 New Revision: 297885 URL: http://llvm.org/viewvc/llvm-project?rev=297885&view=rev Log: [X86][XOP] Add codegen tests for vector integer comparison intrinsics (PR15844) We were testing for the generic _mm_com_* intrinsics, but not the specific compari

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

2017-03-15 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 91925. sylvestre.ledru added a comment. More example (JS) https://reviews.llvm.org/D30990 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h Index: include/clang/Format/Format.h ===

[PATCH] D30283: [ubsan] Reduce alignment checking of C++ object pointers

2017-03-15 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. I'm not sure we actually want to skip these checks for DeclRefExps. I mean, you can rely on the backend to correctly align a local variable (assuming the stack is correctly aligned), but it's very easy to misalign a global. https://reviews.llvm.org/D30283

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

2017-03-15 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 91928. sylvestre.ledru added a comment. Improve consistency on an example https://reviews.llvm.org/D30990 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h Index: include/clang/Format/Format.h ===

r297890 - enable -save-temps with -finclude-defult-header

2017-03-15 Thread Guansong Zhang via cfe-commits
Author: guansong Date: Wed Mar 15 15:57:11 2017 New Revision: 297890 URL: http://llvm.org/viewvc/llvm-project?rev=297890&view=rev Log: enable -save-temps with -finclude-defult-header Currently the two flags can not work together. To illustrate the issue, we can have an one line file a.cl contain

[PATCH] D30743: enable -save-temps with -finclude-defult-header

2017-03-15 Thread Guansong Zhang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL297890: enable -save-temps with -finclude-defult-header (authored by guansong). Changed prior to commit: https://reviews.llvm.org/D30743?vs=91718&id=91935#toc Repository: rL LLVM https://reviews.llv

r297896 - fix build break by removing the target on command line

2017-03-15 Thread Guansong Zhang via cfe-commits
Author: guansong Date: Wed Mar 15 16:46:44 2017 New Revision: 297896 URL: http://llvm.org/viewvc/llvm-project?rev=297896&view=rev Log: fix build break by removing the target on command line Modified: cfe/trunk/test/Driver/include-default-header.cl Modified: cfe/trunk/test/Driver/include-defa

[PATCH] D30810: Preserve vec3 type.

2017-03-15 Thread JinGu Kang via Phabricator via cfe-commits
jaykang10 added a comment. In https://reviews.llvm.org/D30810#701861, @Anastasia wrote: > I don't think there is anything wrong with the generation of vec3->vec4 in > Clang. I believe the motivation for this was the OpenCL spec treating vec3 as > vec4 aligned type (see section 6.1.5: > https:/

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

2017-03-15 Thread Brian T. Kelley via Phabricator via cfe-commits
bkelley created this revision. When adding an Objective-C retainable type member to a C++ class, also check the LangOpts.ObjCWeak flag and the lifetime qualifier so __weak qualified Objective-C pointer members cause the class to be a non-POD type with non-trivial special members, so the compile

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

2017-03-15 Thread Brian T. Kelley via Phabricator via cfe-commits
bkelley created this revision. Similar to ARC, in ObjCWeak Objective-C object pointers qualified with a weak lifetime are not POD or trivial types. Update the type trait code to reflect this. Copy and adapt the arc-type-traits.mm test case to verify correctness. https://reviews.llvm.org/D31004

[PATCH] D31005: [Objective-C] Fix "repeated use of weak" warning with -fobjc-weak

2017-03-15 Thread Brian T. Kelley via Phabricator via cfe-commits
bkelley created this revision. -Warc-repeated-use-of-weak should produce the same warnings with -fobjc-weak as it does with -objc-arc. Also check for ObjCWeak along with ObjCAutoRefCount when recording the use of an evaluated weak variable. Add a -fobjc-weak run to the existing arc-repeated-wea

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

2017-03-15 Thread Brian T. Kelley via Phabricator via cfe-commits
bkelley created this revision. clang should produce the same errors Objective-C classes that cannot be assigned to weak pointers under both -fobjc-arc and -fobjc-weak. Check for ObjCWeak along with ObjCAutoRefCount when analyzing pointer conversions. Add an -fobjc-weak pass to the existing arc-

[PATCH] D31005: [Objective-C] Fix "repeated use of weak" warning with -fobjc-weak

2017-03-15 Thread Jordan Rose via Phabricator via cfe-commits
jordan_rose added a reviewer: rjmccall. jordan_rose added a subscriber: rjmccall. jordan_rose added a comment. The warning-related parts look reasonable to me. Comment at: lib/Sema/SemaDecl.cpp:10184 + (!getLangOpts().ObjCAutoRefCount && getLangOpts().ObjCWeak && +

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

2017-03-15 Thread Brian T. Kelley via Phabricator via cfe-commits
bkelley created this revision. After examining the remaining uses of LangOptions.ObjCAutoRefCount, found a some additional places to also check for ObjCWeak not covered by previous test cases. Added a test file to verify all the code paths that were changed. https://reviews.llvm.org/D31007 Fi

r297905 - Remove repeated code (PR32250). NFCI.

2017-03-15 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Wed Mar 15 17:43:36 2017 New Revision: 297905 URL: http://llvm.org/viewvc/llvm-project?rev=297905&view=rev Log: Remove repeated code (PR32250). NFCI. Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp Modified: cfe/trunk/lib/StaticAnalyzer/Checke

[PATCH] D31005: [Objective-C] Fix "repeated use of weak" warning with -fobjc-weak

2017-03-15 Thread Brian T. Kelley via Phabricator via cfe-commits
bkelley added inline comments. Comment at: lib/Sema/SemaDecl.cpp:10184 + (!getLangOpts().ObjCAutoRefCount && getLangOpts().ObjCWeak && + VDecl->getType().getObjCLifetime() != Qualifiers::OCL_Weak)) && !Diags.isIgnored(diag::warn_arc_repeated_use_of_weak,

[PATCH] D30848: Implement DR 373 "Lookup on namespace qualified name in using-directive"

2017-03-15 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 91956. mgehre added a comment. Improve diagnostics and add tests for them. https://reviews.llvm.org/D30848 Files: include/clang/Parse/Parser.h include/clang/Sema/Sema.h lib/Parse/ParseDeclCXX.cpp lib/Parse/ParseExprCXX.cpp lib/Sema/SemaCXXScopeSpec

r297917 - Fix up testcase to:

2017-03-15 Thread Eric Christopher via cfe-commits
Author: echristo Date: Wed Mar 15 18:41:58 2017 New Revision: 297917 URL: http://llvm.org/viewvc/llvm-project?rev=297917&view=rev Log: Fix up testcase to: a) avoid actually compiling anything b) avoid depositing files in the test directory c) use a check line to make sure that we're looking for t

Re: r297890 - enable -save-temps with -finclude-defult-header

2017-03-15 Thread Eric Christopher via cfe-commits
Hi Guansong, So this wasn't quite the right way to write this testcase. You really wanted a CHECK/CHECK-NOT line along with the actual commands. You also didn't want to (as you noticed later) depend on full compilation. You can check for this sort of thing in the future by using the -### command l

[PATCH] D30854: [ASTMatchers] Add ObjC matchers for fundamental decls

2017-03-15 Thread Dave Lee via Phabricator via cfe-commits
kastiglione added a comment. @aaron.ballman @malcolm.parsons Thanks for the reviews and the commit. I plan to do follow ups for more ObjC ASTMatcher support. https://reviews.llvm.org/D30854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D31005: [Objective-C] Fix "repeated use of weak" warning with -fobjc-weak

2017-03-15 Thread Jordan Rose via Phabricator via cfe-commits
jordan_rose added inline comments. Comment at: lib/Sema/SemaDecl.cpp:10184 + (!getLangOpts().ObjCAutoRefCount && getLangOpts().ObjCWeak && + VDecl->getType().getObjCLifetime() != Qualifiers::OCL_Weak)) && !Diags.isIgnored(diag::warn_arc_repeated_use_of_w

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-15 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood updated this revision to Diff 91962. hamzasood added a comment. Changed the call to GetEnvironmentStrings to use the unicode version https://reviews.llvm.org/D30991 Files: include/clang/Driver/Job.h lib/Driver/Job.cpp lib/Driver/ToolChains/MSVC.cpp Index: lib/Driver/ToolChains/

[PATCH] D30810: Preserve vec3 type.

2017-03-15 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. > As you can see, the type legalizer handle vec3 load/store properly. It does > not write 4th element. The vec3 load/store generates more instructions but it > has correct behavior. I am not 100% sure the vec3 --> vec4 load/store is > correct or not because no one has c

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-15 Thread Zachary Turner via Phabricator via cfe-commits
zturner added inline comments. Comment at: lib/Driver/Job.cpp:312 SmallVector Argv; + auto Envp = Environment.size() > 1 +? const_cast(Environment.data()) Can you add `assert(Environment.back() == nullptr);`? Comment at: lib

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-15 Thread Zachary Turner via Phabricator via cfe-commits
zturner added inline comments. Comment at: lib/Driver/ToolChains/MSVC.cpp:517 + } +} + SkipSettingEnvironment: zturner wrote: > I think you need to push 1 more null terminator onto the end here to > terminate the block. Actually if you use the `std::ti

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-15 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood marked an inline comment as done. hamzasood added inline comments. Comment at: lib/Driver/ToolChains/MSVC.cpp:487-488 + if (!llvm::convertUTF16ToUTF8String( + llvm::ArrayRef(reinterpret_cast(EnvBlockWide.get()), + EnvBlo

[PATCH] D30991: [Driver] Fix cross compiling with Visual Studio 2017

2017-03-15 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood added inline comments. Comment at: lib/Driver/ToolChains/MSVC.cpp:487-488 + if (!llvm::convertUTF16ToUTF8String( + llvm::ArrayRef(reinterpret_cast(EnvBlockWide.get()), + EnvBlockLen * sizeof(EnvBlockWide[0])), +

[PATCH] D30810: Preserve vec3 type.

2017-03-15 Thread JinGu Kang via Phabricator via cfe-commits
jaykang10 added a comment. > The motivation doesn't seem solid to me, who else is going to benefit from > this flag? You also didn't explain why doing this transformation yourself > (looking through the shuffle) on your downstream pass isn't enough for you. > We generally try to avoid adding fl

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

2017-03-15 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. Implement `std::byte` from the paper http://wg21.link/P0298R3. Split the implementation across two files; putting the stuff that needs `enable_if` into and the rest in , where it belongs. Sadly, this means that now includes (at the end). https://reviews.

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

2017-03-15 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: www/cxx1z_status.html:144 http://wg21.link/P0521R0";>P0521R0LWGProposed Resolution for CA 14 (shared_ptr use_count/unique)IssaquahNothing to don/a + http://wg21.link/P0156R2";>P0156R2LWGVariadic Lock guardK

[PATCH] D31019: [clangd] [RFC] Use libclang and CXTranslationUnit instead of ASTUnit

2017-03-15 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson added a comment. Just to make things clear, I'm really not sure if this is the right approach and I'm looking for opinions before going further in that direction (code completion). Repository: rL LLVM https://reviews.llvm.org/D31019

[PATCH] D30810: Preserve vec3 type.

2017-03-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D30810#701141, @jaykang10 wrote: > In https://reviews.llvm.org/D30810#701132, @ahatanak wrote: > > > Actually, it's not a mis-compile. The record layout shows that there is a > > padding before field f2 and f2 starts at byte 16. So using "sto