Re: [PATCH] D22334: Fix for Bug 28172 : clang crashes on invalid code (with too few arguments to __builtin_signbit) without any proper diagnostics.

2016-09-07 Thread Mayur Pandey via cfe-commits
ping. On Tue, Aug 30, 2016 at 7:32 PM, Mayur Pandey wrote: > mayurpandey updated this revision to Diff 69674. > mayurpandey added a comment. > > Hi, > > Updated the patch to add a template based testcase. As suggested by you, I > tried updating the error diagnostic to err_typecheck_cond_expect_f

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-07 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. > -fsanitize=* as a driver argument *when linking* is an explicit request to > link against the sanitizer runtimes. Sanitizer users pass this option to the clang driver to get the runtime checking. Not all of them understand the implications and immediately realize

Re: [PATCH] D21678: Fix For pr28288 - Error message in shift of vector values

2016-09-07 Thread Akira Hatanaka via cfe-commits
I looked at r278501 and realized it’s doing more than just fixing the test case in PR28288. For example, when the following code was compiled, vi8 = vi8 << vuc8; // vuc8: <8 x unsigned char>, vi8: <8 x int> vc8 = vc8 << vs4; // vc8: <8 x char>, vs4: <4 x short> prior to r278501, clang would re

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-07 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/AST/ExprConstant.cpp:7024-7050 @@ -7023,1 +7023,29 @@ + case Builtin::BI_rotl8: + case Builtin::BI_rotl16: + case Builtin::BI_rotl: + case Builtin::BI_lrotl: + case Builtin::BI_rotl64: { +APSInt Val, Shift; +if (!Evalu

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-07 Thread Justin Bogner via cfe-commits
Richard Smith writes: > My 2c: `-nodefaultlibs` means "don't link against any libraries I > didn't explicitly tell you to". `-fsanitize=*` as a driver argument > *when linking* is an explicit request to link against the sanitizer > runtimes. So that should win. If you don't want to link against th

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-07 Thread Albert Gutowski via cfe-commits
agutowski updated this revision to Diff 70646. agutowski marked an inline comment as done. agutowski added a comment. Add evaluating values for constant arguments https://reviews.llvm.org/D24311 Files: include/clang/Basic/Builtins.def lib/AST/ExprConstant.cpp lib/CodeGen/CGBuiltin.cpp l

[PATCH] D24330: Add some MS aliases for existing intrinsics

2016-09-07 Thread Albert Gutowski via cfe-commits
agutowski created this revision. agutowski added reviewers: rnk, thakis, compnerd, majnemer. agutowski added a subscriber: cfe-commits. https://reviews.llvm.org/D24330 Files: include/clang/Basic/Builtins.def include/clang/Basic/BuiltinsX86.def lib/AST/ExprConstant.cpp lib/CodeGen/CGBuilti

Re: [PATCH] D22642: CodeGen: Clean up implementation of vtable initializer builder. NFC.

2016-09-07 Thread Richard Smith via cfe-commits
On 7 Sep 2016 6:59 pm, "Peter Collingbourne" wrote: On Wed, Sep 7, 2016 at 6:44 PM, Richard Smith wrote: > On 7 Sep 2016 6:23 pm, "Peter Collingbourne" wrote: > > pcc marked 4 inline comments as done. > > > Comment at: lib/CodeGen/CGVTables.cpp:588 > @@ +587,3 @@ > +if

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-07 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer added a comment. In https://reviews.llvm.org/D24311#536545, @agutowski wrote: > In https://reviews.llvm.org/D24311#536333, @rnk wrote: > > > You should locally verify that this generates the correct assembly when > > optimizations are enabled, and

Re: [PATCH] D22642: CodeGen: Clean up implementation of vtable initializer builder. NFC.

2016-09-07 Thread Peter Collingbourne via cfe-commits
On Wed, Sep 7, 2016 at 6:44 PM, Richard Smith wrote: > On 7 Sep 2016 6:23 pm, "Peter Collingbourne" wrote: > > pcc marked 4 inline comments as done. > > > Comment at: lib/CodeGen/CGVTables.cpp:588 > @@ +587,3 @@ > +if (auto *F = dyn_cast(Cache)) > + F->setUnname

r280899 - Add explicit casts to size_t to try to appease MSVC.

2016-09-07 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Wed Sep 7 20:45:28 2016 New Revision: 280899 URL: http://llvm.org/viewvc/llvm-project?rev=280899&view=rev Log: Add explicit casts to size_t to try to appease MSVC. Modified: cfe/trunk/include/clang/AST/VTableBuilder.h Modified: cfe/trunk/include/clang/AST/VTableBuilder.h U

Re: [PATCH] D22642: CodeGen: Clean up implementation of vtable initializer builder. NFC.

2016-09-07 Thread Richard Smith via cfe-commits
On 7 Sep 2016 6:23 pm, "Peter Collingbourne" wrote: pcc marked 4 inline comments as done. Comment at: lib/CodeGen/CGVTables.cpp:588 @@ +587,3 @@ +if (auto *F = dyn_cast(Cache)) + F->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global); +Cache = llvm::C

Re: [PATCH] D22642: CodeGen: Clean up implementation of vtable initializer builder. NFC.

2016-09-07 Thread Peter Collingbourne via cfe-commits
pcc marked 4 inline comments as done. Comment at: lib/CodeGen/CGVTables.cpp:588 @@ +587,3 @@ +if (auto *F = dyn_cast(Cache)) + F->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global); +Cache = llvm::ConstantExpr::getBitCast(Cache, CGM.Int8PtrTy); ---

Re: [PATCH] D22642: CodeGen: Clean up implementation of vtable initializer builder. NFC.

2016-09-07 Thread Peter Collingbourne via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL280897: CodeGen: Clean up implementation of vtable initializer builder. NFC. (authored by pcc). Changed prior to commit: https://reviews.llvm.org/D22642?vs=70622&id=70632#toc Repository: rL LLVM htt

r280897 - CodeGen: Clean up implementation of vtable initializer builder. NFC.

2016-09-07 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Wed Sep 7 20:14:39 2016 New Revision: 280897 URL: http://llvm.org/viewvc/llvm-project?rev=280897&view=rev Log: CodeGen: Clean up implementation of vtable initializer builder. NFC. - Simplify signature of CreateVTableInitializer function. - Move vtable component builder to a sep

Re: [PATCH] D23820: Do not warn about format strings that are indexed string literals.

2016-09-07 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaChecking.cpp:4089-4090 @@ +4088,4 @@ +if (BinOp->isAdditiveOp()) { + bool LIsInt = BinOp->getLHS()->EvaluateAsInt(LResult, S.Context); + bool RIsInt = BinOp->getRHS()->EvaluateAsInt(RResult, S.Context); + ---

Re: [PATCH] D23932: [XRay] ARM 32-bit no-Thumb support in Clang

2016-09-07 Thread Dean Michael Berris via cfe-commits
dberris closed this revision. dberris added a comment. This has been landed as https://reviews.llvm.org/rL280889. https://reviews.llvm.org/D23932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

r280889 - [XRay] ARM 32-bit no-Thumb support in Clang

2016-09-07 Thread Dean Michael Berris via cfe-commits
Author: dberris Date: Wed Sep 7 19:23:28 2016 New Revision: 280889 URL: http://llvm.org/viewvc/llvm-project?rev=280889&view=rev Log: [XRay] ARM 32-bit no-Thumb support in Clang Just a test for now, adapted from x86_64 tests of XRay. This is one of 3 commits to different repositories of XRay ARM

Re: [PATCH] D23932: [XRay] ARM 32-bit no-Thumb support in Clang

2016-09-07 Thread Dean Michael Berris via cfe-commits
dberris added a comment. Landing this one now. https://reviews.llvm.org/D23932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22057: Prevent devirtualization of calls to un-instantiated functions.

2016-09-07 Thread Sunil Srivastava via cfe-commits
Sunil_Srivastava added inline comments. Comment at: test/CodeGen/no-devirt.cpp:16 @@ +15,3 @@ + if (a > 6) return data[a] ; // Should not devirtualize + if (a > 4) return data.func1(a); // Should devirtualize + return data.func2(a);// Should devirtualize ---

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-07 Thread Eric Fiselier via cfe-commits
+1 On Wed, Sep 7, 2016 at 6:04 PM, Richard Smith wrote: > rsmith added a subscriber: rsmith. > rsmith added a comment. > > My 2c: `-nodefaultlibs` means "don't link against any libraries I didn't > explicitly tell you to". `-fsanitize=*` as a driver argument *when linking* > is an explicit reque

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-07 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. My 2c: `-nodefaultlibs` means "don't link against any libraries I didn't explicitly tell you to". `-fsanitize=*` as a driver argument *when linking* is an explicit request to link against the sanitizer runtimes. So that should win. If y

Re: [PATCH] D22642: CodeGen: Clean up implementation of vtable initializer builder. NFC.

2016-09-07 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: include/clang/AST/VTableBuilder.h:222-225 @@ -221,6 +221,6 @@ typedef const VTableComponent *vtable_component_iterator; typedef const VTableThunkTy *vtable_thunk_iterator; typede

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-07 Thread Chris Bieneman via cfe-commits
beanz updated this revision to Diff 70624. beanz added a comment. - Added new driver flag -flink-sanitizer-runtimes which forces linking sanitizer runtimes. Additional cleanup will be required to support the GNUTools and FreeBSD drivers as well as making the Darwin behavior more consistent. I w

Re: [PATCH] D22642: CodeGen: Clean up implementation of vtable initializer builder. NFC.

2016-09-07 Thread Peter Collingbourne via cfe-commits
pcc updated this revision to Diff 70622. pcc added a comment. - Refresh https://reviews.llvm.org/D22642 Files: include/clang/AST/VTableBuilder.h lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CGVTables.cpp lib/CodeGen/CGVTables.h lib/CodeGen/ItaniumCXXABI.cpp lib/CodeGen/MicrosoftCXXABI.cp

Re: r280728 - Modules: Fix an assertion in DeclContext::buildLookup.

2016-09-07 Thread Richard Smith via cfe-commits
On Wed, Sep 7, 2016 at 12:45 PM, Manman Ren wrote: > On Tue, Sep 6, 2016 at 6:54 PM, Richard Smith > wrote: > >> On Tue, Sep 6, 2016 at 11:16 AM, Manman Ren via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> Author: mren >>> Date: Tue Sep 6 13:16:54 2016 >>> New Revision: 280728 >>>

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-07 Thread Albert Gutowski via cfe-commits
agutowski marked 2 inline comments as done. agutowski added a comment. In https://reviews.llvm.org/D24311#536333, @rnk wrote: > You should locally verify that this generates the correct assembly when > optimizations are enabled, and if it doesn't, try to make the input look more > like llvm/tes

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-07 Thread Albert Gutowski via cfe-commits
agutowski updated this revision to Diff 70614. agutowski added a comment. Fix undefined value problem when rotating by zero bits Change tests to work without -Oz flag Fix types of arguments in tests https://reviews.llvm.org/D24311 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuilti

r280878 - clang-format: [JavaScript] Change default AllowShortFunctionsOnASingleLine

2016-09-07 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Sep 7 18:01:13 2016 New Revision: 280878 URL: http://llvm.org/viewvc/llvm-project?rev=280878&view=rev Log: clang-format: [JavaScript] Change default AllowShortFunctionsOnASingleLine for Google style to "empty". Modified: cfe/trunk/lib/Format/Format.cpp cfe/trunk

Re: [PATCH] D24040: codechecker tool core

2016-09-07 Thread Mehdi AMINI via cfe-commits
mehdi_amini added a comment. In https://reviews.llvm.org/D24040#532719, @o.gyorgy wrote: > In https://reviews.llvm.org/D24040#530546, @mehdi_amini wrote: > > > > This looks like a fairly large tool. Should it get its own "subproject > > > level" directory in the SVN instead of being nested wit

Re: [PATCH] D24322: clang-format: [JavaScript] Do requoting in a separate pass

2016-09-07 Thread Daniel Jasper via cfe-commits
djasper closed this revision. djasper added a comment. Submitted as r280874. https://reviews.llvm.org/D24322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r280874 - clang-format: [JavaScript] Do requoting in a separate pass

2016-09-07 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Sep 7 17:48:53 2016 New Revision: 280874 URL: http://llvm.org/viewvc/llvm-project?rev=280874&view=rev Log: clang-format: [JavaScript] Do requoting in a separate pass The attempt to fix requoting behavior in r280487 after changes to tooling::Replacements are incomplete.

Re: [PATCH] D24322: clang-format: [JavaScript] Do requoting in a separate pass

2016-09-07 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/Format.cpp:1707 @@ +1706,3 @@ + if (NewCode) { +auto NewEnv = Environment::CreateVirtualEnvironment( +*NewCode, FileName, mprobst wrote: > I guess we don't worry about the performance c

Re: [PATCH] D24322: clang-format: [JavaScript] Do requoting in a separate pass

2016-09-07 Thread Martin Probst via cfe-commits
mprobst added inline comments. Comment at: lib/Format/Format.cpp:1707 @@ +1706,3 @@ + if (NewCode) { +auto NewEnv = Environment::CreateVirtualEnvironment( +*NewCode, FileName, I guess we don't worry about the performance consequences here?

[PATCH] D24322: clang-format: [JavaScript] Do requoting in a separate pass

2016-09-07 Thread Daniel Jasper via cfe-commits
djasper created this revision. djasper added a reviewer: mprobst. djasper added a subscriber: cfe-commits. Herald added a subscriber: klimek. The attempt to fix requoting behavior in r280487 after changes to tooling::Replacements are incomplete. We essentially need to add to replacements at the

[libclc] r280871 - Avoid ambiguity in calling atom_add functions.

2016-09-07 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed Sep 7 17:11:02 2016 New Revision: 280871 URL: http://llvm.org/viewvc/llvm-project?rev=280871&view=rev Log: Avoid ambiguity in calling atom_add functions. clang (since r280553) allows pointer casts in function overloads, so we need to disambiguate the second argument. c

[PATCH] D24319: clang-format: Add a flag to limit git-clang-format's diff to a single commit

2016-09-07 Thread Luis Héctor Chávez via cfe-commits
lhchavez created this revision. lhchavez added a reviewer: djasper. lhchavez added subscribers: srhines, cfe-commits. lhchavez set the repository for this revision to rL LLVM. lhchavez added a project: clang-c. When building pre-upload hooks using git-clang-format, it is useful to limit the scope

Re: [PATCH] D24115: [Clang] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes

2016-09-07 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL280870: Fix some Clang-tidy modernize-use-using and Include What You Use warnings… (authored by eugenezelenko). Changed prior to commit: https://reviews.llvm.org/D24115?vs=69937&id=70606#toc Repository

r280870 - Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes.

2016-09-07 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Wed Sep 7 16:53:17 2016 New Revision: 280870 URL: http://llvm.org/viewvc/llvm-project?rev=280870&view=rev Log: Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes. Differential revision: https://reviews.llvm.org/D24115 Modifi

Re: [PATCH] D24314: [libc++] Clean up MSVC support

2016-09-07 Thread Shoaib Meenai via cfe-commits
smeenai marked 2 inline comments as done. smeenai added a comment. https://reviews.llvm.org/D24314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24314: [libc++] Clean up MSVC support

2016-09-07 Thread Shoaib Meenai via cfe-commits
smeenai updated this revision to Diff 70598. smeenai added a comment. Simpliying conditional per EricWF's suggestion https://reviews.llvm.org/D24314 Files: include/support/win32/support.h Index: include/support/win32/support.h =

Re: [PATCH] D24314: [libc++] Clean up MSVC support

2016-09-07 Thread Shoaib Meenai via cfe-commits
smeenai added inline comments. Comment at: include/support/win32/support.h:48 @@ -47,2 +47,3 @@ #if defined(_LIBCPP_MSVCRT) +#if _VC_CRT_MAJOR_VERSION < 14 #define snprintf _snprintf EricWF wrote: > Maybe fold these to `#if`'s into `#if defined(_VC_CRT_MAJOR_VER

Re: [PATCH] D24314: [libc++] Clean up MSVC support

2016-09-07 Thread Eric Fiselier via cfe-commits
EricWF added a comment. This LGTM but I'll let @compnerd give it the final OK, since I've never built libc++ on windows. Comment at: include/support/win32/support.h:48 @@ -47,2 +47,3 @@ #if defined(_LIBCPP_MSVCRT) +#if _VC_CRT_MAJOR_VERSION < 14 #define snprintf _snprintf ---

[PATCH] D24314: [libc++] Clean up MSVC support

2016-09-07 Thread Shoaib Meenai via cfe-commits
smeenai created this revision. smeenai added reviewers: compnerd, EricWF, mclow.lists. smeenai added a subscriber: cfe-commits. Visual Studio 2013 (CRT version 12) added support for many C99 long long and long double functions. Visual Studio 2015 (CRT version 14) increased C99 and C11 compliance f

Re: [PATCH] D24307: calculate extent size for memory regions allocated by C++ new expression

2016-09-07 Thread Gábor Horváth via cfe-commits
xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1003 @@ +1002,3 @@ +// +ProgramStateRef MallocChecker::addExtentSize(CheckerContext &C, + const CXXNewExpr *NE, zaks.anna wrote:

Re: [PATCH] D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation

2016-09-07 Thread Eric Fiselier via cfe-commits
EricWF added inline comments. Comment at: src/cxa_thread_atexit.cpp:70 @@ +69,3 @@ +while (auto head = dtors) { + dtors = head->next; + head->dtor(head->obj); tavianator wrote: > EricWF wrote: > > There is a bug here. If `head->next == nullptr` and i

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-07 Thread Reid Kleckner via cfe-commits
rnk added a comment. You should locally verify that this generates the correct assembly when optimizations are enabled, and if it doesn't, try to make the input look more like llvm/test/CodeGen/X86/rotate.ll Comment at: test/CodeGen/ms-intrinsics-rotations.c:2 @@ +1,3 @@ +// R

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-07 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:740 @@ +739,3 @@ +Value *LeftShifted = Builder.CreateShl(Val, Shift); +Value *RightShifted = Builder.CreateLShr(Val, RightShift); +Value *Shifted = Builder.CreateOr(LeftShifted, RightShifted); ---

Re: [PATCH] D24307: calculate extent size for memory regions allocated by C++ new expression

2016-09-07 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1003 @@ +1002,3 @@ +// +ProgramStateRef MallocChecker::addExtentSize(CheckerContext &C, + const CXXNewExpr *NE, I am not sure thi

Re: [PATCH] D24243: [clang-move] A prototype tool for moving class definition to new file.

2016-09-07 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: clang-move/ClangMove.cpp:103 @@ +102,3 @@ + const clang::SourceManager *SM) { + // Gets the ending ";". + auto EndLoc = clang::Lexer::getLocForEndOfToken(D->getLocEnd(), 0, *SM, hokein

r280852 - Move CHECK right before the function it describes.

2016-09-07 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Sep 7 15:15:03 2016 New Revision: 280852 URL: http://llvm.org/viewvc/llvm-project?rev=280852&view=rev Log: Move CHECK right before the function it describes. Modified: cfe/trunk/test/CodeGen/overloadable.c Modified: cfe/trunk/test/CodeGen/overloadable.c URL: http://l

Re: [PATCH] D24113: Allow implicit conversions between incompatible pointer types in overload resolution in C.

2016-09-07 Thread George Burgess IV via cfe-commits
Fix committed as r280847 -- thanks for the reports! > It seems to me that we could handle this by ranking viable-but-ill-formed conversion sequences before non-viable ones in clang::isBetterOverloadCandidate That's what I was thinking, too. :) > Clang reports an ambiguity on line 3 TIL. Woohoo

[PATCH] D24312: [CodeGen] Fix an assert in EmitNullConstant

2016-09-07 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: rjmccall. ahatanak added a subscriber: cfe-commits. r235815 changed CGRecordLowering::accumulateBases to ignore non-virtual bases of size 0, which prevented adding those non-virtual bases to CGRecordLayout's NonVirtualBases. EmitNullCons

r280847 - [Sema] Compare bad conversions in overload resolution.

2016-09-07 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Sep 7 15:03:19 2016 New Revision: 280847 URL: http://llvm.org/viewvc/llvm-project?rev=280847&view=rev Log: [Sema] Compare bad conversions in overload resolution. r280553 introduced an issue where we'd emit ambiguity errors for code like: ``` void foo(int *, int); void foo

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-07 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: change-namespace/ChangeNamespace.cpp:125 @@ +124,3 @@ +// applying all existing Replaces first if there is conflict. +void addOrMergeReplacement(const tooling::Replacement &R, + tooling::Replacements *Replaces) {

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-07 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 70588. ioeric marked 9 inline comments as done. ioeric added a comment. Herald added a subscriber: beanz. - Addressed reviewer comments. https://reviews.llvm.org/D24183 Files: CMakeLists.txt change-namespace/CMakeLists.txt change-namespace/ChangeNamesp

[PATCH] D24311: Implement MS _rot intrinsics

2016-09-07 Thread Albert Gutowski via cfe-commits
agutowski created this revision. agutowski added reviewers: rnk, thakis, Prazek, compnerd. agutowski added a subscriber: cfe-commits. https://reviews.llvm.org/D24311 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp lib/Headers/intrin.h test/CodeGen/ms-intrinsics-rotations

r280845 - Add a few more test for []-style uuid attributes.

2016-09-07 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Sep 7 14:41:35 2016 New Revision: 280845 URL: http://llvm.org/viewvc/llvm-project?rev=280845&view=rev Log: Add a few more test for []-style uuid attributes. - Should diag on a function (clang-cl warns; it's an error in cl) - Test the attribute on nested classes (clang-cl i

[clang-tools-extra] r280844 - Fix a few oversights in the clang-tidy VS plugin.

2016-09-07 Thread Zachary Turner via cfe-commits
Author: zturner Date: Wed Sep 7 14:41:19 2016 New Revision: 280844 URL: http://llvm.org/viewvc/llvm-project?rev=280844&view=rev Log: Fix a few oversights in the clang-tidy VS plugin. Over-zealous cleanup of using statements removed some that were actually needed. Also cleaned up a few warnings.

Re: r280728 - Modules: Fix an assertion in DeclContext::buildLookup.

2016-09-07 Thread Manman Ren via cfe-commits
On Tue, Sep 6, 2016 at 6:54 PM, Richard Smith wrote: > On Tue, Sep 6, 2016 at 11:16 AM, Manman Ren via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: mren >> Date: Tue Sep 6 13:16:54 2016 >> New Revision: 280728 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=280728&view=rev

Modules: Suggestion on how to fix a regression caused by r259901

2016-09-07 Thread Manman via cfe-commits
Hi Richard, We noticed a regression for this simple testing case: rm -rf tmp3 clang -cc1 -fimplicit-module-maps -x objective-c -fmodules -fmodules-cache-path=tmp3 -emit-obj standalone.c -I Inputs/ —> standalone.c:4:6: error: variable has incomplete type 'void' void foo __P(()); ^ standalone.

Re: [PATCH] D23932: [XRay] ARM 32-bit no-Thumb support in Clang

2016-09-07 Thread Serge Rogatch via cfe-commits
rSerge added a comment. I don't have commit access rights. Could someone commit? https://reviews.llvm.org/D23932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24268: Traversing template paramter lists of DeclaratorDecls and/or TagDecls.

2016-09-07 Thread Łukasz Anforowicz via cfe-commits
lukasza added a comment. In https://reviews.llvm.org/D24268#535463, @rsmith wrote: > This patch looks great, thank you! Do you have an SVN account or do you need > someone to commit this for you? I don't have an SVN account. Could you please commit the patch for me? https://reviews.llvm.org

Re: [PATCH] D24153: Add bunch of _Interlocked builtins

2016-09-07 Thread David Majnemer via cfe-commits
majnemer added a comment. In https://reviews.llvm.org/D24153#535992, @rnk wrote: > Looks good to me. David, do you remember any subtleties here? I seem to > recall there were some bugs in our intrin.h implementations, or > inconsistencies between us and MSVC. I can't seem to recall anything m

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-07 Thread Alexander Shaposhnikov via cfe-commits
alexshap added inline comments. Comment at: change-namespace/tool/ClangChangeNamespace.cpp:48 @@ +47,3 @@ + +cl::opt OldNamespace("old_namespace", cl::desc("Old namespace."), + cl::cat(ChangeNamespaceCategory)); probably you need t

Re: [PATCH] D24054: Do not validate pch when -fno-validate-pch is set

2016-09-07 Thread Yaxun Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL280842: Do not validate pch when -fno-validate-pch is set (authored by yaxunl). Changed prior to commit: https://reviews.llvm.org/D24054?vs=70569&id=70580#toc Repository: rL LLVM https://reviews.llv

r280842 - Do not validate pch when -fno-validate-pch is set

2016-09-07 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Sep 7 13:40:20 2016 New Revision: 280842 URL: http://llvm.org/viewvc/llvm-project?rev=280842&view=rev Log: Do not validate pch when -fno-validate-pch is set There is a bug causing pch to be validated even though -fno-validate-pch is set. This patch fixes it. ASTReader

Re: [PATCH] D24054: Do not validate pch when -fno-validate-pch is set

2016-09-07 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D24054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

Re: [PATCH] D24054: Do not validate pch when -fno-validate-pch is set

2016-09-07 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. It's pretty gross that we're computing `SuggestedPredefines` in the `ASTReaderListener`, but sure, this seems OK for now. https://reviews.llvm.org/D24054 ___ cfe-commits mailing list cfe-commit

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-07 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a subscriber: alexshap. Comment at: change-namespace/ChangeNamespace.cpp:125 @@ +124,3 @@ +// applying all existing Replaces first if there is conflict. +void addOrMergeReplacement(const tooling::Replacement &R, + tooling::Replacements *Rep

[clang-tools-extra] r280839 - Resubmit "Add a test for clang-tidy using the clang-cl driver."

2016-09-07 Thread Zachary Turner via cfe-commits
Author: zturner Date: Wed Sep 7 13:28:42 2016 New Revision: 280839 URL: http://llvm.org/viewvc/llvm-project?rev=280839&view=rev Log: Resubmit "Add a test for clang-tidy using the clang-cl driver." This was originally reverted because the patch on the clang tooling side was reverted. That patch

Re: [PATCH] D24158: Try contextually converting condition of constexpr if to Boolean value

2016-09-07 Thread Ismail Pazarbasi via cfe-commits
ismailp added inline comments. Comment at: test/CodeGenCXX/cxx1z-constexpr-if.cpp:2 @@ -1,2 +1,3 @@ // RUN: %clang_cc1 -std=c++1z %s -emit-llvm -o - | FileCheck %s --implicit-check-not=should_not_be_used +// RUN: %clang_cc1 -std=c++1z %s -DCHECK_CONVERSION -verify %s -

Re: [PATCH] D23848: Add a clang-tidy Visual Studio extension

2016-09-07 Thread Zachary Turner via cfe-commits
The unnecessary usings are added by Visual Studio, so I would rather leave them. For example, they often provide extension methods to containers so that containers can be used with functional paradigms, and you expect to see those methods in the Intellisense window when you type "Foo.", but withou

Re: [PATCH] D24158: Try contextually converting condition of constexpr if to Boolean value

2016-09-07 Thread Ismail Pazarbasi via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL280838: Try contextually converting condition of constexpr if to Boolean value (authored by ismailp). Changed prior to commit: https://reviews.llvm.org/D24158?vs=70561&id=70577#toc Repository: rL LLV

r280838 - Try contextually converting condition of constexpr if to Boolean value

2016-09-07 Thread Ismail Pazarbasi via cfe-commits
Author: ismailp Date: Wed Sep 7 13:24:54 2016 New Revision: 280838 URL: http://llvm.org/viewvc/llvm-project?rev=280838&view=rev Log: Try contextually converting condition of constexpr if to Boolean value Summary: C++1z 6.4.1/p2: If the if statement is of the form if constexpr, the value of the

r280836 - [MS] Fix prologue this adjustment when 'this' is passed indirectly

2016-09-07 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Sep 7 13:21:30 2016 New Revision: 280836 URL: http://llvm.org/viewvc/llvm-project?rev=280836&view=rev Log: [MS] Fix prologue this adjustment when 'this' is passed indirectly Move the logic for doing this from the ABI argument lowering into EmitParmDecl, which runs for all p

Re: [PATCH] D24153: Add bunch of _Interlocked builtins

2016-09-07 Thread Albert Gutowski via cfe-commits
agutowski marked an inline comment as done. agutowski added a comment. https://reviews.llvm.org/D24153 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24153: Add bunch of _Interlocked builtins

2016-09-07 Thread Albert Gutowski via cfe-commits
agutowski updated this revision to Diff 70572. agutowski added a comment. Mark _InterlockedIncrement and _InterlockedDecrement as non-volatile https://reviews.llvm.org/D24153 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp lib/Headers/intrin.h test/CodeGen/ms-intrinsic

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-07 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: change-namespace/ChangeNamespace.cpp:21 @@ +20,3 @@ +inline std::string formatNamespace(llvm::StringRef NS) { + (void)NS.ltrim(':'); + return NS.str(); hokein wrote: > this statement doesn't do the intended thing (It won

Re: [PATCH] D24054: Do not validate pch when -fno-validate-pch is set

2016-09-07 Thread Yaxun Liu via cfe-commits
yaxunl updated the summary for this revision. yaxunl updated this revision to Diff 70569. yaxunl added a comment. Herald added a subscriber: wdng. Implemented a simple AST reader listener to replace PCHValidator. Added a test. https://reviews.llvm.org/D24054 Files: include/clang/Serialization

Re: [PATCH] D24113: Allow implicit conversions between incompatible pointer types in overload resolution in C.

2016-09-07 Thread Richard Smith via cfe-commits
On Tue, Sep 6, 2016 at 10:55 PM, George Burgess IV < george.burgess...@gmail.com> wrote: > george.burgess.iv added a comment. > > > Although I think that users will expect atomic_add(unsigned int *, 5) to > work.without error > > > Totally agree; I was just making sure that I understood the proble

[PATCH] D24307: calculate extent size for memory regions allocated by C++ new expression

2016-09-07 Thread Daniel Krupp via cfe-commits
dkrupp created this revision. dkrupp added reviewers: xazax.hun, NoQ, dcoughlin, zaks.anna. dkrupp added a subscriber: cfe-commits. ArrayBoundChecker did not detect out of bounds memory access errors in case an array was allocated by the new expression. 1. MallocChecker.cpp was updated to calcu

Re: [PATCH] D24158: Try contextually converting condition of constexpr if to Boolean value

2016-09-07 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: test/CodeGenCXX/cxx1z-constexpr-if.cpp:2 @@ -1,2 +1,3 @@ // RUN: %clang_cc1 -std=c++1z %s -emit-llvm -o - | FileCheck %s --implicit-check-not=should_not_be_used +// RUN: %clang_cc1 -std=c++1z %s -DCHECK_CONVERSION -verify %s --

r280828 - [clang-offload-bundler] Fix some Clang-tidy modernize-use-override and Include What You Use warnings; other minor fixes.

2016-09-07 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Wed Sep 7 12:37:28 2016 New Revision: 280828 URL: http://llvm.org/viewvc/llvm-project?rev=280828&view=rev Log: [clang-offload-bundler] Fix some Clang-tidy modernize-use-override and Include What You Use warnings; other minor fixes. Differential revision: https://revi

Re: [PATCH] D24165: [clang-offload-bundler] Fix some Clang-tidy modernize-use-override and Include What You Use warnings; other minor fixes

2016-09-07 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL280828: [clang-offload-bundler] Fix some Clang-tidy modernize-use-override and… (authored by eugenezelenko). Changed prior to commit: https://reviews.llvm.org/D24165?vs=70084&id=70564#toc Repository:

Re: [PATCH] D24158: Try contextually converting condition of constexpr if to Boolean value

2016-09-07 Thread Ismail Pazarbasi via cfe-commits
ismailp added a comment. Thank you for reviewing. Sure, I'll try to look into those conversions as well. Comment at: test/CodeGenCXX/cxx1z-constexpr-if.cpp:2 @@ -1,2 +1,3 @@ // RUN: %clang_cc1 -std=c++1z %s -emit-llvm -o - | FileCheck %s --implicit-check-not=should_not_be_use

r280827 - Add missing include. White space.

2016-09-07 Thread Vassil Vassilev via cfe-commits
Author: vvassilev Date: Wed Sep 7 12:30:50 2016 New Revision: 280827 URL: http://llvm.org/viewvc/llvm-project?rev=280827&view=rev Log: Add missing include. White space. Modified: cfe/trunk/include/clang/Lex/ModuleMap.h Modified: cfe/trunk/include/clang/Lex/ModuleMap.h URL: http://llvm.org

Re: [PATCH] D24158: Try contextually converting condition of constexpr if to Boolean value

2016-09-07 Thread Ismail Pazarbasi via cfe-commits
ismailp updated this revision to Diff 70561. ismailp added a comment. - Added more tests https://reviews.llvm.org/D24158 Files: lib/Sema/SemaOverload.cpp test/CodeGenCXX/cxx1z-constexpr-if.cpp Index: test/CodeGenCXX/cxx1z-constexpr-if.cpp ===

Re: [PATCH] D24235: [OpenCL] Improve double literal handling

2016-09-07 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExpr.cpp:832 @@ -831,2 +831,3 @@ BTy->getKind() == BuiltinType::Float)) -E = ImpCastExprToType(E, Context.DoubleTy, CK_FloatingCast).get(); + { +if (getLangOpts().OpenCL && This shou

Re: [PATCH] D24286: Add MS __nop intrinsic to intrin.h

2016-09-07 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL280826: Add MS __nop intrinsic to intrin.h (authored by rnk). Changed prior to commit: https://reviews.llvm.org/D24286?vs=70495&id=70555#toc Repository: rL LLVM https://reviews.llvm.org/D24286 Files

r280826 - Add MS __nop intrinsic to intrin.h

2016-09-07 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Sep 7 11:55:12 2016 New Revision: 280826 URL: http://llvm.org/viewvc/llvm-project?rev=280826&view=rev Log: Add MS __nop intrinsic to intrin.h Summary: There was no definition for __nop function - added inline assembly. Patch by Albert Gutowski! Reviewers: rnk, thakis Sub

Re: [PATCH] D24153: Add bunch of _Interlocked builtins

2016-09-07 Thread Reid Kleckner via cfe-commits
rnk added a comment. Looks good to me. David, do you remember any subtleties here? I seem to recall there were some bugs in our intrin.h implementations, or inconsistencies between us and MSVC. Comment at: test/CodeGen/ms-intrinsics.c:297 @@ +296,3 @@ +// CHECK: define{{.*}}i1

Re: [PATCH] D23944: Parsing MS pragma intrinsic

2016-09-07 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL280825: Parsing MS pragma intrinsic (authored by rnk). Changed prior to commit: https://reviews.llvm.org/D23944?vs=69768&id=70551#toc Repository: rL LLVM https://reviews.llvm.org/D23944 Files: cfe

r280825 - Parsing MS pragma intrinsic

2016-09-07 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Sep 7 11:38:32 2016 New Revision: 280825 URL: http://llvm.org/viewvc/llvm-project?rev=280825&view=rev Log: Parsing MS pragma intrinsic Parse pragma intrinsic, display warning if the function isn't a builtin function in clang and suggest including intrin.h. Patch by Albert

Re: [PATCH] D24075: [include-fixer] Support finding headers for the symbol under cursor.

2016-09-07 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. hokein marked an inline comment as done. Closed by commit rL280824: [include-fixer] Support finding headers for the symbol under cursor. (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D24075?vs=70

[clang-tools-extra] r280824 - [include-fixer] Support finding headers for the symbol under cursor.

2016-09-07 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Sep 7 11:34:35 2016 New Revision: 280824 URL: http://llvm.org/viewvc/llvm-project?rev=280824&view=rev Log: [include-fixer] Support finding headers for the symbol under cursor. Summary: * Add a `query-symbol` option to query symbol without parsing the source file. * Updat

Re: [PATCH] D23284: Add -fdiagnostics-show-hotness

2016-09-07 Thread Adam Nemet via cfe-commits
anemet updated this revision to Diff 70547. anemet updated the summary for this revision. anemet added a comment. Address Richard's comment https://reviews.llvm.org/D23284 Files: docs/UsersManual.rst include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td include/cl

Re: [PATCH] D23284: Add -fdiagnostics-show-hotness

2016-09-07 Thread Adam Nemet via cfe-commits
anemet marked an inline comment as done. anemet added a comment. https://reviews.llvm.org/D23284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24075: [include-fixer] Support finding headers for the symbol under cursor.

2016-09-07 Thread Jens Massberg via cfe-commits
massberg added a comment. The Emacs part looks good for me now. Comment at: include-fixer/tool/clang-include-fixer.el:204 @@ -197,3 +203,3 @@ (message (concat "Calling the include fixer. " "This might take some seconds. Please wait.")) Then it f

Re: [PATCH] D24075: [include-fixer] Support finding headers for the symbol under cursor.

2016-09-07 Thread Haojian Wu via cfe-commits
hokein marked an inline comment as done. Comment at: include-fixer/tool/clang-include-fixer.el:204 @@ -197,3 +203,3 @@ (message (concat "Calling the include fixer. " "This might take some seconds. Please wait.")) massberg wrote: > Is this message

  1   2   >