Re: [PATCH] D18347: [PATCH] Fix thread_annotation negtest for thread safety.

2016-03-23 Thread James Robinson via cfe-commits
jamesr added a comment. In http://reviews.llvm.org/D18347#380792, @EricWF wrote: > And looking at the current state of the single-threaded test suite this isn't > the only test that needs this fix applied. > > http://lab.llvm.org:8011/builders/libcxx-libcxxabi-singlethreaded-x86_64-linux-debian/

Re: [PATCH] D13126: New static analyzer checker for loss of sign/precision

2016-03-23 Thread Daniel Marjamäki via cfe-commits
danielmarjamaki added inline comments. Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:84 @@ +83,3 @@ +// Can E value be greater or equal than Val? +static bool canBeGreaterEqual(CheckerContext &C, const Expr *E, + unsigned long long Val)

[clang-tools-extra] r264146 - Add check for unneeded copies of locals

2016-03-23 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Mar 23 04:33:07 2016 New Revision: 264146 URL: http://llvm.org/viewvc/llvm-project?rev=264146&view=rev Log: Add check for unneeded copies of locals Summary: Extends the UnnecessaryCopyInitialization to detect copies of local variables and parameters that are unneeded. P

Re: [PATCH] D18149: Add check for unneeded copies of locals

2016-03-23 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL264146: Add check for unneeded copies of locals (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D18149?vs=51289&id=51391#toc Repository: rL LLVM http://reviews.llvm.org/D18149

Re: [PATCH] D18149: Add check for unneeded copies of locals

2016-03-23 Thread Haojian Wu via cfe-commits
hokein added a comment. @fowles, I have commit the patch for you. Repository: rL LLVM http://reviews.llvm.org/D18149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D13126: New static analyzer checker for loss of sign/precision

2016-03-23 Thread Daniel Marjamäki via cfe-commits
danielmarjamaki added inline comments. Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:84 @@ +83,3 @@ +// Can E value be greater or equal than Val? +static bool canBeGreaterEqual(CheckerContext &C, const Expr *E, + unsigned long long Val)

r264149 - [X86] Add "x87" in x86 target feature map.

2016-03-23 Thread Andrey Turetskiy via cfe-commits
Author: aturetsk Date: Wed Mar 23 06:15:10 2016 New Revision: 264149 URL: http://llvm.org/viewvc/llvm-project?rev=264149&view=rev Log: [X86] Add "x87" in x86 target feature map. Differential Revision: http://reviews.llvm.org/D13980 Added: cfe/trunk/test/CodeGen/attr-target-x87-softfp.c (w

Re: [PATCH] D13980: Add "x87" in x86 target feature map

2016-03-23 Thread Andrey Turetskiy via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL264149: [X86] Add "x87" in x86 target feature map. (authored by aturetsk). Changed prior to commit: http://reviews.llvm.org/D13980?vs=48904&id=51398#toc Repository: rL LLVM http://reviews.llvm.org/D

Re: [PATCH] D13980: Add "x87" in x86 target feature map

2016-03-23 Thread Andrey Turetskiy via cfe-commits
aturetsk added a comment. The test Eric asked for was added. Repository: rL LLVM http://reviews.llvm.org/D13980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D13126: New static analyzer checker for loss of sign/precision

2016-03-23 Thread Artem Dergachev via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:84 @@ +83,3 @@ +// Can E value be greater or equal than Val? +static bool canBeGreaterEqual(CheckerContext &C, const Expr *E, + unsigned long long Val) { -

[PATCH] RHEL: Look in more places to find g++ headers and runtime

2016-03-23 Thread Michael Lampe via cfe-commits
Some distros with ten years of support ship an old gcc but later offer more recent versions for installation in parallel. These versions are typically not only needed for the compilation of llvm/clang, but also to properly use the clang binary that comes out. Clang already searches /usr at run

[PATCH] Proper detection and handling of RHEL and variants

2016-03-23 Thread Michael Lampe via cfe-commits
- Don't consider "/etc/lsb-release" to be Ubuntu only. - Detect SL, too. - Only add "--no-add-needed" for RHEL7 (or Fedora), not for RHEL6 (that's what the compilers shipped with RHEL do). --- a/tools/clang/lib/Driver/ToolChains.cpp 2015-09-02 04:26:13.266233474 +0200 +++ b/tools/clang/lib

Re: [PATCH] D18283: clang-format: [JS] do not break location pragma comments.

2016-03-23 Thread Martin Probst via cfe-commits
mprobst abandoned this revision. mprobst added a comment. Abandoning this in favour of the "don't break imports at all" change. http://reviews.llvm.org/D18283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D18391: Combine identical check-prefixes in Clang test/Preprocessor/arm-target-features.c

2016-03-23 Thread A. Skrobov via cfe-commits
tyomitch created this revision. tyomitch added reviewers: rengolin, t.p.northover. tyomitch added a subscriber: cfe-commits. Herald added subscribers: rengolin, aemerson. http://reviews.llvm.org/D18391 Files: test/Preprocessor/arm-target-features.c Index: test/Preprocessor/arm-target-features.

Re: [PATCH] D13126: New static analyzer checker for loss of sign/precision

2016-03-23 Thread Daniel Marjamäki via cfe-commits
danielmarjamaki added a comment. Here are some false positives I have marked... let me know if you want more... I have marked this as a FP: URL: ftp://ftp.se.debian.org/debian/pool/main/m/m17n-lib/m17n-lib_1.7.0.orig.tar.gz File: m17n-lib-1.7.0/src/mtext.c Line 1946 Code: int mtext_set_cha

Re: [PATCH] D13126: New static analyzer checker for loss of sign/precision

2016-03-23 Thread Daniel Marjamäki via cfe-commits
danielmarjamaki updated this revision to Diff 51402. danielmarjamaki added a comment. Minor fixes of review comments. - Improved comments about the checker in the source code. - Improved capitalization and punctuation in error messages. - Renamed "canBe..." functions and changed their return type

Re: [PATCH] D18035: [GCC] PR23529 Mangler part of attrbute abi_tag support

2016-03-23 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added inline comments. Comment at: lib/AST/ItaniumMangle.cpp:321-323 @@ +320,5 @@ + // track. + // + // FIXME: how to handle substituted names? They should add the tags used in + // the substitution to the list of available tags. + class AbiTagState final { ---

Re: [PATCH] D18035: [GCC] PR23529 Mangler part of attrbute abi_tag support

2016-03-23 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 51403. DmitryPolukhin marked 4 inline comments as done. DmitryPolukhin added a comment. Fixed comments. PTAL http://reviews.llvm.org/D18035 Files: lib/AST/ItaniumMangle.cpp lib/Sema/SemaDeclAttr.cpp test/CodeGenCXX/mangle-abi-tag.cpp test/Se

Re: [PATCH] D13126: New static analyzer checker for loss of sign/precision

2016-03-23 Thread Daniel Marjamäki via cfe-commits
danielmarjamaki marked 3 inline comments as done. Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:12 @@ +11,3 @@ +// +// ConversionChecker generates a subset of the warnings that are reported by +// Wconversion. It is designed to be an alternative to Wconversion. ---

Re: [PATCH] D17820: Clang Code Completion Filtering

2016-03-23 Thread Bianca-Cristina Cristescu via cfe-commits
CrisCristescu updated this revision to Diff 51404. CrisCristescu added a comment. The code_completion token now stores the information, if there is one, about the identifier that it is lexing. During the parsing there is a common entry point which is ConsumerToken where we can set the information

[PATCH] D18392: clang-cl: Don't warn about /Oy- being unused in 64-bit builds.

2016-03-23 Thread Nico Weber via cfe-commits
thakis created this revision. thakis added reviewers: hans, rnk. thakis added a subscriber: cfe-commits. http://reviews.llvm.org/D18392 Files: lib/Driver/MSVCToolChain.cpp test/Driver/cl-options.c Index: test/Driver/cl-options.c ===

Re: [PATCH] D17820: Clang Code Completion Filtering

2016-03-23 Thread Bianca-Cristina Cristescu via cfe-commits
CrisCristescu added a comment. For the filtering itself the motivation for not doing it on the client side is the following in our use case: - we do not re-filter on every key stroke, we only filter when the key is pressed i.e there is one completion point; - we have a PCH which will help with

r264155 - Combine identical check-prefixes in Clang test/Preprocessor/arm-target-features.c

2016-03-23 Thread Artyom Skrobov via cfe-commits
Author: askrobov Date: Wed Mar 23 08:32:33 2016 New Revision: 264155 URL: http://llvm.org/viewvc/llvm-project?rev=264155&view=rev Log: Combine identical check-prefixes in Clang test/Preprocessor/arm-target-features.c Reviewers: rengolin, t.p.northover Subscribers: aemerson, cfe-commits, rengoli

Re: [PATCH] D18391: Combine identical check-prefixes in Clang test/Preprocessor/arm-target-features.c

2016-03-23 Thread Renato Golin via cfe-commits
rengolin accepted this revision. rengolin added a comment. This revision is now accepted and ready to land. Nice cleaning! LGTM. Thanks! http://reviews.llvm.org/D18391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

Re: [PATCH] D18391: Combine identical check-prefixes in Clang test/Preprocessor/arm-target-features.c

2016-03-23 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL264155: Combine identical check-prefixes in Clang test/Preprocessor/arm-target… (authored by askrobov). Changed prior to commit: http://reviews.llvm.org/D18391?vs=51400&id=51410#toc Repository: rL LL

Re: [PATCH] D18347: [PATCH] Fix thread_annotation negtest for thread safety.

2016-03-23 Thread Richard Barton via cfe-commits
richard.barton.arm updated this revision to Diff 51409. richard.barton.arm added a comment. My local run with no threads works with this updated patch. http://reviews.llvm.org/D18347 Files: test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp test/libcxx/thread/thr

Re: [PATCH] D18149: Add check for unneeded copies of locals

2016-03-23 Thread Matt Kulukundis via cfe-commits
fowles added a comment. thank you! Repository: rL LLVM http://reviews.llvm.org/D18149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r264158 - Use an enum instead of hardcoded indices. NFC.

2016-03-23 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Mar 23 09:28:52 2016 New Revision: 264158 URL: http://llvm.org/viewvc/llvm-project?rev=264158&view=rev Log: Use an enum instead of hardcoded indices. NFC. Modified: cfe/trunk/lib/Sema/SemaDecl.cpp Modified: cfe/trunk/lib/Sema/SemaDecl.cpp URL: http://llvm.org/viewvc

[PATCH] D18395: -Wshadow: don't warn on ctor parameters with the same name as a field name

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh created this revision. alexfh added reviewers: rsmith, rnk. alexfh added a subscriber: cfe-commits. -Wshadow: don't warn on ctor parameters with the same name as a field name. This fixes a broad class of false positives resulting from a widely used pattern: struct A { int q; A(in

Re: [PATCH] D18395: -Wshadow: don't warn on ctor parameters with the same name as a field name

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Hm, didn't notice Reid's http://reviews.llvm.org/D18271, which seems to cover this in a better way. http://reviews.llvm.org/D18395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D18396: Clang-tidy:modernize-use-override. Fix for __declspec attributes and const=0 without spacse

2016-03-23 Thread Robert Bolter via cfe-commits
Rob created this revision. Rob added reviewers: alexfh, aaron.ballman. Rob added a subscriber: cfe-commits. This patch is to address 2 problems I found with Clang-tidy:modernize-use-override. 1: missing spaces on pure function decls. Orig: void pure() const=0 Problem: void pure() constoverride

Re: [PATCH] D18392: clang-cl: Don't warn about /Oy- being unused in 64-bit builds.

2016-03-23 Thread Hans Wennborg via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. lgtm, thanks! http://reviews.llvm.org/D18392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

Re: [PATCH] D17987: [clang-tidy] Extension of checker misc-misplaced-widening-cast

2016-03-23 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 51418. baloghadamsoftware added a comment. Required fixes done. http://reviews.llvm.org/D17987 Files: clang-tidy/misc/BoolPointerImplicitConversionCheck.cpp clang-tidy/misc/MisplacedWideningCastCheck.cpp clang-tidy/misc/MisplacedWideningCas

Re: [PATCH] D16139: [MIPS] initFeatureMap() to handle empty string argument

2016-03-23 Thread Daniel Sanders via cfe-commits
dsanders added a comment. > > > b) CPUs are not subtarget features (or they shouldn't be), they're CPUs > > > that contain features. They may be generic names for ISAs as well, but > > > probably best to keep them separate. > > > > I agree, we have two separate concepts that happen to use t

[PATCH] D18398: Compilation for Intel MCU (Part 1/3)

2016-03-23 Thread Andrey Turetskiy via cfe-commits
aturetsk created this revision. aturetsk added reviewers: rsmith, tra, thakis, ddunbar, bob.wilson, dougk. aturetsk added subscribers: cfe-commits, zinovy.nis, DavidKreitzer. Add -miamcu option which: * Sets IAMCU triple * Sets IAMCU ABI * Enforces static compilation http://reviews.ll

Re: [PATCH] D18392: clang-cl: Don't warn about /Oy- being unused in 64-bit builds.

2016-03-23 Thread Nico Weber via cfe-commits
thakis closed this revision. thakis added a comment. r264163, thanks! http://reviews.llvm.org/D18392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r264163 - clang-cl: Don't warn about /Oy- being unused in 64-bit builds.

2016-03-23 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Mar 23 10:37:41 2016 New Revision: 264163 URL: http://llvm.org/viewvc/llvm-project?rev=264163&view=rev Log: clang-cl: Don't warn about /Oy- being unused in 64-bit builds. http://reviews.llvm.org/D18392 Modified: cfe/trunk/lib/Driver/MSVCToolChain.cpp cfe/trunk/test

[PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-23 Thread Eric Liu via cfe-commits
ioeric created this revision. ioeric added reviewers: klimek, djasper. ioeric added a subscriber: cfe-commits. Herald added a subscriber: klimek. Previously, format::getStyle assumes that the given file resides in the real file system, which prevents the use of virtual file system in testing etc.

Re: [PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-23 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: lib/Format/Format.cpp:2103 @@ +2102,3 @@ + if (!FS) { +// If FS is not specified, the default file system is the real file system. +FS = vfs::getRealFileSystem().get(); I think this comment is redundant. I'd remov

Re: [PATCH] D16993: Add missing __builtin_bitreverse8

2016-03-23 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith accepted this revision. rsmith added a reviewer: rsmith. This revision is now accepted and ready to land. Comment at: docs/LanguageExtensions.rst:1533 @@ +1532,3 @@ +the bitpattern of an integer value; for example ``0b1234567`` becomes +``

Re: [PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-23 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 51426. ioeric added a comment. - removed redundant code. http://reviews.llvm.org/D18399 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp =

r264164 - [analyzer] Fix typo s/initalize/initialize/

2016-03-23 Thread Chih-Hung Hsieh via cfe-commits
Author: chh Date: Wed Mar 23 11:14:12 2016 New Revision: 264164 URL: http://llvm.org/viewvc/llvm-project?rev=264164&view=rev Log: [analyzer] Fix typo s/initalize/initialize/ Differential Revision: http://reviews.llvm.org/D18363 Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageC

Re: [PATCH] D18363: Fix typo s/initalize/initialize/

2016-03-23 Thread Chih-Hung Hsieh via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL264164: [analyzer] Fix typo s/initalize/initialize/ (authored by chh). Changed prior to commit: http://reviews.llvm.org/D18363?vs=51307&id=51429#toc Repository: rL LLVM http://reviews.llvm.org/D1836

Re: [PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-23 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 51431. ioeric marked 3 inline comments as done. ioeric added a comment. - some more redundancy removed http://reviews.llvm.org/D18399 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/Fo

Re: [PATCH] D17451: PR26448: [Sema] Fix determined type of ternary operator acting on two xvalue class types

2016-03-23 Thread Erik Pilkington via cfe-commits
erik.pilkington added a comment. ping! http://reviews.llvm.org/D17451 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D18401: clang-cl: Include /FI headers in /showIncludes output.

2016-03-23 Thread Nico Weber via cfe-commits
thakis created this revision. thakis added a reviewer: hans. thakis added a subscriber: cfe-commits. `-H` in gcc mode doesn't print `-include` headers, but they are included in depfiles written by MMD and friends. Since `/showIncludes` is what's used instead of depfiles, printing `/FI` there see

Re: [PATCH] D17852: Added formatAndApplyAllReplacements that works on multiple files in libTooling.

2016-03-23 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 51433. ioeric marked 3 inline comments as done. ioeric added a comment. - removed format::getStyle test case from ToolingTests; http://reviews.llvm.org/D17852 Files: include/clang/Basic/SourceManager.h include/clang/Format/Format.h include/clang/Toolin

Re: [PATCH] D18395: -Wshadow: don't warn on ctor parameters with the same name as a field name

2016-03-23 Thread David Blaikie via cfe-commits
Reid sent out a different patch for this warning improvement. Have you checked that one out? Is it abandoned? I'm still a bit concerned about whitelisting all these cases & not catching cases where the parameter is then used inside the function in some problematic way (the classic being a unique_p

Re: [PATCH] D18395: -Wshadow: don't warn on ctor parameters with the same name as a field name

2016-03-23 Thread David Blaikie via cfe-commits
Ah, now I see your follow-up email. Soryr I missed it... On Wed, Mar 23, 2016 at 9:30 AM, David Blaikie wrote: > Reid sent out a different patch for this warning improvement. Have you > checked that one out? Is it abandoned? > > I'm still a bit concerned about whitelisting all these cases & not

r264167 - ObjC: Handle boolean fixed type for enum.

2016-03-23 Thread Manman Ren via cfe-commits
Author: mren Date: Wed Mar 23 11:28:28 2016 New Revision: 264167 URL: http://llvm.org/viewvc/llvm-project?rev=264167&view=rev Log: ObjC: Handle boolean fixed type for enum. Before this commit, we assert failure in ImplicitCastExpr "unheralded conversion to bool". This commit fixes the assertion b

Re: [PATCH] D18396: Clang-tidy:modernize-use-override. Fix for __declspec attributes and const=0 without spacse

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for the patch! Looks good in general. A few nits. Comment at: clang-tidy/modernize/UseOverrideCheck.cpp:125 @@ -124,1 +124,3 @@ + if (T.is(tok::kw___attribute) && + !(Sources.isBeforeInTranslationUnit(T.getLocation(), MethodLoc))

Re: [PATCH] D18243: [ASTMatchers] Existing matcher hasAnyArgument fixed

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: docs/ReleaseNotes.rst:123 @@ +122,3 @@ +- hasAnyArgument: Matcher no longer ignores parentheses and implicit casts on + the argument before applying the inner matcher. The fix was done allow for + greater control by the user. In all exis

Re: [PATCH] D18264: [clang-tidy] misc-assign-operator-signature checker checks return value of all assign operators

2016-03-23 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 51435. baloghadamsoftware added a comment. Check for non copy and move assign operators made optional. http://reviews.llvm.org/D18264 Files: clang-tidy/misc/AssignOperatorSignatureCheck.cpp clang-tidy/misc/AssignOperatorSignatureCheck.h tes

AUTO: Jacob Hansen is out of the office (returning 05/04/2016)

2016-03-23 Thread via cfe-commits
I am out of the office until 05/04/2016. Note: This is an automated response to your message "cfe-commits Digest, Vol 105, Issue 505" sent on 3/23/2016 4:59:28 PM. This is the only notification you will receive while this person is away. This message and any attachments are intended for th

Re: [PATCH] D18243: [ASTMatchers] Existing matcher hasAnyArgument fixed

2016-03-23 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 51437. baloghadamsoftware added a comment. Release notes fixed. http://reviews.llvm.org/D18243 Files: docs/LibASTMatchersReference.html docs/ReleaseNotes.rst include/clang/ASTMatchers/ASTMatchers.h unittests/ASTMatchers/ASTMatchersTest.cp

Re: [PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-23 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: lib/Format/Format.cpp:2148 @@ -2140,3 +2147,3 @@ // the file or not. -llvm::sys::fs::is_regular_file(Twine(ConfigFile), IsFile); - +Status = FS->status(ConfigFile.c_str()); +bool IsFile = Prefer .str to .c

Re: [PATCH] D18401: clang-cl: Include /FI headers in /showIncludes output.

2016-03-23 Thread Nico Weber via cfe-commits
thakis added a comment. On second thought, and after looking at -E output with -include and gch files, and at CC_PRINT_HEADERS behavior (it prints but doesn't indent), I think I like the alternative implementation I'm mentioning better. Let me make that change. http://reviews.llvm.org/D18401

Re: [PATCH] D18385: [CUDA] Simplify SemaCUDA/function-overload.cu test.

2016-03-23 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. Small nit, LGTM otherwise. Comment at: test/SemaCUDA/function-overload.cu:66 @@ +65,3 @@ +__device__ int d() { return 8; } +// expected-note@-1 0+ {{'d' declared here}} +// expected

Re: [PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-23 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 51440. ioeric added a comment. - changed c_str() to str() http://reviews.llvm.org/D18399 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp

Re: [PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-23 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg http://reviews.llvm.org/D18399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

Re: [PATCH] D18264: [clang-tidy] misc-assign-operator-signature checker checks return value of all assign operators

2016-03-23 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. According to cpp core guidelines any assignment operator should return *this. https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rf-assignment-op So in case this check is activated by using an alias it should not be a special case. http://re

Re: [PATCH] D17762: Fix an assertion failure in setPointOfInstantiation.

2016-03-23 Thread Richard Smith via cfe-commits
rsmith added a comment. It seems to me that the bug is that we're producing an invalid source location, not how we handle that downstream. Typo correction should be able to preserve the source location of whatever expression it was correcting. Comment at: lib/Sema/SemaExpr.cpp

Re: [PATCH] D17412: PR19957: [OpenCL] incorrectly accepts implicit address space conversion with ternary operator

2016-03-23 Thread Yaxun Liu via cfe-commits
yaxunl marked 15 inline comments as done. Comment at: lib/AST/ASTContext.cpp:7613 @@ +7612,3 @@ +if (getLangOpts().OpenCL) { + if (LHS.getUnqualifiedType() != RHS.getUnqualifiedType() || + LQuals.getCVRQualifiers() != RQuals.getCVRQualifiers()) p

r264169 - Visualize fields of records as they were declared in Visual Studio debugger

2016-03-23 Thread Mike Spertus via cfe-commits
Author: mps Date: Wed Mar 23 12:29:42 2016 New Revision: 264169 URL: http://llvm.org/viewvc/llvm-project?rev=264169&view=rev Log: Visualize fields of records as they were declared in Visual Studio debugger Modified: cfe/trunk/utils/clang.natvis Modified: cfe/trunk/utils/clang.natvis URL: ht

Re: [PATCH] D18401: clang-cl: Include /FI headers in /showIncludes output.

2016-03-23 Thread Nico Weber via cfe-commits
thakis updated the summary for this revision. thakis updated this revision to Diff 51442. http://reviews.llvm.org/D18401 Files: lib/Frontend/CompilerInstance.cpp lib/Frontend/HeaderIncludeGen.cpp lib/Frontend/InitPreprocessor.cpp test/Driver/cl-pch-showincludes.cpp test/Frontend/print-h

r264170 - [NFC] Delete an unused function parameter from a static function

2016-03-23 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Wed Mar 23 12:39:51 2016 New Revision: 264170 URL: http://llvm.org/viewvc/llvm-project?rev=264170&view=rev Log: [NFC] Delete an unused function parameter from a static function Modified: cfe/trunk/lib/Sema/SemaExpr.cpp Modified: cfe/trunk/lib/Sema/SemaExpr.cpp URL: ht

Re: [PATCH] D18401: clang-cl: Include /FI headers in /showIncludes output.

2016-03-23 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith accepted this revision. rsmith added a reviewer: rsmith. This revision is now accepted and ready to land. Comment at: lib/Frontend/HeaderIncludeGen.cpp:155-156 @@ -151,3 +154,4 @@ // Dump the header include information we are past the

[PATCH] D18408: readability check for const params in declarations

2016-03-23 Thread Matt Kulukundis via cfe-commits
fowles created this revision. fowles added a reviewer: alexfh. fowles added a subscriber: cfe-commits. Adds a clang-tidy warning for top-level consts in function declarations. http://reviews.llvm.org/D18408 Files: clang-tidy/readability/AvoidConstParamsInDecls.cpp clang-tidy/readability/Avoi

Re: [PATCH] D18380: [CUDA] Implement -fcuda-relaxed-constexpr, and enable it by default.

2016-03-23 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Driver/CC1Options.td:702-703 @@ -701,2 +701,4 @@ HelpText<"Allow variadic functions in CUDA device code.">; +def fcuda_relaxed_constexpr : Flag<["-"], "fcuda-relaxed-constexpr">, + HelpText<"Treat constexpr functions as _

Re: [PATCH] D18275: [ASTMatchers] Add own version of VariadicFunction.

2016-03-23 Thread Samuel Benzaquen via cfe-commits
sbenza updated this revision to Diff 51447. sbenza added a comment. Minor fix http://reviews.llvm.org/D18275 Files: include/clang/ASTMatchers/ASTMatchers.h include/clang/ASTMatchers/ASTMatchersInternal.h lib/ASTMatchers/Dynamic/Marshallers.h unittests/ASTMatchers/ASTMatchersTest.cpp In

Re: [PATCH] D18275: [ASTMatchers] Add own version of VariadicFunction.

2016-03-23 Thread Samuel Benzaquen via cfe-commits
sbenza added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:80 @@ +79,3 @@ + ResultT operator()(ArrayRef Args) const { +std::vector InnerArgs; +for (const ArgT &Arg : Args) alexfh wrote: > It's unfortunate that we need to cre

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. alexfh added a comment. As a data point: I ran -Wshadow on our code base with a similar, but simpler patch (http://reviews.llvm.org/D18395, just disables the warning on ctor parameters named after fields). It removes more than half of the hits (from ~100k init

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D18271#381728, @alexfh wrote: > ... and then gradually adding back the cases that seem to be important to > flag ... Maybe as separate warnings. http://reviews.llvm.org/D18271 ___ cfe-commits ma

Re: [PATCH] D18401: clang-cl: Include /FI headers in /showIncludes output.

2016-03-23 Thread Nico Weber via cfe-commits
thakis updated this revision to Diff 51448. thakis marked 2 inline comments as done. thakis added a comment. Thanks! All done. http://reviews.llvm.org/D18401 Files: lib/Frontend/CompilerInstance.cpp lib/Frontend/HeaderIncludeGen.cpp lib/Frontend/InitPreprocessor.cpp test/Driver/cl-pch-s

r264174 - clang-cl: Include /FI headers in /showIncludes output.

2016-03-23 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Mar 23 13:00:22 2016 New Revision: 264174 URL: http://llvm.org/viewvc/llvm-project?rev=264174&view=rev Log: clang-cl: Include /FI headers in /showIncludes output. -H in gcc mode doesn't print -include headers, but they are included in depfiles written by MMD and friends. Si

Re: [PATCH] D18401: clang-cl: Include /FI headers in /showIncludes output.

2016-03-23 Thread Nico Weber via cfe-commits
thakis closed this revision. thakis added a comment. …and landed in r264174. http://reviews.llvm.org/D18401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread David Blaikie via cfe-commits
On Wed, Mar 23, 2016 at 11:03 AM, Alexander Kornienko via cfe-commits < cfe-commits@lists.llvm.org> wrote: > alexfh added a subscriber: alexfh. > alexfh added a comment. > > As a data point: I ran -Wshadow on our code base with a similar, but > simpler patch (http://reviews.llvm.org/D18395, just d

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D18271#378196, @dblaikie wrote: > It's not just modifications of shadowed variables that are a problem - one of > the one's I'm concerned we should catch is: > > struct foo { > std::unique_ptr p; > foo(std::unique_ptr p) : p(std::move(

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread Nico Weber via cfe-commits
thakis added a subscriber: thakis. thakis added a comment. FWIW we don't currently use this warning on Chromium because it's way to noisy. So something like this looks like a great change to me. dblaikie, are you aware of any codebases that use this warning in its current form? http://reviews

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread Ben Craig via cfe-commits
bcraig added a subscriber: bcraig. bcraig added a comment. In http://reviews.llvm.org/D18271#381744, @thakis wrote: > FWIW we don't currently use this warning on Chromium because it's way to > noisy. So something like this looks like a great change to me. > > dblaikie, are you aware of any codeb

r264178 - clang-cl: Add more tests for the interaction of /FI and /Yc /Yu.

2016-03-23 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Mar 23 13:17:02 2016 New Revision: 264178 URL: http://llvm.org/viewvc/llvm-project?rev=264178&view=rev Log: clang-cl: Add more tests for the interaction of /FI and /Yc /Yu. Most things even work; see the included FIXMEs for things that need polishing. Also don't warn about

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread Nico Weber via cfe-commits
thakis added a comment. In http://reviews.llvm.org/D18271#381758, @bcraig wrote: > In http://reviews.llvm.org/D18271#381744, @thakis wrote: > > > FWIW we don't currently use this warning on Chromium because it's way to > > noisy. So something like this looks like a great change to me. > > > > db

Re: [PATCH] D18380: [CUDA] Implement -fcuda-relaxed-constexpr, and enable it by default.

2016-03-23 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: include/clang/Driver/CC1Options.td:702-703 @@ -701,2 +701,4 @@ HelpText<"Allow variadic functions in CUDA device code.">; +def fcuda_relaxed_constexpr : Flag<["-"], "fcuda-relaxed-constexpr">, + HelpText<"Treat constexpr functions as _

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread Richard Smith via cfe-commits
rsmith added a comment. I think a reasonable approach would be: "do not warn on shadowing if the idiom of naming a constructor parameter after a class member is used, and the class member is initialized from that constructor parameter, and all uses of the parameter in the constructor body would

Re: [PATCH] D18275: [ASTMatchers] Add own version of VariadicFunction.

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Still LG. Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:82 @@ +81,3 @@ + ResultT operator()(ArrayRef Args) const { +SmallVector InnerArgs; +for (const ArgT &Arg : Args) > On the other hand, constructing the matchers

Re: [PATCH] D13126: New static analyzer checker for loss of sign/precision

2016-03-23 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Could you add the reduced false positives to the tests file? > As far as I see the diagnostics are showing the proper path now.. What do you mean? Does this refer to supplying more information the the path about why the error occurs? Comment at: li

Re: [PATCH] D18380: [CUDA] Implement -fcuda-relaxed-constexpr, and enable it by default.

2016-03-23 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Driver/CC1Options.td:702-703 @@ -701,2 +701,4 @@ HelpText<"Allow variadic functions in CUDA device code.">; +def fcuda_relaxed_constexpr : Flag<["-"], "fcuda-relaxed-constexpr">, + HelpText<"Treat constexpr functions as _

r264182 - clang-cl: Fix remaining bugs in interaction of /Yc and /FI /showIncludes.

2016-03-23 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Mar 23 13:46:57 2016 New Revision: 264182 URL: http://llvm.org/viewvc/llvm-project?rev=264182&view=rev Log: clang-cl: Fix remaining bugs in interaction of /Yc and /FI /showIncludes. Instead of putting the /Yc header into ExtraDeps, give DependencyOutputOptions a dedicated f

Re: [PATCH] D17821: [OpenCL] Complete image types support

2016-03-23 Thread Mandeep Singh Grang via cfe-commits
mgrang added a subscriber: mgrang. Comment at: include/clang/AST/ASTContext.h:903 @@ +902,3 @@ +#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ + CanQualType SingletonId; +#include "clang/AST/OpenCLImageTypes.def" remove extra sp

Re: [PATCH] D17412: PR19957: [OpenCL] incorrectly accepts implicit address space conversion with ternary operator

2016-03-23 Thread Yaxun Liu via cfe-commits
yaxunl removed rL LLVM as the repository for this revision. yaxunl updated this revision to Diff 51460. yaxunl marked 13 inline comments as done. yaxunl added a comment. Added comments. Revised test. http://reviews.llvm.org/D17412 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/AST/AS

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread Ben Craig via cfe-commits
bcraig added a subscriber: mclow.lists. bcraig added a comment. > > Not dblaikie, but I've used the GCC version of -Wshadow on reasonably large > > code bases before. The ctor pattern that this is trying to squelch was > > certainly a significant portion of the warnings, particularly when (old)

[PATCH] D18412: [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.

2016-03-23 Thread Etienne Bergeron via cfe-commits
etienneb created this revision. etienneb added a reviewer: alexfh. etienneb added a subscriber: cfe-commits. The current checker is able to recognize std::string but do not recognize other string variants. This path is adding the support for any string define with basic_string without consiring

Re: [PATCH] D18412: [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.

2016-03-23 Thread David Blaikie via cfe-commits
can you just match on the name of the template instead? On Wed, Mar 23, 2016 at 12:46 PM, Etienne Bergeron via cfe-commits < cfe-commits@lists.llvm.org> wrote: > etienneb created this revision. > etienneb added a reviewer: alexfh. > etienneb added a subscriber: cfe-commits. > > The current checke

Re: [PATCH] D18264: [clang-tidy] misc-assign-operator-signature checker checks return value of all assign operators

2016-03-23 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. Oh, I was searching in the C++ Core Guidlines, but at the wrong place because I did not find it. So I will change this option to be enabled by default. DSL users who do not follow this rule for the non copy and non move assign operators can disable it. http

r264184 - Make sure to perform dependent access checks when instantiating a

2016-03-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Mar 23 15:07:07 2016 New Revision: 264184 URL: http://llvm.org/viewvc/llvm-project?rev=264184&view=rev Log: Make sure to perform dependent access checks when instantiating a lambda-expression. We don't actually instantiate the closure type / operator() in the template in o

Re: [PATCH] D18347: [PATCH] Fix thread_annotation negtest for thread safety.

2016-03-23 Thread Eric Fiselier via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM! Thanks for the complete patch! The "no-threads" bot should now be green so future breakage will be detected immediately! http://reviews.llvm.org/D18347 __

Re: [PATCH] D18412: [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.

2016-03-23 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 51464. etienneb marked an inline comment as done. etienneb added a comment. Fix unittests. http://reviews.llvm.org/D18412 Files: clang-tidy/readability/RedundantStringCStrCheck.cpp test/clang-tidy/readability-redundant-string-cstr.cpp Index: test/clan

Re: [PATCH] D18412: [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.

2016-03-23 Thread Marianne Mailhot-Sarrasin via cfe-commits
mamai added a subscriber: mamai. mamai added a comment. nit: in summary, consiring -> considering ? Comment at: test/clang-tidy/readability-redundant-string-cstr.cpp:54 @@ +53,3 @@ + // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: redundant call to `c_str()` [readability-redundant

Re: [PATCH] D18412: [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.

2016-03-23 Thread Etienne Bergeron via cfe-commits
etienneb added a comment. In http://reviews.llvm.org/D18412#381843, @dblaikie wrote: > can you just match on the name of the template instead? I'm not sure to get your point? Are you proposing to match "basic_string" instead of the whole regexp? I'm in favor of that change as I don't see any c

Re: [PATCH] D18380: [CUDA] Implement -fcuda-relaxed-constexpr, and enable it by default.

2016-03-23 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: include/clang/Driver/CC1Options.td:702-703 @@ -701,2 +701,4 @@ HelpText<"Allow variadic functions in CUDA device code.">; +def fcuda_relaxed_constexpr : Flag<["-"], "fcuda-relaxed-constexpr">, + HelpText<"Treat constexpr functions as _

  1   2   >