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

2017-03-30 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Generally please upload diffs with more contexts. For some here it's not even clear to which option they refer ;) Comment at: docs/ClangFormatStyleOptions.rst:941 + ContinuationIndentWidth: 2 + ColumnLimit: 15 + You could force

[PATCH] D29644: [OpenMP] Pass -v to PTXAS if it was passed to the driver.

2017-03-30 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. Just noticed that this isn't specific to OpenMP. Could you move the test to `Driver/cuda-external-tools.cu` where the rest of `ptxas` is tested? Repository: rL LLVM https://reviews.llvm.org/D29644 ___ cfe-commits mailin

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

2017-03-30 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. Daniel, wdyt? :) https://reviews.llvm.org/D31408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29642: [OpenMP] Make OpenMP generated code for the NVIDIA device relocatable by default

2017-03-30 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld accepted this revision. Hahnfeld added a comment. This revision is now accepted and ready to land. LGTM after fixing the check-prefix Comment at: test/Driver/openmp-offload.c:595 +// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -save-temps -

[PATCH] D28955: [analyzer] Enable support for symbolic extension/truncation

2017-03-30 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 93591. ddcc added a comment. Rebase https://reviews.llvm.org/D28955 Files: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h lib/StaticAnalyzer/Checkers/BoolAssignmentChecker

[PATCH] D28954: [analyzer] Add support for symbolic float expressions

2017-03-30 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 93590. ddcc added a comment. Rebase, update tests, fix bugs https://reviews.llvm.org/D28954 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h include/clang/StaticAnalyzer/Core/Pat

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-03-30 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 93589. ddcc added a comment. Rebase https://reviews.llvm.org/D28953 Files: include/clang/StaticAnalyzer/Checkers/SValExplainer.h lib/StaticAnalyzer/Core/SValBuilder.cpp lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp test/Analysis/bitwise-ops.c test/An

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-03-30 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 93588. ddcc added a comment. Fix erroneous comment https://reviews.llvm.org/D28952 Files: CMakeLists.txt cmake/modules/FindZ3.cmake include/clang/Config/config.h.cmake include/clang/StaticAnalyzer/Core/Analyses.def include/clang/StaticAnalyzer/Core/P

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-03-30 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 93587. ddcc marked 4 inline comments as done. ddcc added a comment. Use direct bitcasting instead of string conversion for APFloat casting, add reference counting for Z3_sort, eliminate some duplicate code https://reviews.llvm.org/D28952 Files: CMakeLists.t

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-03-30 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. Thanks for the feedback! My main constraint is that the results from the floating-point analysis weren't very interesting (see #652894 <#652894>), so I'm not actively working on further development. > FYI I've been working on floating point support in KLEE and have extende

[PATCH] D31404: [OpenCL] Allow alloca return non-zero private pointer

2017-03-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D31404#714244, @Anastasia wrote: > I can't see clearly why the alloca has to be extended to accommodate the > address space too? Couldn't the address space for alloca just be taken > directly from the data layout? > > In fact is seems from th

r299181 - Revert test added in r299152

2017-03-30 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Thu Mar 30 23:29:07 2017 New Revision: 299181 URL: http://llvm.org/viewvc/llvm-project?rev=299181&view=rev Log: Revert test added in r299152 Removing the test until I can figure out how to get the ThinLTO backend invocation of clang to use the correct target. Modified:

[PATCH] D31235: Enhance -Wshadow to warn when shadowing typedefs or type aliases

2017-03-30 Thread Ahmed Asadi via Phabricator via cfe-commits
ahmedasadi added a comment. Thanks for reviewing. Would you be able to commit this patch for me, as I do not have commit access? https://reviews.llvm.org/D31235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D31235: Enhance -Wshadow to warn when shadowing typedefs or type aliases

2017-03-30 Thread Ahmed Asadi via Phabricator via cfe-commits
ahmedasadi updated this revision to Diff 93583. ahmedasadi marked an inline comment as done. ahmedasadi added a comment. Re-ordered the checks in shouldWarnIfShadowedDecl as suggested by rnk. https://reviews.llvm.org/D31235 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sem

r299178 - Add target-cpu

2017-03-30 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Thu Mar 30 22:49:52 2017 New Revision: 299178 URL: http://llvm.org/viewvc/llvm-project?rev=299178&view=rev Log: Add target-cpu Sigh, another follow-on fix needed for test in r299152 causing bot failures. We also need the target-cpu for the ThinLTO BE clang invocation. Mod

r299176 - Add more target triples to test

2017-03-30 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Thu Mar 30 22:27:47 2017 New Revision: 299176 URL: http://llvm.org/viewvc/llvm-project?rev=299176&view=rev Log: Add more target triples to test Third and hopefully final fix to test for r299152 that is causing bot failures: make sure the target triple specified for the Thi

r299174 - [asan] Turn -fsanitize-address-use-after-scope on by default [clang part]

2017-03-30 Thread Kuba Mracek via cfe-commits
Author: kuba.brecka Date: Thu Mar 30 22:00:09 2017 New Revision: 299174 URL: http://llvm.org/viewvc/llvm-project?rev=299174&view=rev Log: [asan] Turn -fsanitize-address-use-after-scope on by default [clang part] AddressSanitizer has an optional compile-time flag, -fsanitize-address-use-after-sco

r299173 - Fix new compile command in test

2017-03-30 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Thu Mar 30 21:55:31 2017 New Revision: 299173 URL: http://llvm.org/viewvc/llvm-project?rev=299173&view=rev Log: Fix new compile command in test My previous attempt to fix bot failures from r299152 didn't add the necessary option to get bitcode out of the cc1 step. Modifie

r299170 - Add triple to new test

2017-03-30 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Thu Mar 30 21:36:47 2017 New Revision: 299170 URL: http://llvm.org/viewvc/llvm-project?rev=299170&view=rev Log: Add triple to new test Attempt to fix bot errors from r299152 by using clang_cc1 and specifying target triple to compile step. Modified: cfe/trunk/test/Code

r299152 - [ThinLTO] Set up lto::Config properly for codegen in ThinLTO backends

2017-03-30 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Thu Mar 30 21:05:15 2017 New Revision: 299152 URL: http://llvm.org/viewvc/llvm-project?rev=299152&view=rev Log: [ThinLTO] Set up lto::Config properly for codegen in ThinLTO backends Summary: This involved refactoring out pieces of EmitAssemblyHelper::CreateTargetMachine fo

[PATCH] D31508: [ThinLTO] Set up lto::Config properly for codegen in ThinLTO backends

2017-03-30 Thread Teresa Johnson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299152: [ThinLTO] Set up lto::Config properly for codegen in ThinLTO backends (authored by tejohnson). Changed prior to commit: https://reviews.llvm.org/D31508?vs=93536&id=93577#toc Repository: rL LL

r299151 - Update x86-64 ABI link with the one from linuxbase.org since the other

2017-03-30 Thread Eric Christopher via cfe-commits
Author: echristo Date: Thu Mar 30 20:59:40 2017 New Revision: 299151 URL: http://llvm.org/viewvc/llvm-project?rev=299151&view=rev Log: Update x86-64 ABI link with the one from linuxbase.org since the other seems to be down. Modified: cfe/trunk/include/clang/Basic/TargetInfo.h Modified: cfe/t

r299148 - Fix typo, defind -> defined.

2017-03-30 Thread Eric Christopher via cfe-commits
Author: echristo Date: Thu Mar 30 20:45:39 2017 New Revision: 299148 URL: http://llvm.org/viewvc/llvm-project?rev=299148&view=rev Log: Fix typo, defind -> defined. Modified: cfe/trunk/include/clang/Basic/TargetInfo.h cfe/trunk/lib/Sema/SemaTemplate.cpp Modified: cfe/trunk/include/clang/B

[clang-tools-extra] r299146 - [clang-tidy] Revert D31406 (Reuse FileID in getLocation)

2017-03-30 Thread Chih-Hung Hsieh via cfe-commits
Author: chh Date: Thu Mar 30 20:11:11 2017 New Revision: 299146 URL: http://llvm.org/viewvc/llvm-project?rev=299146&view=rev Log: [clang-tidy] Revert D31406 (Reuse FileID in getLocation) Somehow the change failed test clang-tidy/llvm-include-order.cpp on Windows platform. Differential Revision:

Re: [clang-tools-extra] r299119 - [clang-tidy] Reuse FileID in getLocation

2017-03-30 Thread Chih-hung Hsieh via cfe-commits
I don't know why this test failed only on Windows, but will revert my change soon. On Thu, Mar 30, 2017 at 6:07 PM, Yung, Douglas wrote: > Hi, this change seems to be causing the test clang-tidy/llvm-include-order.cpp > to fail with a crash on the PS4 Windows bot: > > (From http://lab.llvm.org:

RE: [clang-tools-extra] r299119 - [clang-tidy] Reuse FileID in getLocation

2017-03-30 Thread Yung, Douglas via cfe-commits
Hi, this change seems to be causing the test clang-tidy/llvm-include-order.cpp to fail with a crash on the PS4 Windows bot: (From http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/7487) TEST 'Clang Tools :: clang-tidy/llvm-include-ord

[PATCH] D31235: Enhance -Wshadow to warn when shadowing typedefs or type aliases

2017-03-30 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. Looks good to me Comment at: lib/Sema/SemaDecl.cpp:6710-6711 + + // Return false if warning is ignored. + if (Diags.isIgnored(diag::warn_decl_shadow, R.getNameLoc())) +re

[PATCH] D31518: Try to fix the libcxx build with mingw64

2017-03-30 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299144: Try to fix the libcxx build with mingw64 (authored by rnk). Changed prior to commit: https://reviews.llvm.org/D31518?vs=93568&id=93570#toc Repository: rL LLVM https://reviews.llvm.org/D31518

[libcxx] r299144 - Try to fix the libcxx build with mingw64

2017-03-30 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Mar 30 19:34:05 2017 New Revision: 299144 URL: http://llvm.org/viewvc/llvm-project?rev=299144&view=rev Log: Try to fix the libcxx build with mingw64 Summary: mingw64 has lots of default libs that libc++ and its test programs should link against. With this patch, cmake now r

[libcxxabi] r299143 - [libc++abi] Remove missed use of config.h

2017-03-30 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Thu Mar 30 19:29:25 2017 New Revision: 299143 URL: http://llvm.org/viewvc/llvm-project?rev=299143&view=rev Log: [libc++abi] Remove missed use of config.h Modified: libcxxabi/trunk/src/cxa_noexception.cpp Modified: libcxxabi/trunk/src/cxa_noexception.cpp URL: http://llv

[PATCH] D31518: Try to fix the libcxx build with mingw64

2017-03-30 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. CMake's behavior here is unfortunate but this seems like a reasonable workaround. https://reviews.llvm.org/D31518 ___ cfe-commits mailing

[PATCH] D31518: Try to fix the libcxx build with mingw64

2017-03-30 Thread Reid Kleckner via Phabricator via cfe-commits
rnk created this revision. Herald added a subscriber: mgorny. mingw64 has lots of default libs that libc++ and its test programs should link against. With this patch, cmake now runs successfully with GCC on Windows. https://reviews.llvm.org/D31518 Files: libcxx/cmake/config-ix.cmake Index:

[PATCH] D31508: [ThinLTO] Set up lto::Config properly for codegen in ThinLTO backends

2017-03-30 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini accepted this revision. mehdi_amini added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D31508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D31502: [libc++abi] Delete config.h

2017-03-30 Thread Shoaib Meenai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299129: [libc++abi] Delete config.h (authored by smeenai). Changed prior to commit: https://reviews.llvm.org/D31502?vs=93496&id=93565#toc Repository: rL LLVM https://reviews.llvm.org/D31502 Files:

[libcxxabi] r299129 - [libc++abi] Delete config.h

2017-03-30 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Thu Mar 30 18:31:33 2017 New Revision: 299129 URL: http://llvm.org/viewvc/llvm-project?rev=299129&view=rev Log: [libc++abi] Delete config.h Summary: It's now completely empty, so we can remove it entirely. Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differenti

[PATCH] D31502: [libc++abi] Delete config.h

2017-03-30 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In https://reviews.llvm.org/D31502#714341, @EricWF wrote: > Thanks. I'm surprised this wasn't done earlier. I removed the `unistd.h` include this morning (r299087 ), which is what made the file empty. https://reviews.llvm.org/D31502

r299127 - fixup: use CHECK for non-atttribute sets

2017-03-30 Thread Dean Michael Berris via cfe-commits
Author: dberris Date: Thu Mar 30 17:46:49 2017 New Revision: 299127 URL: http://llvm.org/viewvc/llvm-project?rev=299127&view=rev Log: fixup: use CHECK for non-atttribute sets Modified: cfe/trunk/test/CodeGen/xray-instruction-threshold.cpp Modified: cfe/trunk/test/CodeGen/xray-instruction-thr

r299126 - [XRay][clang] Fix the -fxray-instruction-threshold flag processing

2017-03-30 Thread Dean Michael Berris via cfe-commits
Author: dberris Date: Thu Mar 30 17:46:45 2017 New Revision: 299126 URL: http://llvm.org/viewvc/llvm-project?rev=299126&view=rev Log: [XRay][clang] Fix the -fxray-instruction-threshold flag processing Summary: The refactoring introduced a regression in the flag processing for -fxray-instruction-t

[PATCH] D31491: [XRay][clang] Fix the -fxray-instruction-threshold flag processing

2017-03-30 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added inline comments. Comment at: test/CodeGen/xray-instruction-threshold.cpp:11 + +// CHECK-DAG: define i32 @_Z3foov() #[[THRESHOLD:[0-9]+]] { +// CHECK-DAG: define i32 @_Z3barv() #[[NEVERATTR:[0-9]+]] { rnk wrote: > Any reason to use -DAG on the decls?

[PATCH] D31491: [XRay][clang] Fix the -fxray-instruction-threshold flag processing

2017-03-30 Thread Dean Michael Berris via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. dberris marked an inline comment as done. Closed by commit rL299126: [XRay][clang] Fix the -fxray-instruction-threshold flag processing (authored by dberris). Changed prior to commit: https://reviews.llvm.org/D31491?vs=93

[PATCH] D29644: [OpenMP] Pass -v to PTXAS if it was passed to the driver.

2017-03-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93559. gtbercea added a comment. Change prefix name in test. Repository: rL LLVM https://reviews.llvm.org/D29644 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c ===

[PATCH] D31515: [libc++] Implement LWG 2911 - add an is_aggregate type-trait

2017-03-30 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. This patch implements http://cplusplus.github.io/LWG/lwg-defects.html#2911. I'm putting this up for review until __is_aggregate is added to clang (See https://reviews.llvm.org/D31513) https://reviews.llvm.org/D31515 Files: include/__config include/type_traits

[PATCH] D29642: [OpenMP] Make OpenMP generated code for the NVIDIA device relocatable by default

2017-03-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93557. gtbercea added a comment. Change prefix name in test. Repository: rL LLVM https://reviews.llvm.org/D29642 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c ===

[PATCH] D29904: [OpenMP] Prevent emission of exception handling code when using OpenMP to offload to NVIDIA devices.

2017-03-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:2167-2172 +// Set the flag to prevent the implementation from emitting device exception +// handling code for those requiring so. +if (Opts.OpenMPIsDevice && T.isNVPTX()) { + Opts.Ex

[PATCH] D31513: [Sema] Add __is_aggregate type-trait and implement LWG 2015

2017-03-30 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 93555. EricWF added a comment. - Move test to correct file. https://reviews.llvm.org/D31513 Files: include/clang/Basic/TokenKinds.def include/clang/Basic/TypeTraits.h lib/Parse/ParseDeclCXX.cpp lib/Parse/ParseExpr.cpp lib/Sema/SemaExprCXX.cpp tes

[PATCH] D31406: [clang-tidy] Reuse FileID in getLocation

2017-03-30 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299119: [clang-tidy] Reuse FileID in getLocation (authored by chh). Changed prior to commit: https://reviews.llvm.org/D31406?vs=93499&id=93554#toc Repository: rL LLVM https://reviews.llvm.org/D31406

[clang-tools-extra] r299119 - [clang-tidy] Reuse FileID in getLocation

2017-03-30 Thread Chih-Hung Hsieh via cfe-commits
Author: chh Date: Thu Mar 30 17:09:17 2017 New Revision: 299119 URL: http://llvm.org/viewvc/llvm-project?rev=299119&view=rev Log: [clang-tidy] Reuse FileID in getLocation One FileID per warning will increase and overflow NextLocalOffset when input file is large with many warnings. Reusing FileID

[PATCH] D31513: [Sema] Add __is_aggregate type-trait and implement LWG 2015

2017-03-30 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. LWG 2911 adds `std::is_aggregate` to the library, which requires a new builtin trait. This patch implements `__is_aggregate`. Additionally this patch implements LWG 2015

[PATCH] D29599: Clang Changes for alloc_align

2017-03-30 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299117: Clang changes for alloc_align attribute (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D29599?vs=93537&id=93549#toc Repository: rL LLVM https://reviews.llvm.org

[PATCH] D29599: Clang Changes for alloc_align

2017-03-30 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Thanks guys. I THINK I properly removed the svn properties properly, though, I actually didn't know they existed until just now! Repository: rL LLVM https://reviews.llvm.org/D29599 ___ cfe-commits mailing list cfe-co

r299117 - Clang changes for alloc_align attribute

2017-03-30 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Thu Mar 30 16:48:55 2017 New Revision: 299117 URL: http://llvm.org/viewvc/llvm-project?rev=299117&view=rev Log: Clang changes for alloc_align attribute GCC has the alloc_align attribute, which is similar to assume_aligned, except the attribute's parameter is the index o

[PATCH] D31406: [clang-tidy] Reuse FileID in getLocation

2017-03-30 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 Do you have commit rights? https://reviews.llvm.org/D31406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D29599: Clang Changes for alloc_align

2017-03-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Can you drop the svn props on the new files when you commit? I don't think we usually set them, and I've seen commits specifically removing the eol-style props before. https://reviews.llvm.org/D29599 ___

[PATCH] D29599: Clang Changes for alloc_align

2017-03-30 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. Thanks. With that, LGTM. https://reviews.llvm.org/D29599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D29599: Clang Changes for alloc_align

2017-03-30 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 93537. erichkeane added a comment. Added tests as requested by John. https://reviews.llvm.org/D29599 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Sema/Sema.h lib/CodeGen/CGCall.cpp lib/CodeGen/CodeGenFunction

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

2017-03-30 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. As discussed with Mehdi offline, I am taking this one over. I just mailed https://reviews.llvm.org/D31508 which supersedes this one. https://reviews.llvm.org/D31114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31508: [ThinLTO] Set up lto::Config properly for codegen in ThinLTO backends

2017-03-30 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. Herald added a subscriber: Prazek. This involved refactoring out pieces of EmitAssemblyHelper::CreateTargetMachine for use in runThinLTOBackend. Subsumes https://reviews.llvm.org/D31114. https://reviews.llvm.org/D31508 Files: lib/CodeGen/BackendUtil.cpp tes

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

2017-03-30 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 93535. tejohnson added a comment. Use LTO to emit LLVM IR https://reviews.llvm.org/D31101 Files: lib/CodeGen/BackendUtil.cpp test/CodeGen/thinlto-emit-llvm.c Index: test/CodeGen/thinlto-emit-llvm.c ===

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

2017-03-30 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)); tejohnson wrote: > I just noticed that EmitAssembly does a lot more than just emission - it is > also setting up an optimi

Re: [PATCH] Use the correct ObjC++ personality

2017-03-30 Thread Jonathan Schleifer via cfe-commits
> Testcase? Shouldn't be necessary for such a simple and extremely obvious one-liner. -- Jonathan ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r299105 - Fix LWG 2934 - optional doesn't compare with T

2017-03-30 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Thu Mar 30 15:06:52 2017 New Revision: 299105 URL: http://llvm.org/viewvc/llvm-project?rev=299105&view=rev Log: Fix LWG 2934 - optional doesn't compare with T Modified: libcxx/trunk/include/optional libcxx/trunk/test/std/utilities/optional/optional.comp_with_t/equal.p

[libcxx] r299100 - Implement LWG 2842 - optional(U&&) needs to SFINAE on decay_t

2017-03-30 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Thu Mar 30 14:43:50 2017 New Revision: 299100 URL: http://llvm.org/viewvc/llvm-project?rev=299100&view=rev Log: Implement LWG 2842 - optional(U&&) needs to SFINAE on decay_t Modified: libcxx/trunk/include/optional libcxx/trunk/test/std/utilities/optional/optional.obj

[PATCH] D29599: Clang Changes for alloc_align

2017-03-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGCall.cpp:4363 +} else if (AllocAlignParam && TargetDecl->hasAttr()) + EmitAlignmentAssumption(Ret.getScalarVal(), AllocAlignParam); } rjmccall wrote: > Your old code was fine, you just needed t

[PATCH] D31487: [coroutines] Fix rebuilding of implicit and dependent coroutine statements.

2017-03-30 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/Sema/CoroutineBuilder.h:53 +assert(this->IsValid && "coroutine already invalid"); +this->IsValid = makeReturnObject() && makeParamMoves(); +if (this->IsValid && !IsPromiseDependentType) GorNishanov wrote:

[PATCH] D31487: [coroutines] Fix rebuilding of implicit and dependent coroutine statements.

2017-03-30 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 93510. EricWF added a comment. - Remove incorrect comments. https://reviews.llvm.org/D31487 Files: include/clang/AST/StmtCXX.h lib/AST/StmtCXX.cpp lib/Sema/CoroutineBuilder.h lib/Sema/SemaCoroutine.cpp lib/Sema/TreeTransform.h test/SemaCXX/corout

[PATCH] D31308: [clang-tidy] new check readability-no-alternative-tokens

2017-03-30 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 93519. mgehre added a comment. only check C++ code; only match operators that can have alternative representations https://reviews.llvm.org/D31308 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/OperatorsRepresentationCheck.cpp cla

Re: r298913 - Added `applyAtomicChanges` function.

2017-03-30 Thread Adrian Prantl via cfe-commits
Note that the green dragon bot doesn't use local submodule visibility, so every #include pulls in the entire clang module that header belongs to. Does this explain what you are seeing? (You should be able to reproduce with cmake -DLLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY=0) -- adrian > On Mar 30

[PATCH] D29904: [OpenMP] Prevent emission of exception handling code when using OpenMP to offload to NVIDIA devices.

2017-03-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93513. gtbercea added a comment. Herald added a subscriber: rengolin. Clean-up test. Repository: rL LLVM https://reviews.llvm.org/D29904 Files: lib/Frontend/CompilerInvocation.cpp test/OpenMP/target_parallel_no_exceptions.cpp Index: test/OpenMP/ta

Re: r298913 - Added `applyAtomicChanges` function.

2017-03-30 Thread Juergen Ributzka via cfe-commits
[+ Adrian] Adrian knows more about the bot setup. On Wed, Mar 29, 2017 at 8:04 AM, Eric Liu wrote: > Hi Juergen, thanks for taking care of this, but I'm wondering if this > build bot is using a different set of build rules? The error message says > "Clang_Tooling > -> Clang_Format -> Clang_Too

[PATCH] D31167: Use FPContractModeKind universally

2017-03-30 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: cfe/trunk/include/clang/Basic/LangOptions.h:217 /// Adjust BinaryOperator::FPFeatures to match the bit-field size of this. - unsigned fp_contract : 1; + LangOptions::FPContractModeKind fp_contract : 2; }; anemet wrote:

[PATCH] D15031: CFG: Add CFGElement for automatic variables that leave the scope

2017-03-30 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre marked an inline comment as done. mgehre added a comment. Friendly ping https://reviews.llvm.org/D15031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24892: [clang-tidy] Add option "LiteralInitializers" to cppcoreguidelines-pro-type-member-init

2017-03-30 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 93511. mgehre added a comment. Put 'u' and 'l' on integer literals https://reviews.llvm.org/D24892 Files: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h docs/ReleaseNotes.rst docs/clang-t

[PATCH] D31491: [XRay][clang] Fix the -fxray-instruction-threshold flag processing

2017-03-30 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 Comment at: test/CodeGen/xray-instruction-threshold.cpp:11 + +// CHECK-DAG: define i32 @_Z3foov() #[[THRESHOLD:[0-9]+]] { +// CHECK-DAG: define i32 @_Z3barv() #[[NEVERATTR:[0-

r299094 - Correcting a typo; NFC.

2017-03-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Mar 30 13:11:20 2017 New Revision: 299094 URL: http://llvm.org/viewvc/llvm-project?rev=299094&view=rev Log: Correcting a typo; NFC. Modified: cfe/trunk/test/Analysis/simple-stream-checks.c Modified: cfe/trunk/test/Analysis/simple-stream-checks.c URL: http://ll

[PATCH] D31502: [libc++abi] Delete config.h

2017-03-30 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. Thanks. I'm surprised this wasn't done earlier. https://reviews.llvm.org/D31502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

[PATCH] D31487: [coroutines] Fix rebuilding of implicit and dependent coroutine statements.

2017-03-30 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 93508. EricWF added a comment. - Fix insane definition of `hasDependentPromiseType()` https://reviews.llvm.org/D31487 Files: include/clang/AST/StmtCXX.h lib/AST/StmtCXX.cpp lib/Sema/CoroutineBuilder.h lib/Sema/SemaCoroutine.cpp lib/Sema/TreeTransfo

[PATCH] D31441: [clang-format] fix crash in NamespaceEndCommentsFixer (PR32438)

2017-03-30 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 93507. mgehre added a comment. Updated for comments https://reviews.llvm.org/D31441 Files: lib/Format/NamespaceEndCommentsFixer.cpp unittests/Format/NamespaceEndCommentsFixerTest.cpp Index: unittests/Format/NamespaceEndCommentsFixerTest.cpp ===

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

2017-03-30 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor updated this revision to Diff 93503. teemperor added a comment. - Remove the mysterious unicode-character at the start of CloneDetection.cpp - Fixed formatting of the comment in CloneDetectionTest.cpp - Fixed comment in StmtSequence::contains that was still talking about checking for tr

[PATCH] D29644: [OpenMP] Pass -v to PTXAS if it was passed to the driver.

2017-03-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93502. gtbercea added a comment. Remove redundant check. Repository: rL LLVM https://reviews.llvm.org/D29644 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c ===

[PATCH] D29642: [OpenMP] Make OpenMP generated code for the NVIDIA device relocatable by default

2017-03-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 93501. gtbercea added a comment. Remove redundant check. Repository: rL LLVM https://reviews.llvm.org/D29642 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload.c Index: test/Driver/openmp-offload.c ===

[PATCH] D16682: 19957 - OpenCL incorrectly accepts implicit address space conversion with ternary operator

2017-03-30 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. Is this still necessary? The bug is marked fixed https://reviews.llvm.org/D16682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30643: [OpenCL] Extended diagnostics for atomic initialization

2017-03-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/atomic-init.cl:6 +kernel void test_atomic_initialization() { + a1 = 1; // expected-error {{atomic variable can only be assigned to a compile time constant and to variables in global adress space}} + atomic_int a2 = 0

[PATCH] D31321: [OpenCL] Do not generate "kernel_arg_type_qual" metadata for non-pointer args

2017-03-30 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! Comment at: test/CodeGenOpenCL/kernel-arg-info.cl:66 // CHECK: ![[MD13]] = !{!"int*", !"int", !"int", !"float*"} -// CHECK: ![[MD14]] = !{!"restrict", !"const",

[PATCH] D31404: [OpenCL] Allow alloca return non-zero private pointer

2017-03-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I can't see clearly why the alloca has to be extended to accommodate the address space too? Couldn't the address space for alloca just be taken directly from the data layout? In fact is seems from the LLVM review, an address space for alloca doesn't go into the bitc

LLVM buildmaster will be updated and restarted tonight

2017-03-30 Thread Galina Kistanova via cfe-commits
Hello everyone, LLVM buildmaster will be updated and restarted after 5 PM Pacific time today. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30837: [libcxx] Support for shared_ptr

2017-03-30 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 93488. erik.pilkington marked 2 inline comments as done. erik.pilkington added a comment. In this new patch, use an explicit specialization of std::allocator that specifically only performs a rebind. This needs to be a specialization of std::allocato

[PATCH] D31406: [clang-tidy] Reuse FileID in getLocation

2017-03-30 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 93499. chh marked an inline comment as done. chh added a comment. Use getOrCreateFileID. https://reviews.llvm.org/D31406 Files: clang-tidy/ClangTidy.cpp Index: clang-tidy/ClangTidy.cpp === ---

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-03-30 Thread Dan Liew via Phabricator via cfe-commits
delcypher added inline comments. Comment at: CMakeLists.txt:188 +find_package(Z3 4.5) + delcypher wrote: > @ddcc It is of course up to you but I recently [[ added support for using > `libz3` directly | added support for using `libz3` directly ]] from CMake. >

[PATCH] D31502: [libc++abi] Delete config.h

2017-03-30 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai created this revision. It's now completely empty, so we can remove it entirely. https://reviews.llvm.org/D31502 Files: src/config.h src/cxa_default_handlers.cpp src/cxa_exception.cpp src/cxa_exception_storage.cpp src/cxa_guard.cpp src/cxa_handlers.cpp src/cxa_personality.c

[libcxxabi] r299087 - [libc++abi] Remove unistd.h include

2017-03-30 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Thu Mar 30 11:27:09 2017 New Revision: 299087 URL: http://llvm.org/viewvc/llvm-project?rev=299087&view=rev Log: [libc++abi] Remove unistd.h include This was originally there for the _POSIX_THREADS define, to detect the presence of pthreads. That went away with the externaliz

[PATCH] D31308: [clang-tidy] new check readability-no-alternative-tokens

2017-03-30 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/OperatorsRepresentationCheck.cpp:34 + + if (const auto *B = Result.Nodes.getNodeAs("binary")) { +switch (B->getOpcode()) { aaron.ballman wrote: > mgehre wrote: > > aaron.ballman wrote: > > > al

[PATCH] D31501: [RFC] Integrate clang -cc1as diagnostics into DiagnosticsEngine

2017-03-30 Thread Sanne Wouda via Phabricator via cfe-commits
sanwou01 created this revision. Herald added a subscriber: aemerson. Add initial support for printing assembly diagnostics using the DiagnosticsEngine infrastructure. Add support for -w (no warnings) and -Werror (warnings are errors) and print a summary with the number of errors and warnings. -fc

[PATCH] D29599: Clang Changes for alloc_align

2017-03-30 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 93491. erichkeane marked 3 inline comments as done. erichkeane added a comment. Thanks for the feedback John! https://reviews.llvm.org/D29599 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Sema/Sema.h lib/CodeGen

[PATCH] D31406: [clang-tidy] Reuse FileID in getLocation

2017-03-30 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Thank you for finding out the root cause here! Comment at: clang-tidy/ClangTidy.cpp:241 -const FileEntry *File = SourceMgr.getFileManager().getFile(FilePath);

[PATCH] D31168: Set FMF for -ffp-contract=fast

2017-03-30 Thread Adam Nemet via Phabricator via cfe-commits
anemet updated this revision to Diff 93487. anemet added a comment. Also add 'contract' for CompoundAssignOperator (+= and -=). For l-values, these don't go through the expr-visitor in ScalarExprEmitter::Visit. This again piggybacks on how debug-locations are added. https://reviews.llvm.org/D3

[PATCH] D19979: [analyzer] ScopeContext - initial implementation

2017-03-30 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. What is the status of this? Aleksei, could you upload a new patch with the context available? (And also with a testcase added for jumps/gotos and VLA.) You modified the malloc checker but I did not see a test for that. https://reviews.llvm.org/D19979 __

[PATCH] D31496: Make -defsym a driver option

2017-03-30 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:1882 +TakeNextArg = true; } } else { salari01 wrote: > rogfer01 wrote: > > I wonder if you should `break;` here if validation fails like the original > > co

[PATCH] D31496: Make -defsym a driver option

2017-03-30 Thread Salman Arif via Phabricator via cfe-commits
salari01 added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:1882 +TakeNextArg = true; } } else { rogfer01 wrote: > I wonder if you should `break;` here if validation fails like the original > code did? The reason for

[PATCH] D31496: Make -defsym a driver option

2017-03-30 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:1882 +TakeNextArg = true; } } else { I wonder if you should `break;` here if validation fails like the original code did? https://reviews.llvm.org/D31496

[PATCH] D31404: [OpenCL] Allow alloca return non-zero private pointer

2017-03-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: include/clang/AST/Type.h:336-342 + /// Get the address space value used in diagnostics. + unsigned getAddressSpacePrintValue() const { +unsigned AS = getAddressSpace(); +if (AS >= LangAS:

  1   2   >