Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-11 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Hi, Thank you for working on this! Here are several comments from a **partial** review. Can you talk a bit about how do you envision to generalize this to copy and paste detection, where the pasted code is only partially modified? Do you think this could be generali

Re: [PATCH] D22091: [clang-rename] exit code-related bugfix and code cleanup

2016-07-11 Thread Kirill Bobyrev via cfe-commits
omtcyf0 updated this revision to Diff 63463. omtcyf0 added a comment. Add new test, which ensures clang-rename failure if new name is not passed. http://reviews.llvm.org/D22091 Files: clang-rename/RenamingAction.cpp clang-rename/USRLocFinder.cpp clang-rename/USRLocFinder.h clang-rename/

Re: [PATCH] D21472: [clang-tidy] readability-identifier-naming - support for other case types

2016-07-11 Thread James Reynolds via cfe-commits
JamesReynolds updated the summary for this revision. JamesReynolds updated this revision to Diff 63462. JamesReynolds added a comment. > You mean Upper_Separated and upper_Separated_Back? ;) Actually, these names > are not particularly clear. I've managed to find "Camel_Snake_Case" > used for e

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-11 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/cppcoreguidelines/SlicingCheck.cpp:48 @@ +47,3 @@ + + // Assignement slicing: "a = b;" and "a = std::move(b);" variants. + const auto SlicesObjectInAssignment = Looks like you are missing some cases here, like

[clang-tools-extra] r275051 - [clang-tidy] Pass absolute path to OptionsProvider::getOptions/getRawOptions.

2016-07-11 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Jul 11 02:47:04 2016 New Revision: 275051 URL: http://llvm.org/viewvc/llvm-project?rev=275051&view=rev Log: [clang-tidy] Pass absolute path to OptionsProvider::getOptions/getRawOptions. Summary: Although there is no guarantee of getOptions/getRawOptions receiving an absol

Re: [PATCH] D22154: [clang-tidy] Pass absolute path to OptionsProvider::getOptions/getRawOptions.

2016-07-11 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL275051: [clang-tidy] Pass absolute path to OptionsProvider::getOptions/getRawOptions. (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D22154?vs=63282&id=63469#toc Repository: r

Re: [PATCH] D22102: [clang-rename] extend testset

2016-07-11 Thread Kirill Bobyrev via cfe-commits
omtcyf0 updated this revision to Diff 63470. omtcyf0 added a comment. add XFAIL test with virtual function renaming http://reviews.llvm.org/D22102 Files: test/clang-rename/FunctionMacro.cpp test/clang-rename/Namespace.cpp test/clang-rename/TemplateTypename.cpp test/clang-rename/Variable

Re: [PATCH] D21834: Implementing 'If statement with Initializer'

2016-07-11 Thread Anton Bikineev via cfe-commits
AntonBikineev updated the summary for this revision. AntonBikineev updated this revision to Diff 63471. AntonBikineev added a comment. @rsmith, Richard, again, thank you for guiding. I've addressed your comments. http://reviews.llvm.org/D21834 Files: include/clang/AST/Stmt.h include/clang/B

Re: [PATCH] D21834: Implementing 'If statement with Initializer'

2016-07-11 Thread Anton Bikineev via cfe-commits
AntonBikineev updated this revision to Diff 63472. http://reviews.llvm.org/D21834 Files: include/clang/AST/Stmt.h include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/AST/ASTImporter.cpp lib/AST/ExprConstant.cpp lib/AST/Stmt.cpp lib/Analysis/BodyFarm.cpp lib/An

Re: [PATCH] D22190: cppcoreguidelines-pro-bounds-constant-array-index: crash for value dependent index in c++03 mode

2016-07-11 Thread Matthias Gehre via cfe-commits
mgehre added a comment. Even if we change isIntegerConstantExpr() to return true instead of asserting, we still need this fix to the check. Because we call isIntegerConstantExpr() to find out if we can possibly calculate the (constant) value of the index expression. If it is value dependent, we

Re: [PATCH] D21834: Implementing 'If statement with Initializer'

2016-07-11 Thread Anton Bikineev via cfe-commits
AntonBikineev updated this revision to Diff 63473. AntonBikineev added a comment. removed a leftover from parser/cxx1z-init-stmt.cpp test http://reviews.llvm.org/D21834 Files: include/clang/AST/Stmt.h include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/AST/ASTImport

Re: [PATCH] D21834: Implementing 'If statement with Initializer'

2016-07-11 Thread Anton Bikineev via cfe-commits
AntonBikineev updated this revision to Diff 63474. http://reviews.llvm.org/D21834 Files: include/clang/AST/Stmt.h include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/AST/ASTImporter.cpp lib/AST/ExprConstant.cpp lib/AST/Stmt.cpp lib/Analysis/BodyFarm.cpp lib/An

Re: [PATCH] D21834: Implementing 'If statement with Initializer'

2016-07-11 Thread Anton Bikineev via cfe-commits
AntonBikineev updated this revision to Diff 63475. AntonBikineev added a comment. Moved stars to the right side of declarations http://reviews.llvm.org/D21834 Files: include/clang/AST/Stmt.h include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/AST/ASTImporter.cpp l

Re: [PATCH] D21744: [OpenCL] Fix code generation of kernel pipe parameters.

2016-07-11 Thread Xiuli PAN via cfe-commits
pxli168 accepted this revision. pxli168 added a comment. Sorry for the late reply, I was busy with some backend problem. LGTM, thanks for the fix! http://reviews.llvm.org/D21744 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-11 Thread Clement Courbet via cfe-commits
courbet added a comment. Thanks for the comments. Comment at: clang-tidy/cppcoreguidelines/SlicingCheck.cpp:48 @@ +47,3 @@ + + // Assignement slicing: "a = b;" and "a = std::move(b);" variants. + const auto SlicesObjectInAssignment = hokein wrote: > Looks like

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-11 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 63477. courbet marked 4 inline comments as done. courbet added a comment. - Add a test case following comments. - Add more comments in tests. - Add examples in doc. - Simplify code a bit. http://reviews.llvm.org/D21992 Files: clang-tidy/cppcoreguidelines/

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-11 Thread Clement Courbet via cfe-commits
courbet added a comment. I've ran this check on llvm. There are 0 instances of virtual function slicing (which is not surprising since these usually result in actual bugs) and 71 instances of member varaible slicing: - 'FullSourceLoc' to 'SourceLocation': 57 - 'APSInt' to 'APInt': 5 - 'DeducedT

Re: [PATCH] D22176: [OpenMP] add more tests for 'distribute simd' pragma

2016-07-11 Thread Alexey Bataev via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG http://reviews.llvm.org/D22176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D22169: [OpenMP] add more tests for 'distribute parallel for simd' pragma

2016-07-11 Thread Alexey Bataev via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG http://reviews.llvm.org/D22169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D22096: [OpenMP] Sema and parsing for 'target parallel for simd' pragma

2016-07-11 Thread Alexey Bataev via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG http://reviews.llvm.org/D22096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D21904: [OpenMP] Initial implementation of parse+sema for clause use_device_ptr of 'target data'

2016-07-11 Thread Alexey Bataev via cfe-commits
ABataev added a comment. No positive tests for the construct Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8333 @@ -8332,1 +8332,3 @@ "expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'">; +def err_omp_usedeviceptr_not_a_poi

Re: [PATCH] D22075: [OpenMP] Fix incorrect diagnostics in map clause

2016-07-11 Thread Alexey Bataev via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:10667-10668 @@ +10666,4 @@ + if (Type.isNull() || Type->isAnyPointerType() || + CheckArrayExpressionDoesNotReferToWholeSize(SemaRef, + SI->getAssociatedExpression(),Type)) +

Re: [PATCH] D22102: [clang-rename] extend testset

2016-07-11 Thread Manuel Klimek via cfe-commits
klimek added a comment. Add // FIXME: to tests that do not work yet. I'd personally not check in the XFAIL tests for now, and just add them when you implement the missing functionality; the problem with XFAIL here is that (due to the offsets involved) they can easily switch into a mode where t

[PATCH] D22212: [X86][AVX512] Constants for integer comparison predicates

2016-07-11 Thread Asaf Badouh via cfe-commits
AsafBadouh created this revision. AsafBadouh added reviewers: guyblank, m_zuckerman, delena. AsafBadouh added a subscriber: cfe-commits. AsafBadouh set the repository for this revision to rL LLVM. Repository: rL LLVM http://reviews.llvm.org/D22212 Files: ../tunkClang/tools/clang/lib/Headers/

Re: [PATCH] D21279: Fix some issues in clang-format's AlignConsecutive modes

2016-07-11 Thread Ben Harper via cfe-commits
bmharper added a comment. kaPING! Repository: rL LLVM http://reviews.llvm.org/D21279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21602: Changes related to tooling::applyAllReplacements interface change in D21601.

2016-07-11 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 63504. ioeric added a comment. - Merged with origin/master. Resolved a few conflicts. http://reviews.llvm.org/D21602 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixer.h include-fixer/tool/ClangIncludeFixer.cpp unittests/clang-tidy/Clan

r275061 - [OpenCL] Improved diagnostics of OpenCL types.

2016-07-11 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Mon Jul 11 08:46:02 2016 New Revision: 275061 URL: http://llvm.org/viewvc/llvm-project?rev=275061&view=rev Log: [OpenCL] Improved diagnostics of OpenCL types. - Changes diagnostics for Blocks to be implicitly const qualified OpenCL v2.0 s6.12.5. - Added and unified diagno

r275062 - Make tooling::applyAllReplacements return llvm::Expected instead of empty string to indicate potential error.

2016-07-11 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon Jul 11 08:53:12 2016 New Revision: 275062 URL: http://llvm.org/viewvc/llvm-project?rev=275062&view=rev Log: Make tooling::applyAllReplacements return llvm::Expected instead of empty string to indicate potential error. Summary: return llvm::Expected<> to carry error statu

[clang-tools-extra] r275063 - Changes related to tooling::applyAllReplacements interface change in D21601.

2016-07-11 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon Jul 11 08:53:21 2016 New Revision: 275063 URL: http://llvm.org/viewvc/llvm-project?rev=275063&view=rev Log: Changes related to tooling::applyAllReplacements interface change in D21601. Summary: this patch contains changes related to the interface change from http://review

Re: [PATCH] D21601: Make tooling::applyAllReplacements return llvm::Expected instead of empty string to indicate potential error.

2016-07-11 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL275062: Make tooling::applyAllReplacements return llvm::Expected instead of… (authored by ioeric). Changed prior to commit: http://reviews.llvm.org/D21601?vs=61823&id=63505#toc Repository: rL LLVM h

Re: [PATCH] D21602: Changes related to tooling::applyAllReplacements interface change in D21601.

2016-07-11 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL275063: Changes related to tooling::applyAllReplacements interface change in D21601. (authored by ioeric). Changed prior to commit: http://reviews.llvm.org/D21602?vs=63504&id=63506#toc Repository: rL

Re: r274991 - [clang-cl] Add support for /Zd

2016-07-11 Thread Nico Weber via cfe-commits
This breaks existing users of -gline-tables-only. What's the motivation for this change? On Sat, Jul 9, 2016 at 5:49 PM, David Majnemer via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: majnemer > Date: Sat Jul 9 16:49:16 2016 > New Revision: 274991 > > URL: http://llvm.org/viewvc/l

Re: r274991 - [clang-cl] Add support for /Zd

2016-07-11 Thread Nico Weber via cfe-commits
VS2013's cl.exe doesn't understand /Zd, 2015's doesn't either. This means people who want to ask clang-cl for line tables only will have to add this flag in some if(is_clang) block in their build file anyways. What's the advantage of giving this flag a spelling that's different from both cl and cla

Re: [PATCH] D22170: [OpenCL] Fixes opencl.cl testcase issues and cl-strict-aliasing only allowed with cl-std=CL

2016-07-11 Thread Yaxun Liu via cfe-commits
yaxunl added inline comments. Comment at: test/Frontend/opencl-blocks.cl:9 @@ -8,1 +8,3 @@ // RUN: %clang_cc1 %s -triple amdgcn--amdhsa -x c -std=c99 -verify -fsyntax-only +// RUN: %clang_cc1 -cl-std=CL1.1 -cl-strict-aliasing %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID-OPE

[PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-11 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: sbenza. mboehme added a subscriber: cfe-commits. The check emits a warning if std::move() is applied to a forwarding reference, i.e. an rvalue reference of a function template argument type. If a developer is unaware of the special rules f

Re: [PATCH] D22129: [clang-rename] add documentation

2016-07-11 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: docs/clang-rename.rst:17 @@ +16,3 @@ + +The tool development is in very early stage, so you might encounter bugs and +crashes. Submitting reports with information about how to reproduce the issue maybe 'is in a very early

[PATCH] D22221: Decide whether to enable plugin tests based on cmake variables

2016-07-11 Thread John Brawn via cfe-commits
john.brawn created this revision. john.brawn added reviewers: ehsan, reames, chapuni, Ilod. john.brawn added a subscriber: cfe-commits. john.brawn set the repository for this revision to rL LLVM. Clang plugins work when either LLVM_ENABLE_PLUGINS or LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is ON, so enabl

Re: [PATCH] D21385: Adjust Registry interface to not require plugins to export a registry

2016-07-11 Thread John Brawn via cfe-commits
john.brawn added a comment. > Plugins tests are still disabled by lit.cfg I think, as it only checks for > enable_shared, which is disabled. I suppose we could wait for both this and > the SampleAnalyzerPlugin to be patched before enabling plugins tests if we > have LLVM_EXPORT_SYMBOLS_FOR_PLUG

Re: r274991 - [clang-cl] Add support for /Zd

2016-07-11 Thread David Majnemer via cfe-commits
On Mon, Jul 11, 2016 at 7:18 AM, Nico Weber wrote: > VS2013's cl.exe doesn't understand /Zd, 2015's doesn't either. This means > people who want to ask clang-cl for line tables only will have to add this > flag in some if(is_clang) block in their build file anyways. What's the > advantage of givi

Re: [PATCH] D21823: [Driver] Add flags for enabling both types of PGO Instrumentation

2016-07-11 Thread Diego Novillo via cfe-commits
On Sat, Jul 9, 2016 at 7:39 PM Sean Silva wrote: > silvas added a comment. > > In http://reviews.llvm.org/D21823#479418, @davidxl wrote: > > > I should have brought it up earlier, but I forgot.I think a better > (and simpler) proposal is to make -fprofile-generate and -fprofile-use turn > on

Re: r274991 - [clang-cl] Add support for /Zd

2016-07-11 Thread Nico Weber via cfe-commits
On Mon, Jul 11, 2016 at 11:36 AM, David Majnemer wrote: > > > On Mon, Jul 11, 2016 at 7:18 AM, Nico Weber wrote: > >> VS2013's cl.exe doesn't understand /Zd, 2015's doesn't either. This means >> people who want to ask clang-cl for line tables only will have to add this >> flag in some if(is_clan

Re: r274991 - [clang-cl] Add support for /Zd

2016-07-11 Thread David Majnemer via cfe-commits
On Mon, Jul 11, 2016 at 8:42 AM, Nico Weber wrote: > On Mon, Jul 11, 2016 at 11:36 AM, David Majnemer > wrote: > >> >> >> On Mon, Jul 11, 2016 at 7:18 AM, Nico Weber wrote: >> >>> VS2013's cl.exe doesn't understand /Zd, 2015's doesn't either. This >>> means people who want to ask clang-cl for l

Re: r274991 - [clang-cl] Add support for /Zd

2016-07-11 Thread Nico Weber via cfe-commits
On Mon, Jul 11, 2016 at 11:51 AM, David Majnemer wrote: > > > On Mon, Jul 11, 2016 at 8:42 AM, Nico Weber wrote: > >> On Mon, Jul 11, 2016 at 11:36 AM, David Majnemer < >> david.majne...@gmail.com> wrote: >> >>> >>> >>> On Mon, Jul 11, 2016 at 7:18 AM, Nico Weber wrote: >>> VS2013's cl.exe

[PATCH] D22222: [ASTMatchers] isSignedInteger() and isUnsignedInteger()

2016-07-11 Thread Clement Courbet via cfe-commits
courbet created this revision. courbet added a reviewer: aaron.ballman. courbet added a subscriber: cfe-commits. Herald added a subscriber: klimek. I could not find a way to match signedness of integers in the AST, so I'm adding these two matchers. http://reviews.llvm.org/D2 Files: includ

Re: r274991 - [clang-cl] Add support for /Zd

2016-07-11 Thread David Majnemer via cfe-commits
On Mon, Jul 11, 2016 at 9:03 AM, Nico Weber wrote: > On Mon, Jul 11, 2016 at 11:51 AM, David Majnemer > wrote: > >> >> >> On Mon, Jul 11, 2016 at 8:42 AM, Nico Weber wrote: >> >>> On Mon, Jul 11, 2016 at 11:36 AM, David Majnemer < >>> david.majne...@gmail.com> wrote: >>> On Mon,

Re: [PATCH] D22170: [OpenCL] Fixes opencl.cl testcase issues and cl-strict-aliasing only allowed with cl-std=CL

2016-07-11 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:1681 @@ -1692,1 +1680,3 @@ + // -cl-strict-aliasing needs to emit diagnostic in the case where CL > 1.0. + // This option should be deprecated for CL > 1.0 because Was this code m

Re: [PATCH] D22170: [OpenCL] Fixes opencl.cl testcase issues and cl-strict-aliasing only allowed with cl-std=CL

2016-07-11 Thread Yaxun Liu via cfe-commits
yaxunl added inline comments. Comment at: test/Frontend/opencl-blocks.cl:9 @@ -8,1 +8,3 @@ // RUN: %clang_cc1 %s -triple amdgcn--amdhsa -x c -std=c99 -verify -fsyntax-only +// RUN: %clang_cc1 -cl-std=CL1.1 -cl-strict-aliasing %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID-OPE

RE: r275040 - [CodeGen] Treat imported static local variables as declarations

2016-07-11 Thread Robinson, Paul via cfe-commits
This changes the IR but not the debug-info metadata? --paulr > -Original Message- > From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf Of > David Majnemer via cfe-commits > Sent: Sunday, July 10, 2016 9:28 PM > To: cfe-commits@lists.llvm.org > Subject: r275040 - [CodeG

Re: [PATCH] D21904: [OpenMP] Initial implementation of parse+sema for clause use_device_ptr of 'target data'

2016-07-11 Thread Carlo Bertolli via cfe-commits
carlo.bertolli marked an inline comment as done. carlo.bertolli added a comment. > No positive tests for the construct Do you mean in the regression test? I thought I covered all negative and positive cases, but please let me know if I missed anything. Comment at: include/cla

Re: [PATCH] D21904: [OpenMP] Initial implementation of parse+sema for clause use_device_ptr of 'target data'

2016-07-11 Thread Carlo Bertolli via cfe-commits
carlo.bertolli updated this revision to Diff 63527. carlo.bertolli added a comment. [OpenMP] Apply comments: remove creation of private variable and update regression tests to include references to pointers. Repository: rL LLVM http://reviews.llvm.org/D21904 Files: include/clang/AST/OpenM

Re: r275040 - [CodeGen] Treat imported static local variables as declarations

2016-07-11 Thread David Majnemer via cfe-commits
On Mon, Jul 11, 2016 at 9:48 AM, Robinson, Paul wrote: > This changes the IR but not the debug-info metadata? > --paulr > The net effect is that the debug-info metadata is not generated for such static members. > > > -Original Message- > > From: cfe-commits [mailto:cfe-commits-boun...@

Re: [PATCH] D22222: [ASTMatchers] isSignedInteger() and isUnsignedInteger()

2016-07-11 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Please regenerate the public docs (using dump_ast_matchers.py). Otherwise, LGTM! http://reviews.llvm.org/D2 ___ cfe-commits mai

r275076 - [man page] Document -gline-tables-only in the clang man page.

2016-07-11 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Mon Jul 11 12:03:16 2016 New Revision: 275076 URL: http://llvm.org/viewvc/llvm-project?rev=275076&view=rev Log: [man page] Document -gline-tables-only in the clang man page. Modified: cfe/trunk/docs/CommandGuide/clang.rst Modified: cfe/trunk/docs/CommandGuide/clang.rst U

r275075 - [man page] Fix two sphinx build errors.

2016-07-11 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Mon Jul 11 12:03:13 2016 New Revision: 275075 URL: http://llvm.org/viewvc/llvm-project?rev=275075&view=rev Log: [man page] Fix two sphinx build errors. These options were referenced by other paragraphs, but never specified. Modified: cfe/trunk/docs/CommandGuide/clang.rst

Re: [PATCH] D22170: [OpenCL] Fixes opencl.cl testcase issues and cl-strict-aliasing only allowed with cl-std=CL

2016-07-11 Thread Aaron En Ye Shi via cfe-commits
ashi1 marked 4 inline comments as done. Comment at: lib/Frontend/CompilerInvocation.cpp:1681 @@ -1692,1 +1680,3 @@ + // -cl-strict-aliasing needs to emit diagnostic in the case where CL > 1.0. + // This option should be deprecated for CL > 1.0 because Anastasi

r275078 - [Sema] Don't artificially forbid BuiltinTemplateDecls in CheckTemplateArgument

2016-07-11 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Jul 11 12:09:56 2016 New Revision: 275078 URL: http://llvm.org/viewvc/llvm-project?rev=275078&view=rev Log: [Sema] Don't artificially forbid BuiltinTemplateDecls in CheckTemplateArgument After thinking about it, we don't really need to forbid BuiltinTemplateDecls explic

Re: [PATCH] D21567: [OpenCL] Generate struct type for sampler_t and function call for the initializer

2016-07-11 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7868 @@ +7867,3 @@ +def warn_sampler_initializer_invalid_bits : Warning< + "Sampler initializer has invalid %0 bits">, InGroup; +def err_sampler_initializer_not_constant : Error< -

Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-11 Thread Artem Dergachev via cfe-commits
NoQ added a comment. Your code is well-written and easy to understand, and makes me want to use it on my code! Added some minor comments, and there seems to be a small logic error in the compound statement hasher. Not sure if that was already explained in detail, but i seem to agree that the o

Re: r274246 - [codeview] Emit qualified display names if -gline-tables-only is on

2016-07-11 Thread David Blaikie via cfe-commits
On Fri, Jul 8, 2016 at 1:04 PM, Nico Weber wrote: > On Fri, Jul 8, 2016 at 3:57 PM, David Blaikie via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> >> >> On Thu, Jul 7, 2016 at 4:10 PM, Reid Kleckner wrote: >> >>> On Thu, Jul 7, 2016 at 3:45 PM, David Blaikie >>> wrote: >>> Yeah

[PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars

2016-07-11 Thread Vedant Kumar via cfe-commits
vsk created this revision. vsk added reviewers: rsmith, samsonov. vsk added a subscriber: cfe-commits. Ubsan does not emit bounds checks for flexible array members, e.g:

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-11 Thread Matthias Gehre via cfe-commits
mgehre added a subscriber: mgehre. mgehre added a comment. Nice check. This should be mentioned in docs/ReleaseNotes.rst http://reviews.llvm.org/D0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

Re: [PATCH] D22170: [OpenCL] Fixes opencl.cl testcase issues and cl-strict-aliasing only allowed with cl-std=CL

2016-07-11 Thread Yaxun Liu via cfe-commits
yaxunl added inline comments. Comment at: test/Frontend/opencl-blocks.cl:9 @@ -8,1 +8,3 @@ // RUN: %clang_cc1 %s -triple amdgcn--amdhsa -x c -std=c99 -verify -fsyntax-only +// RUN: %clang_cc1 -cl-std=CL1.1 -cl-strict-aliasing %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID-OPE

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-11 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). http://reviews.llvm.org/D0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

Re: [PATCH] D21567: [OpenCL] Generate struct type for sampler_t and function call for the initializer

2016-07-11 Thread Yaxun Liu via cfe-commits
yaxunl marked 20 inline comments as done. Comment at: lib/CodeGen/CGExprConstant.cpp:694 @@ +693,3 @@ +case CK_IntToOCLSampler: + llvm_unreachable("global sampler variables are not generated"); + Anastasia wrote: > Does this only apply to global variable

Re: [PATCH] D22170: [OpenCL] Fixes opencl.cl testcase issues and cl-strict-aliasing only allowed with cl-std=CL

2016-07-11 Thread Aaron En Ye Shi via cfe-commits
ashi1 updated this revision to Diff 63539. ashi1 marked 2 inline comments as done. ashi1 added a comment. Moved cl-strict-aliasing testing to a new file cl-strict-aliasing.cl Repository: rL LLVM http://reviews.llvm.org/D22170 Files: lib/Frontend/CompilerInvocation.cpp test/Driver/opencl.

Re: [PATCH] D21453: Add support for attribute "overallocated"

2016-07-11 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/Decl.h:3249 @@ -3248,1 +3248,3 @@ + /// This is true if this struct ends with an array marked 'flexible_array'. + bool HasFlexibleArrayAttr : 1; ahatanak wrote: > Probably it can be looked up a

Re: [PATCH] D22208: clang-tidy] Fixes to modernize-use-emplace

2016-07-11 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:21 @@ +20,3 @@ +llvm::Optional> +getHasAnyName(const std::vector &names) { + llvm::Optional> hasMatcher; Should be `Names` instead. Comment at: clang-tidy/

Re: [PATCH] D22190: cppcoreguidelines-pro-bounds-constant-array-index: crash for value dependent index in c++03 mode

2016-07-11 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In http://reviews.llvm.org/D22190#479921, @mgehre wrote: > Even if we change isIntegerConstantExpr() to return true instead of > asserting, we still need this fix to the check. Because > we call isIntegerConstantExpr() to find out if we can possibly calculate the

Re: [PATCH] D20602: Add .rgba syntax extension to ext_vector_type types

2016-07-11 Thread Pirama Arumuga Nainar via cfe-commits
pirama added a comment. Ping... http://reviews.llvm.org/D20602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-11 Thread Piotr Padlewski via cfe-commits
Prazek added a subscriber: Prazek. Prazek added a comment. Very usefull check! I don't have enough time right now to check everything, so better wait for review of Alexfh or someone else. I just wanted to leave some thoughts. Comment at: clang-tidy/misc/MoveForwardingReferenceC

Re: [PATCH] D22171: [ObjC Availability] Implement parser support for Objective-C's @available

2016-07-11 Thread Manman Ren via cfe-commits
manmanren added a comment. Thanks for working on this, Erik. Manman Comment at: include/clang/AST/Availability.h:32 @@ +31,3 @@ +class AvailabilitySpec { + VersionTuple Version; + StringRef Platform; Can you put a description for "Version"? i.e if it represen

RE: r275040 - [CodeGen] Treat imported static local variables as declarations

2016-07-11 Thread Robinson, Paul via cfe-commits
It was not particularly obvious that by "static local variables" you actually meant "template static data members." Now I can tell that this is not addressing what I was asking about in the comment on r274986. --paulr From: David Majnemer [mailto:david.majne...@gmail.com] Sent: Monday, July 11,

Re: [PATCH] D19934: [NFC] Reorder fields of VersionTuple to reduce size

2016-07-11 Thread Manman Ren via cfe-commits
manmanren accepted this revision. manmanren added a comment. This revision is now accepted and ready to land. LGTM. Manman http://reviews.llvm.org/D19934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

Re: [PATCH] D19679: Method pool in modules: sync up out of date selectors before writing the module

2016-07-11 Thread Manman Ren via cfe-commits
manmanren closed this revision. manmanren marked an inline comment as done. manmanren added a comment. In r268091. http://reviews.llvm.org/D19679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

Re: [PATCH] D20786: Fix undefined behavior in __tree

2016-07-11 Thread Eric Fiselier via cfe-commits
EricWF added a reviewer: howard.hinnant. EricWF added a subscriber: howard.hinnant. EricWF added a comment. Adding Howard to the reviewers. @howard.hinnant Feel free to take a look if your interested. @mclow.lists Any comments? http://reviews.llvm.org/D20786

Re: r274991 - [clang-cl] Add support for /Zd

2016-07-11 Thread Nico Weber via cfe-commits
On Mon, Jul 11, 2016 at 12:19 PM, David Majnemer wrote: > > > On Mon, Jul 11, 2016 at 9:03 AM, Nico Weber wrote: > >> On Mon, Jul 11, 2016 at 11:51 AM, David Majnemer < >> david.majne...@gmail.com> wrote: >> >>> >>> >>> On Mon, Jul 11, 2016 at 8:42 AM, Nico Weber wrote: >>> On Mon, Jul 11,

Re: r275040 - [CodeGen] Treat imported static local variables as declarations

2016-07-11 Thread David Majnemer via cfe-commits
On Mon, Jul 11, 2016 at 11:45 AM, Robinson, Paul wrote: > It was not particularly obvious that by "static local variables" you > actually meant "template static data members." > > Now I can tell that this is not addressing what I was asking about in the > comment on r274986. > I'm not sure I und

[libcxx] r275089 - Hide some internal symbols for memory resource.

2016-07-11 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Jul 11 14:22:09 2016 New Revision: 275089 URL: http://llvm.org/viewvc/llvm-project?rev=275089&view=rev Log: Hide some internal symbols for memory resource. Modified: libcxx/trunk/src/experimental/memory_resource.cpp Modified: libcxx/trunk/src/experimental/memory_reso

Re: r274991 - [clang-cl] Add support for /Zd

2016-07-11 Thread David Majnemer via cfe-commits
On Mon, Jul 11, 2016 at 12:18 PM, Nico Weber wrote: > On Mon, Jul 11, 2016 at 12:19 PM, David Majnemer > wrote: > >> >> >> On Mon, Jul 11, 2016 at 9:03 AM, Nico Weber wrote: >> >>> On Mon, Jul 11, 2016 at 11:51 AM, David Majnemer < >>> david.majne...@gmail.com> wrote: >>> On Mon,

Re: [PATCH] D21567: [OpenCL] Generate struct type for sampler_t and function call for the initializer

2016-07-11 Thread Yaxun Liu via cfe-commits
yaxunl updated this revision to Diff 63556. yaxunl marked 3 inline comments as done. yaxunl added a comment. Revised by Anastia's comments. Disabled warning for sampler enum value by default. http://reviews.llvm.org/D21567 Files: include/clang/AST/OperationKinds.def include/clang/Basic/Dia

[libcxx] r275094 - Allow is_swappable to SFINAE on deleted/ambiguous swap functions

2016-07-11 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Jul 11 14:57:13 2016 New Revision: 275094 URL: http://llvm.org/viewvc/llvm-project?rev=275094&view=rev Log: Allow is_swappable to SFINAE on deleted/ambiguous swap functions Modified: libcxx/trunk/include/type_traits libcxx/trunk/test/std/utilities/meta/meta.unary

Re: r274246 - [codeview] Emit qualified display names if -gline-tables-only is on

2016-07-11 Thread Reid Kleckner via cfe-commits
On Mon, Jul 11, 2016 at 10:35 AM, David Blaikie wrote: > > I believe so, but don't have specific numbers. Alexey made this choice > when it was originally implemented & I believe had the data back then. > I don't think we made an explicit choice to use short names. gdb and addr2line just give you

r275095 - [NFC] Reorder fields of VersionTuple to reduce size

2016-07-11 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Mon Jul 11 15:00:48 2016 New Revision: 275095 URL: http://llvm.org/viewvc/llvm-project?rev=275095&view=rev Log: [NFC] Reorder fields of VersionTuple to reduce size Differential revision: http://reviews.llvm.org/D19934 Modified: cfe/trunk/include/clang/Basic/VersionTuple.h

Re: [PATCH] D19934: [NFC] Reorder fields of VersionTuple to reduce size

2016-07-11 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL275095: [NFC] Reorder fields of VersionTuple to reduce size (authored by epilk). Changed prior to commit: http://reviews.llvm.org/D19934?vs=56171&id=63560#toc Repository: rL LLVM http://reviews.llvm

[PATCH] D22237: clang-rename: fix renaming member functions

2016-07-11 Thread Miklos Vajna via cfe-commits
vmiklos created this revision. vmiklos added a reviewer: klimek. vmiklos added a subscriber: cfe-commits. Testcase by Kirill Bobyrev. http://reviews.llvm.org/D22237 Files: clang-rename/USRLocFinder.cpp test/clang-rename/VirtualFunction.cpp Index: test/clang-rename/VirtualFunction.cpp ==

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-07-11 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:1657 @@ +1656,3 @@ + TargetSpecificAttr { + let Spellings = [GNU<"no_caller_saved_registers">]; + let Subjects = SubjectList<[FunctionLike], WarnDiag, "ExpectedFunction

Re: [PATCH] D21567: [OpenCL] Generate struct type for sampler_t and function call for the initializer

2016-07-11 Thread Yaxun Liu via cfe-commits
yaxunl updated this revision to Diff 63571. yaxunl added a comment. Added test for invalid sampler values. http://reviews.llvm.org/D21567 Files: include/clang/AST/OperationKinds.def include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/AST/ASTContext.cpp

Re: [PATCH] D22208: clang-tidy] Fixes to modernize-use-emplace

2016-07-11 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:21 @@ +20,3 @@ +llvm::Optional> +getHasAnyName(const std::vector &names) { + llvm::Optional> hasMatcher; aaron.ballman wrote: > aaron.ballman wrote: > > Should be `Names` instead.

[libcxx] r275105 - Always use the allocator to construct/destruct elements of a deque/vector. Fixes PR#28412. Thanks to Jonathan Wakely for the report.

2016-07-11 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Jul 11 16:38:08 2016 New Revision: 275105 URL: http://llvm.org/viewvc/llvm-project?rev=275105&view=rev Log: Always use the allocator to construct/destruct elements of a deque/vector. Fixes PR#28412. Thanks to Jonathan Wakely for the report. Modified: libcxx/trunk/i

[libcxx] r275114 - Don't compute modulus of hash if it is smaller than the bucket count.

2016-07-11 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Jul 11 17:02:02 2016 New Revision: 275114 URL: http://llvm.org/viewvc/llvm-project?rev=275114&view=rev Log: Don't compute modulus of hash if it is smaller than the bucket count. This cleans up a previous optimization attempt in hash, and results in additional performance

Re: [PATCH] D21453: Add support for attribute "overallocated"

2016-07-11 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 63596. ahatanak added a comment. Change diagnostic messages. http://reviews.llvm.org/D21453 Files: include/clang/AST/Decl.h include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/

Re: [PATCH] D21453: Add support for attribute "overallocated"

2016-07-11 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2170 @@ +2169,3 @@ + "'flexible_array' attribute only applies to %select{" + "the last member of a struct|members of structs or classes|" + "fixed sized array members|array members that have

[PATCH] D22242: [analyzer] De-duplicate some code for discovering the origin of the symbol.

2016-07-11 Thread Artem Dergachev via cfe-commits
NoQ created this revision. NoQ added a reviewer: dcoughlin. NoQ added a subscriber: cfe-commits. Or, more importantly, tell the users that there's a way to discover the region, value of which - at some moment of time - the symbol was introduced to represent. Idea proposed by Devin Coughlin. Rig

Re: [PATCH] D22129: [clang-rename] add documentation

2016-07-11 Thread Ben Jackson via cfe-commits
puremourning added a subscriber: puremourning. puremourning added a comment. Couple of drive-by comments. Thanks for doing this. Comment at: docs/clang-rename.rst:45 @@ +44,3 @@ + +The tool is currently supporting renaming actions inside single Translation Unit +only. It is pla

Re: r274246 - [codeview] Emit qualified display names if -gline-tables-only is on

2016-07-11 Thread David Blaikie via cfe-commits
On Mon, Jul 11, 2016 at 1:05 PM, Reid Kleckner wrote: > On Mon, Jul 11, 2016 at 10:35 AM, David Blaikie > wrote: >> >> I believe so, but don't have specific numbers. Alexey made this choice >> when it was originally implemented & I believe had the data back then. >> > > I don't think we made an

r275115 - Prevent the creation of empty (forwarding) blocks resulting from nested ifs.

2016-07-11 Thread Wolfgang Pieb via cfe-commits
Author: wolfgangp Date: Mon Jul 11 17:22:23 2016 New Revision: 275115 URL: http://llvm.org/viewvc/llvm-project?rev=275115&view=rev Log: Prevent the creation of empty (forwarding) blocks resulting from nested ifs. Summary: Nested if statements can generate empty BBs whose terminator branches unco

Re: [PATCH] D22171: [ObjC Availability] Implement parser support for Objective-C's @available

2016-07-11 Thread Erik Pilkington via cfe-commits
erik.pilkington added inline comments. Comment at: lib/AST/StmtPrinter.cpp:502 @@ +501,3 @@ +ObjCAvailabilityCheckExpr *Node) { + OS << "@available(...)"; +} manmanren wrote: > Why not print other information of Node? Because by the time that we have the `Obj

Re: [PATCH] D22171: [ObjC Availability] Implement parser support for Objective-C's @available

2016-07-11 Thread Erik Pilkington via cfe-commits
erik.pilkington updated this revision to Diff 63603. erik.pilkington added a comment. This patch addresses most of Manman's comments. http://reviews.llvm.org/D22171 Files: include/clang-c/Index.h include/clang/AST/Availability.h include/clang/AST/ExprObjC.h include/clang/AST/RecursiveAS

r275120 - [Coverage] Move logic to skip decl's into a helper (NFC)

2016-07-11 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Jul 11 17:57:44 2016 New Revision: 275120 URL: http://llvm.org/viewvc/llvm-project?rev=275120&view=rev Log: [Coverage] Move logic to skip decl's into a helper (NFC) Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.cpp cfe/trunk/lib/CodeGen/CodeGenPGO.h Modified: cfe/t

r275121 - [Coverage] Do not map regions from system headers

2016-07-11 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Jul 11 17:57:46 2016 New Revision: 275121 URL: http://llvm.org/viewvc/llvm-project?rev=275121&view=rev Log: [Coverage] Do not map regions from system headers Do not assign source regions located within system headers file ID's, and do not construct counter mapping region

  1   2   >