[PATCH] D26922: [ObjC++] Don't enter a C++ declarator context when the current context is an Objective-C declaration

2016-11-29 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Yes, I meant ParseDecl:5266. Reading the comment in ShouldEnterDeclaratorScope, it seemed to me that it shouldn't return true in this context (when parsing an objective-c). Also, the following code (which is not valid) crashes with ToT trunk, @property (nonatomic) i

[PATCH] D27207: Adds hasUnqualifiedDesugaredType to allow matching through type sugar.

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. hasUnqualifiedDesugaredType(hasDeclaration( How about using hasUnqualifiedDesugaredType(recordType(hasDeclaration instead? https://reviews.llvm.org/D27207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-29 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: include/clang/Sema/Sema.h:7494 + /// \brief Make an existing DLL attribute on a class take effect. + void ActOnDLLAttr(ClassTemplateSpecializationDecl *Def, hans wrote: > Nit: I think `///` implies `\brief`, so we do

[PATCH] D27248: [clang-tidy] Do not trigger unnecessary-value-param check on methods marked as final

2016-11-29 Thread Felix Berger via Phabricator via cfe-commits
flx created this revision. flx added reviewers: sbenza, alexfh, hokein. flx added a subscriber: cfe-commits. flx set the repository for this revision to rL LLVM. flx added a project: clang-tools-extra. Herald added a subscriber: JDevlieghere. Virtual method overrides of dependent types cannot be r

r288231 - Prospective GCC build fix: the unelaborated form of this friend

2016-11-29 Thread John McCall via cfe-commits
Author: rjmccall Date: Tue Nov 29 22:18:19 2016 New Revision: 288231 URL: http://llvm.org/viewvc/llvm-project?rev=288231&view=rev Log: Prospective GCC build fix: the unelaborated form of this friend declaration should find the right type, assuming it's supported evenly across all our hosts. Modif

r288230 - make -fprofile-instr-generate and -fprofile-instr-use work with clang-cl

2016-11-29 Thread Bob Haarman via cfe-commits
Author: inglorion Date: Tue Nov 29 21:25:36 2016 New Revision: 288230 URL: http://llvm.org/viewvc/llvm-project?rev=288230&view=rev Log: make -fprofile-instr-generate and -fprofile-instr-use work with clang-cl Summary: Makes -fprofile-instr-generate and -fprofile-instr-use work with clang-cl so th

[PATCH] D27180: Testbed and skeleton of a new expression parser

2016-11-29 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Thanks for working on this! I'm happy with the direction of this patch. It makes sense that clang would have a tool to help test AST reconstruction from 'external' sources. As you pointed out, it provides a good avenue for clients of the clang AST's to get better test cover

[PATCH] D27091: Add the way to extract SVals of arguments used in a call for a given StackFrameCtx

2016-11-29 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Hi! Looks like this this is used by the Infinite recursion checker. Specifically, the checker not only needs to get Smalls for arguments of the current CallEvent, but it also looks for arguments of other calls on the stack. The checker walks the LocationContext and u

[PATCH] D27084: [OpenMP] Sema and parsing for 'teams distribute parallel for simd' pragma

2016-11-29 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 marked 2 inline comments as done. kkwli0 added inline comments. Comment at: test/OpenMP/nesting_of_regions.cpp:3326 } -#pragma omp ordered { ABataev wrote: > what about teams distribute parallel for simd inside the ordered directive? > Why this one

r288227 - Fix -Winconsistent-missing-override in CodeGenAction.cpp

2016-11-29 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Nov 29 19:32:53 2016 New Revision: 288227 URL: http://llvm.org/viewvc/llvm-project?rev=288227&view=rev Log: Fix -Winconsistent-missing-override in CodeGenAction.cpp Modified: cfe/trunk/lib/CodeGen/CodeGenAction.cpp Modified: cfe/trunk/lib/CodeGen/CodeGenAction.cpp URL:

[PATCH] D27226: [MS ABI] Implement more of the Itanium mangling rules

2016-11-29 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: test/CodeGenCXX/mangle-ms-cxx11.cpp:337 +A a; +} This machinery is also supposed to kick in for lambdas in default arguments, right? Can you add that test case? https://reviews.llvm.org/D27226 _

Re: r288207 - Don't try to merge DLL attributes on redeclaration of invalid decl (PR31069)

2016-11-29 Thread Hans Wennborg via cfe-commits
On Tue, Nov 29, 2016 at 4:37 PM, David Majnemer via cfe-commits wrote: > > > On Tue, Nov 29, 2016 at 2:31 PM, Hans Wennborg via cfe-commits > wrote: >> >> Author: hans >> Date: Tue Nov 29 16:31:00 2016 >> New Revision: 288207 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=288207&view=rev >> L

r288223 - Fix formatting issue from r288207

2016-11-29 Thread Hans Wennborg via cfe-commits
Author: hans Date: Tue Nov 29 18:31:39 2016 New Revision: 288223 URL: http://llvm.org/viewvc/llvm-project?rev=288223&view=rev Log: Fix formatting issue from r288207 Modified: cfe/trunk/lib/Sema/SemaDecl.cpp Modified: cfe/trunk/lib/Sema/SemaDecl.cpp URL: http://llvm.org/viewvc/llvm-project/c

r288222 - Give this test that uses Itanium mangling a triple

2016-11-29 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Nov 29 18:31:16 2016 New Revision: 288222 URL: http://llvm.org/viewvc/llvm-project?rev=288222&view=rev Log: Give this test that uses Itanium mangling a triple Modified: cfe/trunk/test/Frontend/plugin-vs-debug-info.cpp Modified: cfe/trunk/test/Frontend/plugin-vs-debug-in

Re: r288207 - Don't try to merge DLL attributes on redeclaration of invalid decl (PR31069)

2016-11-29 Thread David Majnemer via cfe-commits
On Tue, Nov 29, 2016 at 2:31 PM, Hans Wennborg via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: hans > Date: Tue Nov 29 16:31:00 2016 > New Revision: 288207 > > URL: http://llvm.org/viewvc/llvm-project?rev=288207&view=rev > Log: > Don't try to merge DLL attributes on redeclaration of

r288221 - Stop handling interesting deserialized decls after HandleTranslationUnit

2016-11-29 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Nov 29 18:25:36 2016 New Revision: 288221 URL: http://llvm.org/viewvc/llvm-project?rev=288221&view=rev Log: Stop handling interesting deserialized decls after HandleTranslationUnit Other AST consumers can deserialize interesting decls that we might codegen, but they won't ma

r288220 - [c++1z] Improve support for -fno-exceptions: we can't just ignore exception

2016-11-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Nov 29 18:13:55 2016 New Revision: 288220 URL: http://llvm.org/viewvc/llvm-project?rev=288220&view=rev Log: [c++1z] Improve support for -fno-exceptions: we can't just ignore exception specifications in this mode in C++17, since they're part of the function type, so check a

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-29 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: include/clang/Sema/Sema.h:7495 + /// \brief Make an existing DLL attribute on a class take effect. + void ActOnDLLAttr(ClassTemplateSpecializationDecl *Def, +InheritableAttr *Attr); hans wrote: > I'd s

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-29 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Apologies for the delay. I was out last week. In https://reviews.llvm.org/D26657#602083, @smeenai wrote: > General coding style question. Over here, I'm creating a local helper > function. However, that helper needs to access member functions of Sema, > which is why I mad

r288213 - Fix some Clang-tidy and Include What You Use warnings; other minor fixes (NFC).

2016-11-29 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Tue Nov 29 16:44:24 2016 New Revision: 288213 URL: http://llvm.org/viewvc/llvm-project?rev=288213&view=rev Log: Fix some Clang-tidy and Include What You Use warnings; other minor fixes (NFC). This preparation to remove SetVector.h dependency on SmallSet.h. Modified:

r288208 - [c++1z] PR31210: ignore exception specification when matching the type of a

2016-11-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Nov 29 16:32:05 2016 New Revision: 288208 URL: http://llvm.org/viewvc/llvm-project?rev=288208&view=rev Log: [c++1z] PR31210: ignore exception specification when matching the type of a builtin with the type of an explicit declaration of the same function. Modified: cfe

r288207 - Don't try to merge DLL attributes on redeclaration of invalid decl (PR31069)

2016-11-29 Thread Hans Wennborg via cfe-commits
Author: hans Date: Tue Nov 29 16:31:00 2016 New Revision: 288207 URL: http://llvm.org/viewvc/llvm-project?rev=288207&view=rev Log: Don't try to merge DLL attributes on redeclaration of invalid decl (PR31069) Modified: cfe/trunk/lib/Sema/SemaDecl.cpp cfe/trunk/test/Sema/dllimport.c Modifi

[PATCH] D27207: Adds hasUnqualifiedDesugaredType to allow matching through type sugar.

2016-11-29 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza added inline comments. Comment at: unittests/ASTMatchers/ASTMatchersTraversalTest.cpp:253 + matches("struct A {}; using B = A; B b;", + varDecl(hasType(hasUnqualifiedDesugaredType(recordType()); +} # deep testing suggestion If we do

[PATCH] D27207: Adds hasUnqualifiedDesugaredType to allow matching through type sugar.

2016-11-29 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D27207#608433, @lukasza wrote: > I think the above will work for my tool - thank you for providing the matcher > example (for some reason I incorrectly thought that desugaring would only be > done one step a time - this made me think

[PATCH] D27207: Adds hasUnqualifiedDesugaredType to allow matching through type sugar.

2016-11-29 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza added a comment. I've tried replicating the deep-matching by saying qualType(hasType(hasUnqualifiedDesugaredType(hasDeclaration(... but this doesn't work because hasDeclaration only returns a matcher for a specific type from a subset of subclasses of Type - this is incompatible with exp

r288203 - getObjCEncodingForMethodDecl cannot fail. Simplify. NFC.

2016-11-29 Thread John McCall via cfe-commits
Author: rjmccall Date: Tue Nov 29 15:57:00 2016 New Revision: 288203 URL: http://llvm.org/viewvc/llvm-project?rev=288203&view=rev Log: getObjCEncodingForMethodDecl cannot fail. Simplify. NFC. Modified: cfe/trunk/include/clang/AST/ASTContext.h cfe/trunk/lib/AST/ASTContext.cpp cfe/tru

[PATCH] D27104: Unify and simplify the behavior of the hasDeclaration matcher.

2016-11-29 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza added a comment. Do we also need to update the documentation (e.g. to say that ElaboratedType is covered by hasDeclaration)? Other than that, I think this CL LGTM, although I would like to have a specific, working equivalent of the old, deep-maching hasDeclaration (at least when the in

Re: Embedded Bitcode in Object Files

2016-11-29 Thread Steven Wu via cfe-commits
Thanks for reviewing the patches. And yes, 3 and 4 are no longer useful. I am seeking better alternatives to achieve them. Steven > On Nov 30, 2016, at 1:35 AM, Nico Weber wrote: > > It looks like patches 1 and 2 made it but 3 and 4 didn't. Do you no longer > need them? > >> On Mon, Feb 29

[PATCH] D25435: Add -femit-accurate-debug-info to emit more debug info for sample pgo profile collection

2016-11-29 Thread Greg Bedwell via Phabricator via cfe-commits
gbedwell added a comment. In https://reviews.llvm.org/D25435#608348, @danielcdh wrote: > Change the flag to -fprof-debug, which is more concise. The flag name is > still open for discussion. Well, since I have permission to bikeshed... :) I'd prefer to have 'profile' rather than 'prof' in the

[PATCH] D27226: [MS ABI] Implement more of the Itanium mangling rules

2016-11-29 Thread David Majnemer via Phabricator via cfe-commits
majnemer created this revision. majnemer added a reviewer: rnk. majnemer added a subscriber: cfe-commits. We didn't implement one of the corner cases: a lambda which belongs to an initializer for a field. In this case, we need to mangle the field name into the lambda. This fixes PR31197. https

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-11-29 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 79632. malcolm.parsons added a comment. Add to release notes https://reviews.llvm.org/D27166 Files: clang-tidy/modernize/UseAutoCheck.cpp docs/ReleaseNotes.rst docs/clang-tidy/checks/modernize-use-auto.rst test/clang-tidy/modernize-use-auto-

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-11-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D27166#608339, @malcolm.parsons wrote: > In https://reviews.llvm.org/D27166#606772, @Eugene.Zelenko wrote: > > > It'll be worth to mention enhancement in Release Notes. > > > They already say this: > > - The `modernize-use-auto >

[PATCH] D25435: Add -femit-accurate-debug-info to emit more debug info for sample pgo profile collection

2016-11-29 Thread Dehao Chen via Phabricator via cfe-commits
danielcdh updated this revision to Diff 79629. danielcdh marked an inline comment as done. danielcdh added a comment. Change the flag to -fprof-debug, which is more concise. The flag name is still open for discussion. https://reviews.llvm.org/D25435 Files: include/clang/Driver/Options.td i

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-11-29 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons marked an inline comment as done. malcolm.parsons added a comment. In https://reviews.llvm.org/D27166#606772, @Eugene.Zelenko wrote: > It'll be worth to mention enhancement in Release Notes. They already say this: - The `modernize-use-auto

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-11-29 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 79627. malcolm.parsons added a comment. Handle templated member functions too. https://reviews.llvm.org/D27166 Files: clang-tidy/modernize/UseAutoCheck.cpp docs/clang-tidy/checks/modernize-use-auto.rst test/clang-tidy/modernize-use-auto-cast-r

[PATCH] D26979: Do not hard-code locale data in unit tests: get it from the OS instead

2016-11-29 Thread Eric van Gyzen via Phabricator via cfe-commits
vangyzen added a comment. @EricWF Do you have time and interest to review this again? https://reviews.llvm.org/D26979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-11-29 Thread Mads Ravn via Phabricator via cfe-commits
madsravn updated this revision to Diff 79624. madsravn added a comment. Updated per comments https://reviews.llvm.org/D27210 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/StringCompareCheck.cpp clang-tidy/misc/StringCompareCheck.h docs/Releas

[PATCH] D26920: [libc++] Add validation to Stage 2 of num_get

2016-11-29 Thread Eric van Gyzen via Phabricator via cfe-commits
vangyzen updated this revision to Diff 79625. vangyzen added a comment. Herald added a subscriber: emaste. Restore support for a sign character preceding a "nan" I accidentally broke +nan and -nan. Add unit test cases for these, and update my change to support them. https://reviews.llvm.org/D2

r288197 - Don't declare IsEnumDeclComplete as extern

2016-11-29 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Nov 29 14:46:24 2016 New Revision: 288197 URL: http://llvm.org/viewvc/llvm-project?rev=288197&view=rev Log: Don't declare IsEnumDeclComplete as extern Otherwise MSVC and clang-cl will see "extern inline" after merging redeclarations and emit it in all TUs that include Type.h

Re: Upgrade and fix clang-format-vs

2016-11-29 Thread Hans Wennborg via cfe-commits
On Tue, Nov 29, 2016 at 12:01 PM, Antonio Maiorano wrote: > On Tue, 29 Nov 2016 at 13:42 Hans Wennborg wrote: >> >> Very nice! I've tried this out and confirmed that the built plugin >> also works with older Visual Studio versions. >> >> Some comments below: >> >> > --- /dev/null >> > +++ b/tools

[PATCH] D27049: [OpenCL] Refactor out ReadPipe/WritePipe

2016-11-29 Thread Yaron Keren via Phabricator via cfe-commits
yaron.keren accepted this revision. yaron.keren added a comment. This revision is now accepted and ready to land. LGTM after fixing the inline comment Comment at: lib/Serialization/ASTReader.cpp:5804 QualType ElementType = readType(*Loc.F, Record, Idx); -return Context

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-11-29 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. Please run clang-format on all new files. Comment at: test/clang-tidy/misc-string-compare.cpp:3 + +#include + clang-tidy tests don't #include system headers. Declare the bits you need instead. See test/clang-tidy/misc-string-co

r288193 - Support constant expression evaluation for wchar_t versions of simple string

2016-11-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Nov 29 13:45:17 2016 New Revision: 288193 URL: http://llvm.org/viewvc/llvm-project?rev=288193&view=rev Log: Support constant expression evaluation for wchar_t versions of simple string functions, in order to support constexpr std::char_traits. Modified: cfe/trunk/incl

[PATCH] D21695: [clang] Version support for UBSan handlers

2016-11-29 Thread Vedant Kumar via Phabricator via cfe-commits
vsk accepted this revision. vsk added a reviewer: vsk. vsk added a comment. This revision is now accepted and ready to land. Thanks for working on this. LGTM with a nit. Comment at: lib/CodeGen/CGExpr.cpp:2506 + assert(CheckHandler >= 0 && + CheckHandler < sizeof(Sanit

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-11-29 Thread Mads Ravn via Phabricator via cfe-commits
madsravn removed rL LLVM as the repository for this revision. madsravn updated this revision to Diff 79610. madsravn added a comment. Updated the patch to include changes suggested by comments. https://reviews.llvm.org/D27210 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscStringC

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-11-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Comment at: docs/clang-tidy/checks/misc-string-compare.rst:8 + +A common mistake is to use the string's compare method instead of using the +equality or inequality opera

[PATCH] D27180: Testbed and skeleton of a new expression parser

2016-11-29 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 79605. spyffe marked 2 inline comments as done. spyffe added a comment. Updated to reflect Aleksei's comments. Repository: rL LLVM https://reviews.llvm.org/D27180 Files: test/Import/empty-struct/Inputs/S.c test/Import/empty-struct/test.c tools/CMake

[PATCH] D27180: Testbed and skeleton of a new expression parser

2016-11-29 Thread Sean Callanan via Phabricator via cfe-commits
spyffe marked 11 inline comments as done. spyffe added a comment. Thank you, Alex! I've responded in a few places inline below, and will update this patch momentarily. Comment at: tools/clang-import-test/clang-import-test.cpp:106 + +const char *LineEnd = nullptr; + --

Re: Upgrade and fix clang-format-vs

2016-11-29 Thread Hans Wennborg via cfe-commits
Very nice! I've tried this out and confirmed that the built plugin also works with older Visual Studio versions. Some comments below: > --- /dev/null > +++ b/tools/clang-format-vs/.gitignore > @@ -0,0 +1,11 @@ > +# Visual Studio files > +.vs/ > +/packages/ > +/ClangFormat/obj/ > +/ClangFormat/bin

[clang-tools-extra] r288175 - Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC).

2016-11-29 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Tue Nov 29 12:24:01 2016 New Revision: 288175 URL: http://llvm.org/viewvc/llvm-project?rev=288175&view=rev Log: Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC). This preparation to remove SetVector.h dependency on S

[PATCH] D21695: [clang] Version support for UBSan handlers

2016-11-29 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Ping! https://reviews.llvm.org/D21695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27180: Testbed and skeleton of a new expression parser

2016-11-29 Thread Sean Callanan via Phabricator via cfe-commits
spyffe added a comment. In https://reviews.llvm.org/D27180#607433, @hfinkel wrote: > This seems like a great idea. btw, do you know about Cling > (https://root.cern.ch/cling)? Hal, thank you for your interest! Yes, Cling is what I was referring to when I mentioned the ROOT project. Vassil V

[PATCH] D26916: [ObjC] Avoid a @try/@finally/@autoreleasepool fixit when parsing an expression

2016-11-29 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Thanks for the explanation, LGTM Repository: rL LLVM https://reviews.llvm.org/D26916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D27033: [ASTImporter] Support importing UnresolvedLookupExpr nodes

2016-11-29 Thread Sean Callanan via Phabricator via cfe-commits
spyffe added a comment. Marked the place I was talking about in D27181 Comment at: lib/AST/ASTImporter.cpp:6489 + DeclarationNameInfo NameInfo(E->getName(), E->getNameLoc()); + ImportDeclarationNameLoc(E->getNameInfo(), NameInfo); + -

[PATCH] D27181: [ASTImporter] Support for importing UsingDecl and UsingShadowDecl

2016-11-29 Thread Sean Callanan via Phabricator via cfe-commits
spyffe added a comment. Looks good, but I have a concern about the underlying branch's apparently inconsistent initialization of `DeclarationNameInfo`. Aleksei, could you clarify how that code works? Should we have a helper function so we don't have to carefully repeat this pattern everywhere

[PATCH] D26991: Remove unused code

2016-11-29 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added inline comments. Comment at: libcxx/include/algorithm:1499 +// Load the first element from __first2 outside the loop because it is loop invariant +typename iterator_traits<_RandomAccessIterator1>::value_type __firstElement2 = *__first2; + ---

Re: Embedded Bitcode in Object Files

2016-11-29 Thread Nico Weber via cfe-commits
It looks like patches 1 and 2 made it but 3 and 4 didn't. Do you no longer need them? On Mon, Feb 29, 2016 at 2:08 PM, Steven Wu via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Ping. I don't know who is the best review for the patches. Thanks for > Rafael looking at the LLVM change. Richa

[libcxx] r288165 - Protect std::array tests under noexceptions

2016-11-29 Thread Roger Ferrer Ibanez via cfe-commits
Author: rogfer01 Date: Tue Nov 29 11:10:29 2016 New Revision: 288165 URL: http://llvm.org/viewvc/llvm-project?rev=288165&view=rev Log: Protect std::array tests under noexceptions Skip tests that expect exceptions be thrown. Also add missing asserts. Differential Revision: https://reviews.llvm.or

[PATCH] D27095: Protect std::array tests under noexceptions

2016-11-29 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288165: Protect std::array tests under noexceptions (authored by rogfer01). Changed prior to commit: https://reviews.llvm.org/D27095?vs=79589&id=79591#toc Repository: rL LLVM https://reviews.llvm.or

[PATCH] D26960: [docs] Use x86_64 and i386 instead of x86 as arch for triples.

2016-11-29 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Ping. This is a two-line documentation fix, but I want to make sure x86_64 and i386 are valid for arch in target triples in all cases. https://reviews.llvm.org/D26960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D27095: Protect std::array tests under noexceptions

2016-11-29 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 updated this revision to Diff 79589. rogfer01 added a comment. Add missing assertions in the original test. https://reviews.llvm.org/D27095 Files: test/std/containers/sequences/array/at.pass.cpp Index: test/std/containers/sequences/array/at.pass.cpp

r288163 - [OpenCL] Prevent generation of globals in non-constant AS for OpenCL.

2016-11-29 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Tue Nov 29 11:01:19 2016 New Revision: 288163 URL: http://llvm.org/viewvc/llvm-project?rev=288163&view=rev Log: [OpenCL] Prevent generation of globals in non-constant AS for OpenCL. Avoid using shortcut for const qualified non-constant address space aggregate variables while

[PATCH] D27181: [ASTImporter] Support for importing UsingDecl and UsingShadowDecl

2016-11-29 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Thank you Kareem, It looks mostly good, but I'd like to have some functional tests in ASTMerge for this patch. Comment at: lib/AST/ASTImporter.cpp:4299 + if (ImportDeclParts(D, DC, LexicalDC, Name, AlreadyImported, Loc)) +return NULL; + assert(

[PATCH] D27180: Testbed and skeleton of a new expression parser

2016-11-29 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. That's excellent. Thank you for this work, Sean! Comment at: tools/clang-import-test/CMakeLists.txt:19 + ) \ No newline at end of file Please add a newline here. Comment at: tools/clang-import-test/clang-import-te

[PATCH] D26612: Protect std::string tests under libcpp-no-exceptions

2016-11-29 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288158: Protect std::string tests under libcpp-no-exceptions (authored by rogfer01). Changed prior to commit: https://reviews.llvm.org/D26612?vs=78012&id=79583#toc Repository: rL LLVM https://review

[libcxx] r288158 - Protect std::string tests under libcpp-no-exceptions

2016-11-29 Thread Roger Ferrer Ibanez via cfe-commits
Author: rogfer01 Date: Tue Nov 29 10:40:19 2016 New Revision: 288158 URL: http://llvm.org/viewvc/llvm-project?rev=288158&view=rev Log: Protect std::string tests under libcpp-no-exceptions Skip tests that expect an exception be thrown and/or disable unreachable catch handlers. Differential Revisi

[PATCH] D27096: Protect locale tests under noexceptions

2016-11-29 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288156: Protect locale tests under noexceptions (authored by rogfer01). Changed prior to commit: https://reviews.llvm.org/D27096?vs=79219&id=79581#toc Repository: rL LLVM https://reviews.llvm.org/D2

[libcxx] r288156 - Protect locale tests under noexceptions

2016-11-29 Thread Roger Ferrer Ibanez via cfe-commits
Author: rogfer01 Date: Tue Nov 29 10:31:40 2016 New Revision: 288156 URL: http://llvm.org/viewvc/llvm-project?rev=288156&view=rev Log: Protect locale tests under noexceptions Skip tests that expect exceptions be thrown. Differential Revision: https://reviews.llvm.org/D27096 Modified: libc

[PATCH] D27093: Protect std::{, unordered_}map tests under noexceptions

2016-11-29 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288157: Protect std::{,unordered_}map tests under noexceptions (authored by rogfer01). Changed prior to commit: https://reviews.llvm.org/D27093?vs=79212&id=79582#toc Repository: rL LLVM https://revi

[libcxx] r288157 - Protect std::{, unordered_}map tests under noexceptions

2016-11-29 Thread Roger Ferrer Ibanez via cfe-commits
Author: rogfer01 Date: Tue Nov 29 10:37:48 2016 New Revision: 288157 URL: http://llvm.org/viewvc/llvm-project?rev=288157&view=rev Log: Protect std::{,unordered_}map tests under noexceptions Skip tests that use exceptions Differential Revision: https://reviews.llvm.org/D27093 Modified: libc

[libcxx] r288155 - Protect test for dynarray under libcpp-no-exceptions

2016-11-29 Thread Roger Ferrer Ibanez via cfe-commits
Author: rogfer01 Date: Tue Nov 29 10:27:45 2016 New Revision: 288155 URL: http://llvm.org/viewvc/llvm-project?rev=288155&view=rev Log: Protect test for dynarray under libcpp-no-exceptions This test expects an exception be thrown. Differential Revision: https://reviews.llvm.org/D26611 Modified:

[PATCH] D26611: Protect test for dynarray under libcpp-no-exceptions

2016-11-29 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288155: Protect test for dynarray under libcpp-no-exceptions (authored by rogfer01). Changed prior to commit: https://reviews.llvm.org/D26611?vs=77809&id=79580#toc Repository: rL LLVM https://review

[PATCH] D27214: [ObjC] Encode type arguments in property information string constants

2016-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: rjmccall, ahatanak. arphaman added a subscriber: cfe-commits. arphaman set the repository for this revision to rL LLVM. This patch ensures that Objective-C type arguments are included in the string constants that have encoded information a

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-11-29 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. I think you could add fixits for this. Comment at: clang-tidy/misc/MiscStringCompareCheck.cpp:48 + Finder->addMatcher(ifStmt(hasCondition(binaryOperator(hasOperatorName("=="), +hasLHS(strC

[PATCH] D27187: [clang-tidy] Do not move parameter if only DeclRefExpr occurs inside of a loop

2016-11-29 Thread Felix Berger via Phabricator via cfe-commits
flx added inline comments. Comment at: clang-tidy/utils/DeclRefExprUtils.cpp:127 + match(findAll(declRefExpr(equalsNode(&DeclRef), +unless(hasAncestor(stmt(anyOf( +forStmt(), cxxForRangeStmt(), whileStmt(),

[clang-tools-extra] r288145 - [include-fixer] Don't eat one token too many when replacing a block of includes.

2016-11-29 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Nov 29 09:15:26 2016 New Revision: 288145 URL: http://llvm.org/viewvc/llvm-project?rev=288145&view=rev Log: [include-fixer] Don't eat one token too many when replacing a block of includes. SourceRanges are inclusive token ranges, this was trying to form an exclusive char ran

[PATCH] D26465: [Diag] Optimize DiagnosticIDs::getDiagnosticSeverity

2016-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Is there any way to test this change? > This saves more than 5% of the parsing time according to perf. That sounds great. What did you test the parsing on? Will this patch get similar improvements for code that compiles without errors and warnings?

[PATCH] D27138: Extend CompilationDatabase by a field for the output filename

2016-11-29 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. Which struct are we talking about, `CompileCommandRef` or `CompileCommand`? It is a pointer in the former and a plain StringRef in the latter. I don't think making it a pointer in both is an advantage, i.e. distinguishing empty input from missing field is not valuable in

[PATCH] D26991: Remove unused code

2016-11-29 Thread Aditya Kumar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288143: [libcxx] remove unused code (authored by hiraditya). Changed prior to commit: https://reviews.llvm.org/D26991?vs=79565&id=79566#toc Repository: rL LLVM https://reviews.llvm.org/D26991 Files:

[PATCH] D27187: [clang-tidy] Do not move parameter if only DeclRefExpr occurs inside of a loop

2016-11-29 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/utils/DeclRefExprUtils.cpp:127 + match(findAll(declRefExpr(equalsNode(&DeclRef), +unless(hasAncestor(stmt(anyOf( +forStmt(), cxxForRangeStmt(), whileStmt(

[libcxx] r288143 - [libcxx] remove unused code

2016-11-29 Thread Aditya Kumar via cfe-commits
Author: hiraditya Date: Tue Nov 29 08:43:42 2016 New Revision: 288143 URL: http://llvm.org/viewvc/llvm-project?rev=288143&view=rev Log: [libcxx] remove unused code The macro _LIBCPP_UNROLL_LOOPS isn't used anywhere so the code was dead. Differential Revision: https://reviews.llvm.org/D26991 Mod

[PATCH] D26991: Remove unused code

2016-11-29 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya retitled this revision from "Hoist redundant load" to "Remove unused code". hiraditya updated this revision to Diff 79565. https://reviews.llvm.org/D26991 Files: include/algorithm Index: include/algorithm === --- includ

[PATCH] D26465: [Diag] Optimize DiagnosticIDs::getDiagnosticSeverity

2016-11-29 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. Ping 2 https://reviews.llvm.org/D26465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D27163#607078, @rsmith wrote: > A target-specific default for this, simply because there's a lot of code on > Darwin that happens to violate this language rule, doesn't make sense to me. > > Basing the behavior on whether a `-Wreturn-type`

[PATCH] D25475: [analyzer] Add a new SVal to support pointer-to-member operations.

2016-11-29 Thread Kirill Romanenkov via Phabricator via cfe-commits
kromanenkov marked an inline comment as done. kromanenkov added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:217 + + llvm::ImmutableList consCXXBase( + const CXXBaseSpecifier *CBS, NoQ wrote: > Hmm, is it

[PATCH] D27138: Extend CompilationDatabase by a field for the output filename

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D27138#607786, @joerg wrote: > It's not the directory, but the output file. That's optional since it is a > new addition and I don't want to invalidate all existing JSON databases. It seems like we're talking past each other. I'm not suggesti

[PATCH] D25475: [analyzer] Add a new SVal to support pointer-to-member operations.

2016-11-29 Thread Kirill Romanenkov via Phabricator via cfe-commits
kromanenkov updated this revision to Diff 79560. kromanenkov added a comment. Thanks for your comments, Artem! Make function name less ambiguous. Also I take liberty to update analogical function name. https://reviews.llvm.org/D25475 Files: include/clang/StaticAnalyzer/Core/PathSensitive/Bas

[PATCH] D26991: Hoist redundant load

2016-11-29 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added inline comments. Comment at: libcxx/include/algorithm:1499 +// Load the first element from __first2 outside the loop because it is loop invariant +typename iterator_traits<_RandomAccessIterator1>::value_type __firstElement2 = *__first2; + ---

[PATCH] D27138: Extend CompilationDatabase by a field for the output filename

2016-11-29 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. It's not the directory, but the output file. That's optional since it is a new addition and I don't want to invalidate all existing JSON databases. Repository: rL LLVM https://reviews.llvm.org/D27138 ___ cfe-commits mailin

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: test/CodeGenCXX/return.cpp:47 + // CHECK-NOSTRICT-OPT-NEXT: zext + // CHECK-NOSTRICT-OPT-NEXT: ret i32 +} mehdi_amini wrote: > Document what's going on in the tests please. > I added some comments that help explain w

[PATCH] D27208: [change-namespace] fix non-calling function references.

2016-11-29 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288139: [change-namespace] fix non-calling function references. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D27208?vs=79558&id=79559#toc Repository: rL LLVM https://revie

[clang-tools-extra] r288139 - [change-namespace] fix non-calling function references.

2016-11-29 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Nov 29 08:15:14 2016 New Revision: 288139 URL: http://llvm.org/viewvc/llvm-project?rev=288139&view=rev Log: [change-namespace] fix non-calling function references. Reviewers: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D27208 Modifie

[PATCH] D27208: [change-namespace] fix non-calling function references.

2016-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 79558. ioeric added a comment. - Format code. https://reviews.llvm.org/D27208 Files: change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h unittests/change-namespace/ChangeNamespaceTests.cpp Index: unittests/change-namespace/ChangeNa

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/AnalysisBasedWarnings.cpp:530 + // Don't need to mark Objective-C methods or blocks since the undefined + // behaviour optimization isn't used for them. +} mehdi_amini wrote: > Quuxplusone wrote: > > This see

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 79556. arphaman added a comment. The updated diff has the following changes: - The default value for '-fstrict-return' is now the same across all platforms, the Darwin specific -fno-strict-return was removed. - The 'fno-strict-return' optimisation avoidance

[PATCH] D27208: [change-namespace] fix non-calling function references.

2016-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 79555. ioeric marked 3 inline comments as done. ioeric added a comment. - Address comments. https://reviews.llvm.org/D27208 Files: change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h unittests/change-namespace/ChangeNamespaceTests.c

[PATCH] D27211: [clang-format] Implement comment reflowing

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. > for these cases the > original Breakable{Line,Block}Comment still breaks the long lines. Do you intend for this to continue to be the case? https://reviews.llvm.org/D27211 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D27208: [change-namespace] fix non-calling function references.

2016-11-29 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM with few nits. Comment at: change-namespace/ChangeNamespace.cpp:434 +assert(Func); +const Decl *Context = Result.Nodes.getNodeAs("dc"); +assert(Context && "E

[PATCH] D26991: Hoist redundant load

2016-11-29 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists requested changes to this revision. mclow.lists added inline comments. This revision now requires changes to proceed. Comment at: libcxx/include/algorithm:1499 +// Load the first element from __first2 outside the loop because it is loop invariant +typename it

[PATCH] D27187: [clang-tidy] Do not move parameter if only DeclRefExpr occurs inside of a loop

2016-11-29 Thread Felix Berger via Phabricator via cfe-commits
flx marked an inline comment as done. flx added inline comments. Comment at: clang-tidy/utils/DeclRefExprUtils.cpp:127 + match(findAll(declRefExpr(equalsNode(&DeclRef), +unless(hasAncestor(stmt(anyOf( +forSt

  1   2   >