[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

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=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:

[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

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=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:

[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

[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

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=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 Modified:

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=rev > Log: > Don't try to merge DLL attributes on redeclaration of

[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

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=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 and

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=rev Log: Stop handling interesting deserialized decls after HandleTranslationUnit Other AST consumers can deserialize interesting decls that we might codegen, but they won't make

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:

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=rev Log: Fix formatting issue from r288207 Modified: cfe/trunk/lib/Sema/SemaDecl.cpp Modified: cfe/trunk/lib/Sema/SemaDecl.cpp URL:

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=rev Log: getObjCEncodingForMethodDecl cannot fail. Simplify. NFC. Modified: cfe/trunk/include/clang/AST/ASTContext.h cfe/trunk/lib/AST/ASTContext.cpp

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=rev Log: Give this test that uses Itanium mangling a triple Modified: cfe/trunk/test/Frontend/plugin-vs-debug-info.cpp Modified:

[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

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=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 and

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

[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.

[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

[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] 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

[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] 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

[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 <

[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

[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

[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

r288121 - clang-format: [JS] Properly format dict literals that skip labels.

2016-11-29 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Nov 29 03:40:36 2016 New Revision: 288121 URL: http://llvm.org/viewvc/llvm-project?rev=288121=rev Log: clang-format: [JS] Properly format dict literals that skip labels. Modified: cfe/trunk/lib/Format/TokenAnnotator.cpp

r288120 - clang-format: Wrap complex binary expressions on the RHS of a comma.

2016-11-29 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Nov 29 03:40:32 2016 New Revision: 288120 URL: http://llvm.org/viewvc/llvm-project?rev=288120=rev Log: clang-format: Wrap complex binary expressions on the RHS of a comma. Specifically, if the RHS of a comma is a complex binary expression and spans multiple lines,

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

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 79530. klimek added a comment. Add tests, update hasDeclaration to work for ElaboratedType. https://reviews.llvm.org/D27104 Files: include/clang/ASTMatchers/ASTMatchersInternal.h unittests/ASTMatchers/ASTMatchersTraversalTest.cpp Index:

[PATCH] D27099: [OpenCL] Prohibit using reserve_id_t in program scope.

2016-11-29 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288126: [OpenCL] Prohibit using reserve_id_t in program scope. (authored by bader). Changed prior to commit: https://reviews.llvm.org/D27099?vs=79508=79525#toc Repository: rL LLVM

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

2016-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Parse/ParseObjc.cpp:2877 +if (GetLookAheadToken(1).is(tok::l_brace) && +ExprStatementTokLoc == AtLoc) { char ch = Tok.getIdentifierInfo()->getNameStart()[0]; bruno wrote: > Does this

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

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D27104#607161, @lukasza wrote: > Forcing shallow matching means that unit test below will stop passing after > this CL. > > TEST(HasDeclaration, DeepTagType) { > std::string input = > "class Foo {};\n" > "using Bar =

r288126 - [OpenCL] Prohibit using reserve_id_t in program scope.

2016-11-29 Thread Alexey Bader via cfe-commits
Author: bader Date: Tue Nov 29 04:21:40 2016 New Revision: 288126 URL: http://llvm.org/viewvc/llvm-project?rev=288126=rev Log: [OpenCL] Prohibit using reserve_id_t in program scope. Patch by Egor Churaev (echuraev). Reviewers: Anastasia Subscribers: cfe-commits, yaxunl, bader Differential

r288125 - Removed DEBUG_TYPE from TokenAnalyzer.h

2016-11-29 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Tue Nov 29 04:21:28 2016 New Revision: 288125 URL: http://llvm.org/viewvc/llvm-project?rev=288125=rev Log: Removed DEBUG_TYPE from TokenAnalyzer.h Summary: Defining DEBUG_TYPE in a header file doesn't make sense. It is already defined in the corresponding source file.

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

2016-11-29 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:173-177 +/// Matches the type that was substituted for the template parameter. +AST_MATCHER_P(SubstTemplateTypeParmType, hasReplacementType, + ast_matchers::internal::Matcher,

[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(), +unless(hasAncestor(stmt(anyOf( +forStmt(), cxxForRangeStmt(), whileStmt(),

r288119 - clang-format: Fix unnnecessary line break.

2016-11-29 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Nov 29 03:40:01 2016 New Revision: 288119 URL: http://llvm.org/viewvc/llvm-project?rev=288119=rev Log: clang-format: Fix unnnecessary line break. Before: aa((, ), // , a); After:

r288124 - Correct comment: we are creating a canonicla decltypetype.

2016-11-29 Thread Yaron Keren via cfe-commits
Author: yrnkrn Date: Tue Nov 29 04:08:20 2016 New Revision: 288124 URL: http://llvm.org/viewvc/llvm-project?rev=288124=rev Log: Correct comment: we are creating a canonicla decltypetype. Modified: cfe/trunk/lib/AST/ASTContext.cpp Modified: cfe/trunk/lib/AST/ASTContext.cpp URL:

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

2016-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D26922#607186, @ahatanak wrote: > I wonder whether it is possible to avoid calling > DeclScopeObj.EnterDeclaratorScope at ParseDecl.cpp:5317 instead of fixing > Sema::ActOnCXXEnterDeclaratorScope? > > I believe it's calling

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=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. Modified:

[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

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=rev Log: Support constant expression evaluation for wchar_t versions of simple string functions, in order to support constexpr std::char_traits. Modified:

[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

[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.

[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

[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

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=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 that

[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

[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

[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)

[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

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=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] 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

[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

[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

[PATCH] D26829: [clang] Allow lexer to handle string_view literals

2016-11-29 Thread Anton Bikineev via Phabricator via cfe-commits
AntonBikineev added a comment. @rsmith Richard, any plans to merge this or is there anything left? https://reviews.llvm.org/D26829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Can you add a test to ASTMatchersNodeTests.cpp? Otherwise LG for the matcher parts. https://reviews.llvm.org/D27181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[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 removed rL LLVM as the repository for this revision. flx updated this revision to Diff 79550. https://reviews.llvm.org/D27187 Files: clang-tidy/performance/UnnecessaryValueParamCheck.cpp clang-tidy/utils/DeclRefExprUtils.cpp clang-tidy/utils/DeclRefExprUtils.h

[PATCH] D27199: [libcxx] Make std::ignore constexpr

2016-11-29 Thread Anton Bikineev via Phabricator via cfe-commits
AntonBikineev created this revision. AntonBikineev added reviewers: mclow.lists, EricWF. AntonBikineev added a subscriber: cfe-commits. This addresses DR 2773 . // 20.5.2.4, tuple creation functions: constexpr unspecified ignore; }

[PATCH] D26839: [analyzer] An attempt to fix pr19539 - crashes on temporaries life-extended via members

2016-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 79540. NoQ marked an inline comment as done. NoQ added a comment. Update the comment. https://reviews.llvm.org/D26839 Files: lib/StaticAnalyzer/Core/ExprEngine.cpp test/Analysis/lifetime-extension.cpp Index: test/Analysis/lifetime-extension.cpp

[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(), +unless(hasAncestor(stmt(anyOf( +forStmt(),

[PATCH] D26837: [analyzer] Litter the SVal/SymExpr/MemRegion class hierarchy with asserts.

2016-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 79538. NoQ marked 3 inline comments as done. NoQ added a comment. Thanks for the comments! Addressed. https://reviews.llvm.org/D26837 Files: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h

[PATCH] D26837: [analyzer] Litter the SVal/SymExpr/MemRegion class hierarchy with asserts.

2016-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h:319 public: - SymbolVal(SymbolRef sym) : NonLoc(SymbolValKind, sym) {} + SymbolVal() = delete; + SymbolVal(SymbolRef sym) : NonLoc(SymbolValKind, sym) { assert(sym); }

[PATCH] D27202: [analyzer] Do not conjure a symbol for return value of a conservatively evaluated function

2016-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: zaks.anna, dcoughlin, xazax.hun, a.sidorin. NoQ added subscribers: cfe-commits, baloghadamsoftware. Instead, return a `nonloc::LazyCompoundVal` of a temporary region for the call expression, with a trivial store in which the temporary region is

[PATCH] D27204: [libcxxabi] Introduce an externally threaded libc++abi variant

2016-11-29 Thread Asiri Rathnayake via Phabricator via cfe-commits
rmaprath created this revision. rmaprath added reviewers: mclow.lists, EricWF, bcraig. rmaprath added a subscriber: cfe-commits. Herald added a subscriber: mgorny. This is more-or-less a mirror image of https://reviews.llvm.org/D21968, repeated for libcxxabi. I will soon upload a dependent

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

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Tooling/JSONCompilationDatabase.cpp:266 +nodeToCommandLine(Syntax, std::get<2>(CommandsRef[I])), +Output ? Output->getValue(OutputStorage) : ""); } joerg wrote: > klimek wrote: > > joerg wrote: > >

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

2016-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: hokein. ioeric added a subscriber: cfe-commits. https://reviews.llvm.org/D27208 Files: change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h unittests/change-namespace/ChangeNamespaceTests.cpp Index:

[PATCH] D26838: [analyzer] Enforce super-region classes for various memory regions through compile-time and run-time type checks.

2016-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:1279 /// associated element type, index, and super region. const ElementRegion *getElementRegion(QualType elementType, NonLoc Idx, +

[PATCH] D26838: [analyzer] Enforce super-region classes for various memory regions through compile-time and run-time type checks.

2016-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 79537. NoQ marked 5 inline comments as done. NoQ added a comment. Thanks for the comments! Addressed. https://reviews.llvm.org/D26838 Files: include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h include/clang/StaticAnalyzer/Core/PathSensitive/Store.h

[PATCH] D27140: Allow clang to write compilation database records

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added reviewers: bkramer, akyrtzi. klimek added a comment. Adding some folks. One question is whether we can use the additional output stuff doug added at some point for this. https://reviews.llvm.org/D27140 ___ cfe-commits mailing list

r288133 - [AST] Use static_assert to verify types instead of undefined classes.

2016-11-29 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Nov 29 06:41:21 2016 New Revision: 288133 URL: http://llvm.org/viewvc/llvm-project?rev=288133=rev Log: [AST] Use static_assert to verify types instead of undefined classes. No functionliaty change intended. Modified: cfe/trunk/include/clang/AST/CanonicalType.h

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

2016-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek created this revision. klimek added reviewers: bkramer, lukasza. klimek added a subscriber: cfe-commits. https://reviews.llvm.org/D27207 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.cpp

[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

[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

[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

[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

[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

[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] 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

[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

[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=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

[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 &&

[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

[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=rev Log: [change-namespace] fix non-calling function references. Reviewers: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D27208 Modified:

[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=79559#toc Repository: rL LLVM

[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

[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:

[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] 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:

[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(), +unless(hasAncestor(stmt(anyOf( +forStmt(), cxxForRangeStmt(), whileStmt(),

[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=79566#toc Repository: rL LLVM https://reviews.llvm.org/D26991 Files:

[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`

[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=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 range.

[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

[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] 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("=="), +

[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] 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(), +unless(hasAncestor(stmt(anyOf( +forStmt(), cxxForRangeStmt(), whileStmt(),

  1   2   >